My application works on a .swf but not .exe? - actionscript-3

My application works perfects when I open it in its .swf format, but some buttons don't work correctly when I open it in its .exe format. It doesn't work correctly in HTML as well.
This is the error that flash gives me when I publish:
Warning: No libraries were linked as Runtime Shared Libraries (RSLs) because of your publish settings: Windows Projector
I have tried to merge code, but it only removes the error and does not solve the problem?

Related

How to open a local HTML file in browser inside Unity3D game

I'm struggling to open a local HTML file in a native iOS browser from my projects StreamingAssets folder. I'm trying to use Application.OpenUrl(path) but it doesn't work on any iOS device. Meanwhile it is opening this HTML file if I'm building for a standalone Mac or Windows (have not tried it for an Android build).
I must admit that I can read the raw file content (so I'm pretty sure that I have an access to this file) but when I'm trying to open the file after this, just nothing happens. :(

Adobe Air Android Debug

I am using Flash Builder 4.6 to develop an Android game using Air. When I debug on PC it works fine, however when I plug in my Android phone and attempt to debug, I get an error with the location of a db file.
This is what I presently have the location set to:
private static var DefaultDB:File = File.applicationDirectory.resolvePath("com/arakaron/Assets/Database/DefaultDb.db");
What / where should I be setting it to? It seems that when I debug the app, nothing gets transferred to the phone as I can't find any Arakaron resources on the phone.
Any help would be great.
Thanks.
You can't access the DB in this way.
Please use below code.
File.applicationStorageDirectory.resolvePath("DefaultDb.db");
Your db has to be within the application storage. If you want to have inside the folder then you define the folder name like below:
File.applicationStorageDirectory.resolvePath("db\DefaultDb.db");
The File.applicationDirectory on Android refers to your application and assets. On Android this is contained packaged in your APK and assets are decompressed in memory by the OS when you access them. You shouldn't use this directory unless you are reading assets from your package. Assets in this directory can only be accessed via a url and won't have a nativePath property.
Most likely you should use the File.applicationStorageDirectory or if the files can be safely deleted without breaking the operation of your application you should use the File.cacheDirectory.
You can read more on these locations: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html
If you package a database with your application you should use the File copy process to copy the file to one of the above locations before attempting to access it as a database.

Access VBA API cannot access files on Windows 8

Solution: Turns out this win 8 machine was hiding known file extensions. Both of my test files ended up being testing.txt.txt and testing.pdf.pdf which of course would fail when I tried to find testing.txt.
For some reason any part of the VBA api that does file operations fails on my system running windows 8, but succeeds on windows 7 (both running Access 2013).
I was trying to use the FollowHyperlink method as a simple way to open a .pdf file. So I started simple:
FollowHyperlink "C:\TestingFolder" - Yields an explorer window opened to the path (great!)
FollowHyperlink "C:\TestingFolder\foo.pdf" - Yields Error 490 Cannot open the specified file
So then I tried the Filelen function and got another error that it could not access the file.
I ended up at the conclusion that any operation that actually accessed a file would fail, likely due to some security setting. The fact it works on Windows 7 and not 8 seems to indicate that something at the OS level may be at fault.
Resolutions I tried:
Ran Access explicitly as administrator
Moved files into user directories and out of root
Went into the Access Trust Center and disabled all security measures (temporarily)
Tried different file types (.pdf, .txt)
Your problem is not the Windows API, but the installation of the software. The FollowHyperlink, uses the system registry where the file type association is involved. If PDF files are associated with Adobe Reader and you have it installed and made PDF to be, by default open with Adobe then you will not have a problem. However if your system lacks the program that could open a file with a "creepy" extension then it will fail miserably.
Your solution is to find the appropriate program to open the file. Then use the code, it will open the appropriate file with its associated program.
Turns out this win 8 machine was hiding known file extensions. Both of my test files ended up being testing.txt.txt and testing.pdf.pdf which of course would fail when I tried to find testing.txt.

how to dynamic linking for the .ane files

I created a native extension. I can debug this application as an desktop application. Working well, there is no problem while using native extension classes. But When I debug for Premiere Pro, I get "
Class com.extenison.samples.ANESample::myClass could not found
" error.
Do you have any idea what I'm missing while debugging for Premiere Pro extension ?
- I added .ane file on Native Extensions tab of Properties
- Also added .swc file on Library Path tab
- checked Package in Flex Build Packaging tab
- I can see .ane file on Package Contents section of Flex Build Packaging
Thanks
Edit : this issue is about linking native extensions. Any helps appreciated about this
If we are creating .ane files for application that runs on some devices, that means we are gonna package our project and device will read files from package.
My native extension (.ane) file was working on local, as desktop application because there was no packaging process.
was not working on Adobe Premiere because ;
put .ane file under yourproject/src/ directory to some folder
go to project/properties/Flex Build Packaging and checked your .ane file
on same directory above,Click Package Contents tab and ensure that your .ane file is in the list
I didn't do this:) But you do this.
You can ignore this error and move on with creating an .ipa with you adt commands. The error is because of cross platform.
Though check with the points, You make the .swc as external reference from the properties.

Executing Flashbuilder application results in Error 2148 Only local-with-filesystem and trusted local SWF files may access local resources

As the title implies i have problems making a very simple (actually an empty project) to run!
I always get the follwing error:
SecurityError: Error #2148: SWF file file:///C:/Users/Σάββας/Adobe Flash Builder 4/Test/bin-debug/Test.swf cannot access local resource file:///C:/Users/Σάββας/Adobe Flash Builder 4/Test/bin-debug/osmf_flex.4.0.0.13495.swf. Only local-with-filesystem and trusted local SWF files may access local resources.
at flash.net::URLStream/load()
at flash.net::URLLoader/load()
at mx.core::CrossDomainRSLItem/load()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\CrossDomainRSLItem.as:240]
at mx.core::RSLListLoader/loadNext()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\RSLListLoader.as:184]
at mx.core::RSLListLoader/load()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\RSLListLoader.as:156]
at mx.preloaders::Preloader/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:279]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1925]
at mx.managers::SystemManager/initHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2419]
Is there something i have done wrong? Ι also tried to debug (the empty application) with no success!!
I tried to set the Global Security Settings for the folders involved in developing to always allow but the result is the same!!
My problem is that i will not be able to debug the application which is of verrrryyyy annoying.
I 'm using Flashbuilder 4, FlexSDK4, Mozilla.
Any hint is appreciated!
This error occurs when you try to open an application that uses RSLs in the standalone player or in the browser by using the file system and not a server. It means that you are violating the security sandbox of Flash Player by trying to load file resources.
You must deploy your application and RSLs to a network location, and request the application with a network request so that Flash Player will load the RSL.
If you are testing the application locally, you can add the directory to your Player trust file to avoid this error.