No definitions matching so.cuo.platform admob.* could be found - actionscript-3

I am trying to remote debug with FDB over USB and after I've compiled the app with amxmlc, I got the following errors:
No definitions matching so.cuo.platform admob.* could be found
Type was not found or was not a compile-time constant: IntroScreen_mc
...
My app uses admob extension, also in FlashDevelop after I compile the app there are no errors. I am using SDK 4.0 and all my swc libraries have been imported. I think there is something wrong with the paths but I don't know where to look.

Yes ,it a path error.
you not pack the ane lib realy ,you just packed the swc,so it work well when pack,but fail when run application.
how to fix?
right click your project in flash builder ,then set package option of ios or android.check up the check box under package option.

Related

How to compile actionscript worker swf in FlashDevelop

I already know the coding part of actionscript worker. Recently I switched my IDE to FlashDevelop. I can't figure out how to compile actionscript worker swf in FlashDevelop.
I try to use Tools - Flash Tools - Build current file. But it throws error saying
Error: Type was not found or was not a compile-time constant: File.
Maybe it is because my project is a AIR project and I use AIR API in my worker.
I also try to compile worker swf using amxmlc via command line. It compiles successfully. But AIR Debug Launcher crashes when executing worker swf part. The swf which I compiled manually is nearly half size of the former one that Flash Builder generated for me. I guess I compiled a release version swf so that ADL can't debug and then crashed.
So how do I compile a worker swf in FlashDevelop to debug or to publish a release of project?
Update:
I find that the "Build current file" command in menu is a feature in FlashDevelop called quick build. By default, it will compile current file output to project root directory without arguments. We can add compiler arguments using #mxmlc ASDoc tag (see the links below for detail) to make it compile a worker swf for us. But currently in FD 5.0.1 it seems to be a bug that #mxmlc +configname=air doesn't compile air swfs. I find a workaround using #mxmlc -noplay -library-path=[Flex_SDK]\frameworks\libs\air\airglobal.swc -library-path=[Flex_SDK]\frameworks\libs\air\airframework.swc, but the path can't be surrounded with quote otherwise FD will show an error. I may look into the source and try to fix it.
links:
AS3 Quick Build documentation
Quick Build
FlashDevelop: Compiling Multiple SWF In One Project
Compiling a worker is no different from compiling any swf, you will need a separate project to compile the worker, unless your main worker loads itself as a worker.
Since FlashDevelop does not manage dependencies beetween projects, you will have to compile it manually, then the main worker.
You may automate it with make or any build system outside FlashDevelop, or use Pre/Post build command lines
By the way amxmlc is just a shortcut for 'mxmlc +configname=air', -debug=true will compile debug version
I can assure you that File can be used in a worker, basically it's just some actionscript bytecode loading some other actionscript bytecode and having it run in a separate thread, so any swf can be used as a worker, except if it doesn't use flash.system.Worker class, it won't be able to communicate with other workers, or to stop itself.
To sum up, the limitations and issues are rather about communicating beetween threads and synchronizing them. For instance, being able to only copy complex objects through AMF3 serialization,pass only basic types/objects as parameters will makes it impossible to interact with the display list from non-main workers
Dont forget to update FlashDevelop /AIR SDK for best workers support

Cannot run Starling helloworld when using source code in FlashDevelop

I have recently installed FlashDevelop 4.4.3 and Starling 1.3.0.
I followed the getting started tutorial of Starling.
I can run the tutorial when I put starling.swc into lib directory and after making "Add to Library".
But if I remove starling.swc from lib directory and instead copy source codes (com and starling directories inside starling\src) of starling framework into my project folder then I get the following error:
C:\projects\ch01_01\src\starling\display\BlendMode.as(42): col: 32 Error: Access of undefined property Context3DBlendFactor
The same error occurs also when I set the classpath to <starling-installation>\starling\src
You don't need to copy anything. Just use the folder with your starling source.
Your classpath should always point to src directory. It won't work if you point to starling directory.
You most likely target wrong flash player version.
set it to 11.5 or something higher.

Getting blank screen from packaged air desktop application

