AIR SDK Functions

Hi,
I am trying to compile and build a mxml file and its
app-config.xml file into a AIR installable file from an AIR
application.
Is it possible to access the AIR SDK functions inside an AIR
application.
Please help in this issue.
Regards,
Code....

Hi,
This is not possible directly from an AIR application.

Similar Messages

  • Why reloading pure asset SWF with AIR sdk 3.6+ doesn't work?

    Hi, I posted this in the AIR beta channel, but I think it suits better here... I'm sorry for double posting.
    Hi,
    I have a game targeting iOS using AIR sdk that needs to load many swf assets from the disk (packaged with the game). When using AIR sdk 3.5, everything runs just fine. When upgrading the sdk to 3.6 or later (-swf-version=19, 20, 21), we ran into the following problems:
    1) The packaging time (making the ipa file for iOS) passes from 15 minutes to 40+ minutes.
    2) The game can't load any swf twice (ie. reload a swf).
    The first problem is not a big deal. We only have to wait a little bit more. Our guess is that is has to do with new feature introduced by the sdk 3.6, which will go through all packaged secondary swfs and remove the code from it, and since we have lot of swf assets, it takes more time.
    The second problem is way more serious, as I have to be able to reload assets according to player's action. Since we have a ton of assets, I can't keep them all in the memory as we could quickly run out of memory.
    I know that there's a documented limitation of sdk 3.6 which states:
    In AIR apps on iOS running in AOT mode there is a problem when a SWF is reloaded. Therefore reloading a SWF will not be allowed for AIR apps for iOS in AOT mode and attempting to do so will result in following error:
    Error 3764: Reloading a SWF is not supported on this operating system
    It also says that "Reloading of pure asset SWFs will work with AIR 3.7". However, that's not true, since all my assets are pure asset SWF without any code inside. It won't work, even with AIR 3.8.
    While searching on the internet, I came across a forum post that says that the only way to know if a swf is a pure asset swf, is by using swfdump.exe, and searching for the DoABC2 tag. I did it, and effectively, DoABC2 tag was there, but empty.
    So my first observation is that:
    - Pure asset SWF file containing empty DoABC2 tag can be reloaded using AIR SDK 3.5
    - Pure asset SWF file containing empty DoABC2 tag can't be reloaded using AIR SDK 3.6+
    It seems to me that AIR SDK 3.6+ doesn't care if the tag is empty or not. If it is there, then it's not ok.
    Then I wanted to know why my SWFs have this empty tag. After lot of tests, it turns out that it is because I am using jsfl to automate the export of assets from a FLA file. And there comes my second observation:
    - When exporting a swf without code from Flash IDE (Ctrl+Alt+Shift+S), there's no empty DoABC2 tag.
    - When exporting a swf from the Flash IDE's library (right click on the library Movieclip -> Export Flash movie...), empty DoABC2 tag is automatically inserted.
    Unfortunately, my jsfl script uses thee same Library export functionality, and it produces the same "contaminated" swf. Why doesn't it produce the same SWF from both ways of export? I have no idea.
    In the perfect world, the AIR SDK would not only look for the DoABC2 tag, but it should check whether if there's code inside. Also, Flash should use the same export process disregarding if it is being called from the IDE or the Library, and not inserting empty DoABC2 tag when there's no code.
    As for now, I can't find any workaround to solve my problem. That means that I'm stuck with swf-version=18, and I can't benefit from all the cool features such as rectangle textures, new Context3DTextureFormat etc.
    If anyone has a solution, or simply pointing out what I'm doing wrong here, please share it.
    Thanks for reading.
    Iojeirg

    Hi makc3d,
    Thanks for the response. After all that time I started losing hope.
    I would not say that the abvious solution is to remove the tag. I think it should not be put there in the first place if there's no code at all. Moreover, this only happens when exporting a MC from the Library, and it works just fine when exporting normally (publish). It seems more like a bug than an expected behaviour.
    Also, AIR should check for actual code in this tag instead of relying only on the tag itself.
    Your solution is a nice workaround, and I will certainly try that out. But as I said, it will not fix the original bug, it will only patch it later on in the process.

  • File.upload on Air SDK for iOS devices failed to send http request to server.

    I am trying to use ActionScript's File.upload to upload a file on Air SDK for iOS8 environment, but the File.upload does not work properly. No handler about the file upload is executed after File.upload is invoked, and no exception is caught. When I check the network traffic of the server side, I found that no http request even hit the server after File.upload is executed. The code snippet here is very simple.
      private var file:File;
      private var dir:File;
      //This method is executed to create a file and upload it when the Upload Button is pressed.
      protected function OnUploadButtonPressed(event:MouseEvent):void{
      var str:String = 'This is test';
      var imageBytes:ByteArray = new ByteArray();
      for ( var i:int = 0; i < str.length; i++ ) {
      imageBytes.writeByte( str.charCodeAt(i) );
      try{
      dir = File.applicationStorageDirectory
      var now:Date = new Date();
      var filename:String = "test" + now.seconds + now.milliseconds + ".txt";
      file = dir.resolvePath( filename );
      var stream:FileStream = new FileStream();
      stream.open( file, FileMode.WRITE );
      stream.writeBytes( imageBytes );
      stream.close();
      file.addEventListener( Event.COMPLETE, uploadComplete );
      file.addEventListener( IOErrorEvent.IO_ERROR, ioError );
      file.addEventListener( SecurityErrorEvent.SECURITY_ERROR, securityError );
      file.addEventListener(ErrorEvent.ERROR, someError);
      file.addEventListener(ProgressEvent.PROGRESS, onProgress);
      file.upload( new URLRequest("http://10.60.99.31/MyPath/fileUploadTest.do"));//This line does not work. No handler is executed. No http request hit the server side.
      } catch( e:Error ) {
      trace( e );
      //Complete Handler
      private function uploadComplete( event:Event ):void
      trace( "Upload successful." );
      //IOError handler
      private function ioError( error:IOErrorEvent ):void
      trace( "Upload failed: " + error.text );
      //SecurityError handler
      private function securityError(error:SecurityErrorEvent):void{
      trace( "Security error:" + error.text );
      //Other handler
      private function someError(error:ErrorEvent):void{
      trace("some error" + error.text);
      //Progress handler
      private function onProgress(event:ProgressEvent):void{
      trace("progressHandler");
    When executed on Air Simulator, it works fine as expected, and the file is successfully uploaded to the server. But When executed on iOS devices(in my case, iPad), as I explain early, no handler about the file upload is executed, and no the http request even hit the server. So I think the problem may be in the client side. It seems that the Air SDK for iOS just failed to send the http request for some reason.
    To make my problem more clear, I list my environment below:
    Development Environment:  Windows7 (64bit)  / Mac os 10.9.4 (Tested on  OS platforms.)
    IDE: Flash Builder 4.7
    Air SDK:  3.8 / 16.0.0 (After I updated to the lastest Air SDK 16.0.0 , the problem still exists.)
    Application Server:  Tomcat7 + Spring
    Target OS: iOS 8
    I have been struggling for this for days. So I really appreciate it if anyone has any idea about this.
    Thanks in advance.

    Hi bluewindice ,
    As you have quoted ( ActionScript's File.upload does not work on Air SDK for iOS devices ) , this issue has been replicated at our end, and our team will be working on it.
    Thanks,
    Tushar

  • Any News from Adobe Air SDK, on why we still can't REMOVE "android.permission.INTERNET" from a release compile?

    Is there any new developments on the Adobe Air issue, of being able to COMPLETELY REMOVE the "android.permission.INTERNET" from the manifest file?  As of today, you can still completely remove the "android.permission.INTERNET" from the manifest, bundle your app with Captive Runtime, and Adobe Air SDK will still "tack" the permission onto the end of the manifest block. With users and privacy concerns these days, surely Adobe would recognize that developers building apps that DO NOT REQUIRE Network Access, should be able to remove that permission. Any help on this?

    I see Flash will now be able to export iPhone apps directly.  Although Flash itself will still not run on the iPhone.  It would be great if Director had that functionality a well.  Even better if apps could run on both the iPhone and Blackberry!
    Mike M

  • Publish Air (SDK 3.8) iOS crashs

    Hi!
    I have problem with publishing air (SDK 3.8) iOs Flash CS6 application for iPhone 5.
    I have created app with classic texts, png images with actual size (is PPI required to be 72, or can it be anything), add png -icons and launch picture named "[email protected]". Tests with Flash goes right and navigation seems to be working. Flash publish ipa but application only gives white screen and crashs.
    What can be wrong?

    Hi!
    I'm still wonderin. App is realy simple "from frame to frame". It doesn't require any access. You were right that it runs perfect with Android, but not with iOS.
    I have also edited AS3 settings: text layouts default linkage is changed from RSL to "Merged into code".
    Frame 1 code is like this:
    stop();
    bt1.addEventListener(MouseEvent.CLICK, buttonClick10);
    function buttonClick10(event:MouseEvent):void{
    gotoAndStop(2);
    bt2.addEventListener(MouseEvent.CLICK, buttonClick11);
    function buttonClick11(event:MouseEvent):void{
    gotoAndStop(3);
    bt3.addEventListener(MouseEvent.CLICK, buttonClick12);
    function buttonClick12(event:MouseEvent):void{
    gotoAndStop(4);
    bt4.addEventListener(MouseEvent.CLICK, buttonClick13);
    function buttonClick13(event:MouseEvent):void{
    gotoAndStop(5);
    //scroll texts
    var where:Number =  250;
    var stageHeight:Number = 900;
    function dragOn(e:MouseEvent):void{
              var howLong:Number = e.currentTarget.height;
              //Rectangle(x,y,width, height);
              var longRec:Rectangle = new Rectangle(65, stageHeight-howLong, 0, howLong-stageHeight+where);
              e.currentTarget.startDrag(false, longRec);
    function dragOff(e:MouseEvent):void{
              e.currentTarget.stopDrag();

  • Installed Air SDK's disapere after re-launch

    I've got an issue on my Flash Professional CC application when dealing with Air SDK's.
    After I did a migration of my account into a new mac, every time I quit and relaunch my Flash Professional CC enviroment, the SDK's disapere. Or not really disapere, they are still in the menu if I go to Help>Manage SDK, but they are not present in the target drop down under publish, and I get a alert when opening projects with the "missing" SDK assigned to it.
    Could it be permission issues on some settings file somewhere that Migration Assistant damaged when migrating to the new computer?
    Anyone?

    I knew there was a reason people called me exceptional
    Regarding one practical benefit for me - saved lots space when backing up over time.  And the uninstall app feature is handy. 
    But, as you write, YMMV.
    For example, I expect you could get in trouble eliminating every file that might pop up via some of its functions.

  • IOS + AIR SDK 15.0, arguments.callee 'undefined'

    Hi everybody,
    I work on application use Flex SDK 13.0, Air SDK 15.0, and Robotlegs 2.2.1 MVC Framework.
    Since I upgrated the AIR SDK to 15.0, there is an error in Robotlegs Framework. Searching, I found where the error was, so I create a simple project to test the problem.
    When you use argument.callee in mobile application on IOS, the arguments.callee is 'undefined'.
    This is simple code :
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      applicationDPI="160"
      applicationComplete="viewnavigatorapplication1_applicationCompleteHandler(event)"
    >
      <fx:Script>
      <![CDATA[
      import mx.events.FlexEvent;
      protected function viewnavigatorapplication1_applicationCompleteHandler(event:FlexEvent):void
      var callee : Function = arguments.callee;
      if(callee != null)
      testCalleeLabel.text = "find callee";
      }else
      testCalleeLabel.text = "not find callee";
      ]]>
      </fx:Script>
      <s:Label id="testCalleeLabel"/>
    </s:Application>
    In Air Simulator, or Android APK, the 'arguments.callee' is defined, but if you build in IPA for IOS (or debug mode with "standard build", not "rapid build" on flash builder), the 'arguments.callee' is undefined.
    With AIR 14, the 'arguments.callee' is ok on IOS.
    Robotlegs framework uses 'arguments.callee', so the framework crashes during the instanciation.
    Is it a bug ?
    Thanks for yoru response.

    Hi, you can use this workaround until its fixed.
    public function wrapListener(f:Function):Function {
                return function (... args) : void {
                    var func:Function = f;
                    args[args.length] = func;
                    f.apply(this, args);
    addEventListener(event.EVENT, wrapListener(function(callee:Function):void {
        removeEventListener(event.EVENT, callee);

  • Overlay new AIR sdk with old Flex sdk

    Is it possible to overlay AIR 3 sdk with flex 3.3 sdk without expecting errors?
    Any help, as always, would really be appreciated?...
    Cheers
    Adam

    You may get some errors:
    Note:
    If the Flex SDK is newer than the AIR SDK, it can rely on AIR  functionality that isn't present, resulting in compile-time or runtime  errors.
    from: http://helpx.adobe.com/x-productkb/multi/how-overlay-air-sdk-flex-sdk.html

  • How to install latest AIR SDK (13 or 14) in Flash Pro CS6?

    Hi, I'm using Adobe Flash Pro CS6 on Windows 7 64-bit and I wanted to add latest Adobe AIR SDK, either 13 or 14, but non of them is seen as a valid SDK by Flash.
    I've tried downloading two possible SDKs (SDK & compiler and SDK without compiler) from here: Download Adobe AIR SDK (version 13) and here http://labs.adobe.com/downloads/air.html (version 14). Each time I copied the extracted SDK folder to my Flash CS6 folder where default 3.2 and 3.4 SDKs are located. After that I open Flash, then Help > Manage Air SDK, click on " + ", browse for the new folder, and all I get is "The selected folder does not contain a valid AIR SDK" warning message. It all looks the same with all four SDKs I downloaded!
    Not long ago I added AIR 4.0 without any problems. What am I doing wrong? Is new SDK Flash CC only or what?

    What are you naming the folder?
    Just as a general tip, since many applications (Flash CS4, 5, 5.5, 6, CC) you can save some space by only putting the AIR SDK in one place. Since CS6 and CC have "Manage AIR SDK" in their settings you no longer need to locate that folder like 5.5 which requires you to overlay the AIR 2.6 folder. So save some space and put it anywhere out of the way, out of the Flash folder. I have multiple drives and I have lots of SDKs installed at root on my E:\ (E:\SDK\AIR, E:\SDK\JDK, E:\SDK\Android, etc). I then just go in the help panel like you do and point CS6 and CC to E:\SDK\AIR and they work perfectly fine with the latest SDK released recently.
    Are you updating Flash Player to 13 as well?
    Last, do not download the Flex version for Flash. Flex is for Flash Builder if you intend on using Flex (it is different than Flash).
    Do not get this:
    You want the SDK from the big orange buttons above this warning.

  • Use AIR sdk in a panel

    Hello,
    I'd love to be able to access the file system with a panel. I've read that after cs5 panels use the AIR framework, but I'm not entirely sure how to use it. I'm currently using the flex 3.4.0 sdk which was required for CS4. How can I go about upgrading to the AIR sdk?
    Thanks,
    Cameron

    Hi Tom,
    Thanks for getting back to me. My project doesn't have a .actionScriptProperties file (which surprises me, as I feel it used to have one). Instead I have a .flexProperties file. I tried adding that bit in there but when I try to do something like `import flash.filesystem.*` it doesn't autofill.
    1. Will what you mentioned work in flexProperties?
    2. Do I need a lib of some sort to work with AIR?

  • Local_nostrip.arm-air.txt is missing in AIR SDK 16

    I merged Flex SDK 4.6.0 and AIR SDK 16.0.0.272 and use it in the Flash Builder 4.6.
    I downloaded AIR SDK 16.0.0.272 in the following :
    ( Because I use Flash Builder, I downloaded the original AIR SDK without the new compiler. )
    http://www.adobe.com/devnet/air/air-sdk-download.html
    I added ANE files to my app and entered iOS SDK path in the properties window of project.
    * iOS SDK path : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPh oneOS8.1.sdk/
    When I build my app, the following error occurred :
    After I read the error message, I check whether local_nostrip.arm-air.txt is in the specified location.
    I found local_nostrip.arm-air.txt is missing in the sdk - it does not exist in the {pathtosdk}/lib/aot/lib/.
    In the AIR SDK 15, local_nostrip.arm-air.txt  file is in the {pathtosdk}/lib/aot/lib/.
    Can I use local_nostrip.arm-air.txt of the AIR 15 instead?
    Does anybody know?

    I am using Flash Builder 4.6.
    I can't found where "run configuration" and "custom launch" is.

  • How to setup Flex SDK with latest AIR SDK?

    Now the latest AIRSDK web page has a small link at the bottom for Flex users and it states that Flex users should take the SDK version without the compiler. BUT....
    the http://helpx.adobe.com/flash-builder/kb/overlay-air-sdk-flash-builder.html page says to download the SDK from
    http://labs.adobe.com/downloads/asc2.html
    but this page now redirects to:
    http://helpx.adobe.com/air/kb/archived-air-sdk-version.html
    which contains a large list of archived SDK's. So that help page never really says which version of the SDK to use - with or without the compiler. But other forum posts have implied its suppose to be the one with the compiler.
    Now since we're overlaying the ...plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK folder that would make sense.
    But now there's a second overlay instructions page at:
    http://helpx.adobe.com/x-productkb/multi/how-overlay-air-sdk-flex-sdk.html
    with different instructions.
    So my questions are:
       Which overlay instructions are we really suppose to use?
       Which version of the AIR SDK (with or with-out compiler) are we suppose to use?
       What does the Flex Library Project properties -> Flex Library Compiler -> 'Include Adobe AIR libraries' checkbox really do?
            If I've followed the (first) overlay instructions above, does this checkbox now mean I'm using the overlaid AIR SDK 3.6
            with the current Flex SDK I've chosen?
            What if I'm using the Apache Flex 4.9.1 SDK? Will the AIR SDK 3.6 overlay that?
                (Doesn't Apache Flex have AIR 3.4 embedded - will this confuse Flash Builder 4.7 ?)
    Is it just me, or is this just getting more and more confusing? Can we perhaps get a AIR SDK combo box to go beside the Flex combo box and when we check the 'Include Adobe AIR libraries' then we can select the AIR SDK we want? And get a 'configure AIR SDKs...' link too? Then perhaps we can get completely away from overlays and all this merged SDK nonsense. I've had nothing but problems with it.
    The real reason I need all this info is because I'm trying to use Flash Builder 4.7 to build an Android ANE and I'm having a devil of a time just trying to find my resources. When I use context.getResourceID() I'm not getting the correct resources - and after reviewing other posts here I came to the conclusion that it might be due to bugs in older AIR SDK's. So really, at the moment I could care less about the latest Flex SDK, I just need to know I'm working from the latest AIR SDK.
    Thanks in advance.

    If you are not using Flash Builder go here: http://www.adobe.com/devnet/air/air-sdk-download.html
    At the bottom it says:
    Note : Flex users will need to download the original AIR SDK without the new compiler. Mac Windows.
    Download the proper one for your OS and then extract it over your existing Flex SDK directory.
    EDIT: Just read your post again and noticed you mentioned Flash Builder. In that case you want to follow these directions: http://helpx.adobe.com/flash-builder/kb/overlay-air-sdk-flash-builder.html and grab the version with the compiler at http://www.adobe.com/devnet/air/air-sdk-download.html

  • Installing and using Adobe Air SDK 2.5 with Flash Professional CS4

    Hi,
    I am trying to install the Air SDK 2.5 with Flash Professional CS4 with the intention of creating a program to use Actionscript 3 to communicate with the UDP interface using datagrams. (The server is the IL2 device link interface) As I am very new to this development environment I was wondering if anyone could answer a few questions.
    1) Can I use datagram sockets with Air 2.5 with Actionscript 3 and Flash CS4?
    2) Is there special procedure for installing the AIR SDK 2.5 or do I use the instructions layout in "How to Overlay the Adobe Air 2 SDK for Use with Flash Professional - Flash professional CS4"?
    3) If I do use those instructions, when I edit the namespace for my application do I set it to 2.0 or 2.5?
    4) As a stepping stone to building my program I was trying to try to build the Actionscript 3  DatagramSocketExample program that is published by Adobe. Unfortunately I am getting a '1046: Type was not found or was not a compile-time constant: DatagramSocketDataEvent'.
    Is there a step by step tutorial on how to get the example code up and running?
    Thankyou for your time and patience with my noob questions
    Ian

    This was part of the AIR 2.0 beta release note, but I used this for 2.5 and it works nice.
    You can try it too an make sure you use 2.5 wherever the not says 2.0beta2.
    Goodluck.
    How to Update Flash CS4 to Use the AIR 2 Beta SDK
    If you use Flash CS4 Professional to build Adobe AIR applications, please follow the instructions below to manually update the version of the AIR SDK to use version 2.0.
    Update Flash CS4 Professional to version 10.0.2 at http://www.adobe.com/support/flash/downloads.html or select "Help > Updates... " from within Flash CS4.
    Quit Flash CS4 Professional if it is open.
    Navigate to the Flash CS4 installation folder. The default location on Windows is "C:\Program Files\Adobe\Adobe Flash CS4\" and on Mac OS "/Applications/Adobe Flash CS4/"
    Within the "Adobe Flash CS4" folder you should see a folder called "AIK1.5". If this folder is not present repeat step #1.
    Rename the folder "AIK1.5" to "AIK1.5 OLD" or delete it if you do not need to save a copy of it.
    Make a new folder called "AIK1.5"
    Download the Adobe AIR 2 SDK from the labs website and uncompress the contents of the folder to the new "AIK1.5" folder you just created.
    Copy the "airglobal.swc" file located within the "Adobe Flash CS4/AIK1.5/frameworks/libs/air/" folder into the "Adobe Flash CS4/Common/Configuration/ActionScript 3.0/AIR1.5/" folder.
    Flash CS4 is now configured to use the AIR 2 beta 2 SDK.
    In order to take advantage of the new AIR 2 beta 2 features, you will need to update your application descriptor file to use the "2.0beta2" namespace.

  • AIR SDK 17 (BETA) is not working with Flash CS6

    Hi,
    The latest AIR SDK 17 is not working with Flash CS6.
    I tried to publish and install an iOS app to my connected device via USB but I always get an error "Check if iTunes is installed".
    The latest stable AIR SDK 16 is working fine, and yes, iTunes is installed on my PC.
    DETAILS:
    - Flash CS6
    - AIR SDK 17
    - System: Windows 8,1
    - iPodTouch with iOS 8.1
    REPRODUCE:
    Open new AIR iOS template and publish/install it to a USB connected iOS 8.1 device.
    Anyone else got that error?

    I was getting this intermittently.   Not a super problem.   A remove and install in iTunes gets it loaded (after you tell ITunes where it is).

  • How to install AIR SDK 15 on my iMac

    Hi everyone... I built my iOS app on Flash cs6 (with the latest AIR SDK 15) on my windows computer, but now have access to a Mac. The problem though is that the Flash cs6 on the mac is running AIR 3.2 and I have downloaded the latest AIR SDK 15 for Mac but I don't know how to install it. Can anyone help me?

    I assume its the same as installing any other AIR SDK's. you go to Help >>> Managed Air SDK >>> click on the + sign on the top right >>> navigate to the AIR SDK 15 folder and then done!
    I'm in the same situation as you are but I haven't received my imac YET. so I will let you know once I have done this myself or you can share your experience with us?

Maybe you are looking for