How to (re)package Mobile AIR app for Flash?
I've written a small sample AIR application in Flex to be deployed on iOS and Android, but I'm wondering how to go about setting up a way to publish it as Flash as well. I'm using Flash Builder 4.5. Any tips for this AIR noob?
EDIT: I should add that I've tried to add a new Run Configurat开发者_JAVA技巧ion, but did not see a Flash app option listed there. I'm sure I'm missing something fundamental. After all, this is FLASH Builder.
UPDATE: So this partially did the trick... I went to Run Configurations again and created a new launch configuration called "Flash_configuration" and pointed it at my project like so...
However, upon hitting "Run," the app launches in Adobe Flash Player, but is completely blank. The mobile flex contains buttons and UI elements in the View, but these do not show up in Flash Player. Perhaps the Mobile Flex framework elements are not directly translated to elements understood by Flash? If so, will I have to use some actionscipt to detect the platform and replace those mobile elements with flash-friendly ones? I would sure hate to rewrite/draw.
how to load advertising in flash air application
This example tells you how to load ads in flash air applications , including the application of the android , iphone, ipad above.
1.down load the lib from http://code.google.com/p/flash-air-admob-ane-for-ios-and-android/
2.create a mobile project in flash builder
3.add admob.ane to build path
4.create a account of www.admob.com
5.add code as the example,and change the gid (var gid:String="a14fde93a405e01";) to the id of your
6.api of the lib
NativeAds.setUnitId set the admob ad id . example:NativeAds.setUnitId("a14fde93a405e01");
NativeAds.setAdMode(true) set if in in test mode.if you are publishing your app,set it true.if you are testing set false
NativeAds.initAd(0,1,320,50); create a ad panel,and x 0,y 1,width 320,height 50.the width and height must according to https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate
NativeAds.showAd(0,1,320,50); show ad in rect x 0,y 1,width 320,height 50
NativeAds.setLandscape(false); if want to show portrait ad NativeAds.setLandscape(false),if want to show landscape NativeAds.setLandscape(true). call this fun after call NativeAds.showAd(0,1,320,50);
NativeAds.hideAd(); hide ad ,just like visible=false;
NativeAds.removeAd(); remove ad just like remove child
NativeAds.getUUID() get mac address
mark:air sdk 3.1 and highter,mac computer,flash builder 4.6,micro windows cannot use this lib. my iOS sdk path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
This pdf is a really good resource: http://help.adobe.com/en_US/flex/mobileapps/developing_mobile_apps_flex.pdf
It will walk you through the whole process. The last chapter is what you are looking for which adresses deployment.
Edit: I misunderstood the question so ignore what I wrote above.
When you create a run configuration it's probably not debugging your code so that's why all you see is a white screen.
The easiest thing is just to create new Flex project and select Web as application type. Then just copy over all code. Then you need to remove all AIR classes which you use in the project. Then just press debug and you will be on your way since the compiler will tell what is missing or is there but shouldn't be.
精彩评论