I am developing an as3 application intended to be published with AIR.
I use the 4.6 version of Flex SDK with the flash builder plugin for eclipse.
I can launch/debug my app via eclipse without any problems. I export a valid version of the app and get my air installer. When I install and launch my app, I get a blank screen...
I don't know how to debug this. It seems that I miss something in the publication configuration but I don't know what.
I have been searching the web for hours and didn't find any solution, hope somebody can help me here !
Thanks for any help.
It simply was a real as3 error that didn't show up on debug mode...
When allowing the debug mode on the AIR application I learned that the property mouseChildren cannot be set on SimpleButton.
I got the same problem with my app and I finally found a way to display the error in the package app:
You just have to add a file named debug into your app/META-INF/AIR folder.
For detailed information see Adobe Cookbook.

Package Adobe Air to Exe

Using Flash Builder 4.6, I exported an Adobe Air file from my mobile project.
I'm trying to get it packaged into an EXE (that would include the Adobe Air Runtime)
The project was compiled with Air 3.1. I looked online and there are some ADT commands that people recommend using but the problem is that the command throws errors in Air 3.1
If i use air 3.0 ADT:
AIR file at [app path]/app.air could not be converted.
The error was ""
If I use air 3.1 or air 3.2 sdk
SDK is missing file [my path to air]\lib\nai\bin\naip.exe
I'm running
java -jar [path to air]\lib\adt.jar" -package -target native app.dmg app.air
I've also tried
java -jar [path to air]\lib\adt.jar" -package -target native app.exe app.air
I've also looked into projects like this one: http://bishoponvsto.wordpress.com/2010/02/23/adobe-air-2beta-2-to-exe-packaging-air-app-in-windows-executable/ , but it is for Air 2.0.
Any ideas? Apparently there is an integrated Flash Builder 4.6 tool, but for some reason the option under export release doesn't exist for mobile projects - strange...
Why do you want to do this? Air files -- when exported for a specific platform -- are executables.
If you are looking for an "installer" that will create directories, run the Air installation, and move auxiliary files to specific locations (docs, icons, etc.), then try Inno Setup.
EDIT:
The code you provided works for me to create a Windows EXE. But it seems a bit unecessary . . . why not just export the EXE file from Flash Builder ("Export Release Build" button in the top toolbar)? If you can't or won't, then here are some suggestions:
I am using Java version 1.6.0_29. Make sure your Java is not only up to date, but that you are actually calling the correct version (java -version).
Check the JAR directory text carefully .
Check that you are actually calling to the right Air version.
Make sure that the quotation marks are on both sides of the JAR path.
You should be able to do a "Export Release Build" (though I am using FB 4.5). Instead of selecting "Export as: Signed packages for each target platform", select "Export as: Signed AIR packages for installation on the desktop". (You may have to create a certificate, but you can create one through this export feature, too.)
(If you happen to be able to use the Flash IDE, the exported Air file has to support both "Desktop" and "Extended Desktop".)
Hopefully, this will allow you to both produce an Air program that can be converted to EXE, and actually convert it using the command line.
I know this question is a little old, but a co-worker just ran into the same error message using the command line tools and FlashDevelop. It turns out that he was accidentally packaging some source files into the .air package, an extra copy of the app descriptor and one of the swc's was getting packaged in the .air file. I removed those and repackaged the .air file, then used this command:
adt.bat -package -target bundle kiosk kiosk.air
This successfully created a captive runtime exe. Of course there's no need to create a .air file first, you can package right to native or captive runtime, but since my co-worker was creating .air files I did it that way too just to be sure it would work.

SWF is not a loadable module when compiling from flash builder 4.6 but not 4.0

Having a very strange issue on an inherited project. The developer who built the project (using fb 4.0 and flex 3.0.0.477) is able to compile it and the application works just fine, both locally and on the server. However, if I take the identical code and compile it using fb 4.6 and the same flex sdk, the application works locally, but starts failing to load modules on the server, giving a "SWF is not a loadable module" error. There are no other errors from the debug sessions.
All crossdomain policy files appear to be in place. The module even begins loading, but receives the error after 5 - 10% downloaded.
I also tried setting the application domain using modLoader.applicationDomain = ApplicationDomain.currentDomain;, with no results.
Thanks!
So after long hours of troubleshooting, it turns out that the main application widget was being loaded over https, while the modules were being referenced at http. I guess flash builder 4.6 enforces stricter security settings. I now reference both the widget and the modules at https, and the application is working again.
Thanks, Shaun, for the help!