AS3 - AIR

Is the only device I can develop when you use AS3 and Adobe AIR-PlayBook?

No BB.  Android and iOS, Yes.  If the QNX/Playbook goes well, rumor has it that QNX will be the new OS for future cell phones of BB.  But this is only a rumor at this point.  If this is the case, then the AIR, Java, C++ will be possible on all BB devices.

Tags: BlackBerry Developers

Similar Questions

  • FlexUnit with AS3 AIR does not work?

    Recently, I tried to take a shot at TDD (Test Driven Development), as I'm sure many of you know.  To do this I tried to use FlexUnit 4 of in Flash Builder 4.

    If I create a project as follows:

    1. New--> Flex project
    2. Next, Next
    3. (The main Application file) Replace .mxml, .as
    4. Finishing

    Then when I try to use FlexUnit in the ordinary way, it fails to generates an adequate FlexUnitApplication.mxml.  The content of this file is:

    
    
    package_declaration
    {
    class_declaration
    {
    class_body
    }
    }
    

    Therefore, there is a compile error that I can not move:

    Content is not allowed in prolog.
    

    However:

    If I followed the same process as above, without changing the .mxml to .as tests run correctly.

    Things, I tried to work around the error:

    • FlexUnit to 4.1 update
    • Pressing refresh in the FlexUnitsResults window
    • Creating a project with .mxml and thereafter remove this mxml and its replacement with an actionscript class
    • Bump on my desk.

    None of them have worked.

    Did anyone here successfully FlexUnit FlashBuilder 4 for an AS3 AIR project all?  If not, can anyone suggest another Test package?

    Thank you

    ~ Nick.

    I found a solution at least provisional.  I restarted FlashBuilder and despite the error marked under issues here and it worked.

    I think that restart Flashbuilder maybe erases a previously stored properly compiled build.  (Maybe Clean could also do this?).  in any case, at the time of compilation, the mxml file was generated correctly and all is well.

  • Use the banner html in as3 AIR

    I am wanting to use a HTML banner in my AS3 Air for Android project, here is the html code:

    " < a href =" http://Tracking.raftika.com/aff_c?offer_id=1106 & aff_id = 1708 & file_id = 12132 & file_id = 12166 "target ="_blank"" > < img src = " " https://media.go2speed.org/brand/files/raftika/1106/320x50_150k_ArchersVsCerberus_GEN_EN.g if "width ="320"height ="50"border = '0'" / > < / a > < img src = " " http://Tracking.raftika.com/aff_i?offer_id=1106 & file_id = 12166 & aff_id = 1708 & file_id = 12132 "width ="1"height ="1"/ > "

    I would need to have a certain height and width on my App thank you, any help is appreciated.

    You can load an html page in an air application, using the HTMLLoader class.

  • AS3/AIR with interpolation/testing applications outside the Simulator

    I have a few questions here.

    (1) I want to implement a Tween more to my application, but most of the examples I find it introduce as an application, flash or Flex, that quiet honestly Flex/XML/Any-language-help -<> TERRIBLE is to write the code for, and my application is strictly written in AS3.  I searched for a while and I found a few examples, but I can't get them to run in the environment AIR runtime, even if I saw videos of people doing exactly that.  Anyone else cela and could perhaps shed some light on how to test your application in the AIR runtime env?

    (2) also if anyone knows of some good examples of interpolation made in pure AS3, perhaps even in the EPS to AIR that would be GREAT!  I learn best by taking examples and pulling them apart.

    I'm not really sure how to answer Q1, but I will say that I'm pure - AS3 apps, as I think that most people on this forum do, so it's not any problem to do in pure as3 apps.  See http://docs.blackberry.com/en/developers/deliverables/25068/Creating_your_first_application_1348731 _...

    Regarding the second question, it is integrated into the SDK API called Tweener.  It's super easy to use.  You can see the reference of the document with many examples to http://hosted.zeh.com.br/tweener/docs/en-us/.  The key is:

    Tweener.addTween (yourObject, {property1:final_value, time: numSeconds, transition: transitionName});

    yourObject is, in fact any object, but probably a display object in many cases

    inside the curlies, you can specify as many properties of "yourObject' as you want (such as x, y, scaleX, color etc...).  final_value is just the value that the property will be at the end of the numSeconds is (a number).  The above site, I gave you a list of all the transitions you can use (as exponential or linear, etc.).

  • Made in error Installer Flash AS3 AIR application

    I created a desktop application AIR 2.6 helps AS3 in Flash 5.5.  After I have publish and try to install it, I get this error:

    AirError.png

    The app works great when I just run sovereign wealth funds.  I have published apps before using the same software and have not had any problems.  This time I'm pulling in several SWF files (does not forward), could this be the cause? I'm just spit ball here...

    That the error occurs when you have an older version of the installed application and the certificate is more than 6 months - then it does prompt you not to replace. Go to control panel and uninstall the older version of the app install should then work correctly.

  • AS3 / AIR - BB10 problem: TextInput, counting and Format

    Hello world

    I hope that I have forget something small and appreciate any help sincerely.

    Short version of the problem:

    When I add a skin to a TextInput object, assign a skin, I can't change the color of text.  If I remove the skin, it works.  And the skin seems to work correctly.  Seems the class of skin does not contain not controls font forground color.

    How can I change the background color and a TextInput for BB10 forground using the AS3 BB10 Gold SDK?

    Long version:

    Help: import a qnx.fuse.ui.text.TextInput;

    I have an application with 12 different themes.  In the application, I wish the TextInput box to inherit the theme settings.

    Normally, I use the following to define a format.  And it works on its own.

    var a: TextInput = newTextInput;

    var b:TextFormat = newTextFormat;

    b.Color = 0xFF0000;

    a.format = b;

    However, in order to change the color of the background for the TextInput, I needed to create a custom class.

    public class myTextInputSkin extends UISkin

    That's a lot of vars:

    protected var upSkin Pright;

    protected var focusSkinPright;

    protected var downSkinPright;

    protected var disabledSkinPright;

    public var borderSize:uint = 2;

    Who also works on its own to replace the background.  However, once I attribute the UISkin to the TextInput, it prevents the format never applied to the TextInput.

    var a: TextInput = newTextInput;

    var b:TextFormat = newTextFormat;

    a.setSkin (myTextInputSkin);

    b.Color = 0xFF0000;

    a.format = b;

    No matter how I trace out, it seems that is applied to the object and the skin is applied to the object.  Seek to deepen the TextInput function, it has a buried in TextField.  I can confirm that setting format reached the TextField object buried inside the TextInput, which means that the format should be really change.  I tried to manually trigger the event of colors of fonts to update inside the text input?

    Anyway,.

    Now I'm in a bit of a loss, and I feel I'm missing something simple and stupid.  Someone at - it ideas?

    Ed.

    Thank you!

    For now, I have "unskinned" these elements.  Once it gets patched, I'll reconsider.

    Ed

  • How to put data in the DataGrid with AS3 AIR?

    Hi, I am a planner of AIR app to load data from a .txt. I am able to find the data in flash, but how can I insert this data into the flash components (maybe the datagrid?) Maybe something that can allow the user deleting the part of registration of their schedule in the Scheduler. For example if they want to remove the heading 5 of the Planner, what the code of the application be? After viewing the code in the application via flash, the user will be able to remove the fifth entry in the Scheduler, or something similar to this idea. How can I achieve that?

         function loadData(event) 
              { 
                   var bytes = file.data; 
                   str = bytes.readUTFBytes(bytes.length); 
                   trace(str); 
              }
    

    Yes it is possible, but you must convert your .txt (but why don't you use .xml?) in a table of data objects. It's called DataProvider

  • AS3/AIR - for the loop is ignored but the rest of the function to run

    This has left me speechless. It is either something really stupid on my part or part of the Flash. Here goes:

    I have a function that accepts all simply a table of movieclip references, executes a loop to add them to a sprite container, then the container gives a background color. It works perfectly the first time. Now, when the program returns to this feature yet it completely ignores the loop but always adds the background color. Here's the function:

    public void prepareContainer (sections): Sprite

    {

    trace ("prepareContainer called.");

    trace ("cuts" + sections);

    containerClips.splice(0,containerClips.length);

    trace ("containerClips.length is" + containerClips.length);

    for (var rs: int = 0; rs < sections.length; rs ++)

    {

    trace ("sections [" + rs + "] is" + [rs] sections);

    }

    var w: Number = 0;

    var l:Number = 0;

    for (var sx:int = 0; sx < sections.length; sx ++)

    {

    trace ("sx is" + sx);

    section of the sections [sx] = var;

    If (SX > 0)

    {

    section.y = sections [sx-1] there + .height sections [sx-1];

    w = section.width;

    l = l + section.height;

    }

    container.addChild (section);

    }

    container.graphics.beginFill (0xfafafa); Just for the background color in the container.

    container.graphics.drawRect (0,0,w,l);

    container.graphics.endFill ();

    containerClips = sections;

    for (var p:int = 0; p < containerClips.length; p ++)

    {

    trace ("containerClips [" + p + "] is" + containerClips [p]);

    }

    return the container;

    }

    You can also see that I have traces in the service to trace the content and the length of the incoming array.

    It's track of the first time through:

    called prepareContainer!

    sections.length is [object ViewPrevTranClosed_AEM], [medicareHead_AEM object], [object NAMEsubscriberSection_AEM], [object SearchInformationSection_AEM]

    containerClips.length is 0

    sections [0] is [object ViewPrevTranClosed_AEM]

    sections [1] is [object medicareHead_AEM]

    sections [2] is [object NAMEsubscriberSection_AEM]

    sections [3] is [object SearchInformationSection_AEM]

    SX is 0

    SX is 1

    SX is 2

    SX is 3

    containerClips [0] is [object ViewPrevTranClosed_AEM]

    containerClips [1] is [object medicareHead_AEM]

    containerClips [2] is [object NAMEsubscriberSection_AEM]

    containerClips [3] is [object SearchInformationSection_AEM]

    ============================================

    As you can see, the traces in the loops went very well and the result is as expected. The container is filled with the movieclips. However, on the next time through the result is that the background color and none of the movieclips are added to the container. The following trace shows also that the loops did not stand even if the table is full and there is no condition that stop the loops. This is the inside track:

    called prepareContainer!

    sections.length is [object ViewPrevTranClosed_AEM], [medicareHead_AEM object], [object NAMEsubscriberSection_AEM], [object SearchInformationSection_AEM]

    containerClips.length is 0

    Any ideas on what is the cause?

    You can have a circular reference. containerClips is the same table that the sections. Try this simple test:

    array1 = [1,2,3,4] var;

    var array2 = array1;

    array1.splice(0,array1.) Length);

    array1 = [];

    trace (array2. Length);

    I'm sure that you expect to see it trace 4, but it trace 0. Now try to use the line commented out instead. Now you get a record of 4.

    If somewhere in your code you establish sections also point to the same table as containerClips, that you really wanted to duplicate a table, you can use the concat:

    Var items = containerClips.concat ();

    It would be either his own picture double and a pointer to the same table.

  • Full screen in AS3 - Air

    Hi I am trying the GET my andoid app displayed full screen. But it does not work.

    My internship is 480 x 800

    And this is the code that I tried to use:

    package

    {

    import flash.display.MovieClip;

    import com.greensock;

    com.greensock.easing import. *;

    import flash.events.MouseEvent;

    import flash.system.Capabilities;

    import flash.display.StageDisplayState;

    import flash.display.StageScaleMode;

    import flash.display.StageAlign;

    public class mainclass extends MovieClip

    {

    private var holder: holder_mc = new holder_mc;

    private var btn:BTN = new BTN;

    private var side1:side_mc = new side_mc;

    private var side2:side_mc = new side_mc;

    public void mainclass()

    {

    Super();

    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

    stage.showDefaultContextMenu = false;

    stage.scaleMode = StageScaleMode.NO_SCALE;

    internship. Align = StageAlign.TOP_LEFT;

    Holder.Width = Capabilities.screenResolutionX;

    Holder.Height = Capabilities.screenResolutionY;

    addChild (holder);

    trace (Holder.Width)

    trace (stage.stageWidth)

    BTN.x = 250;

    BTN.y = 300;

    holder.addChild (btn);

    Side1.width = holder.width / 2;

    Side1.height = holder.height;

    Side1.x = - side1.width;

    Side1.y = 0;

    holder.addChild (side1);

    Side2. Width = holder.width / 2;

    Side2. Height = holder.height;

    Side2.x = holder.width + side1.width;

    Side2.y = 0;

    holder.addChild (side2);

    btn.addEventListener (MouseEvent.CLICK, closedoors);

    }

    private void closedoors(e:MouseEvent):void

    {

    btn.removeEventListener (MouseEvent.CLICK, closedoors);

    TweenLite.to (side1,.8, {x: 0, ease:Bounce.easeOut});})

    TweenLite.to (face 2,.8, {x: side2.width, ease:Bounce.easeOut});})

    }

    private void open (): void

    {

    TweenLite.to (side1,.8, {x:-side2.width, ease:Bounce.easeOut,delay:.3});})

    TweenLite.to (face 2,.8, {x: stage.stageWidth, ease:Bounce.easeOut,delay:.3,onComplete:addList});})

    }

    private function addList (): void

    {

    btn.addEventListener (MouseEvent.CLICK, closedoors);

    }

    }

    }

    Any help is much appreciated.

    THX pavel

    You should check the allowFullScreenInteractiveProperty to see if the device of fullscreeninteractive.  If this is the case, go to fullscreeninteractive. If it is not the case, change your ScaleMode (ScaleMode):

    public void mainclass()

    {

    Super();

    stage.showDefaultContextMenu = false;

    {if (allowFullScreenInteractiveProperty)}

    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

    stage.scaleMode = StageScaleMode.NO_SCALE;

    } else {}

    stage.scaleMode = Stage.ScaleMode.SHOW_ALL

    }

  • Add components to AS3 only AIR apps

    Hello

    I am trying to create a single AIR AS3 application that will eventually run on an iPhone. So far, I managed to create a single application AIR AS3 in Flex Builder (Yes still using Flex Builder). Now when I create the application and you are trying to add a simple button on the stage, I don't see it. What the code I'm running:

    package {}

    import context. PhoneAppContext;

    import flash.display.NativeWindow;

    import flash.display.Sprite;

    import mx.controls.Button;

    [SWF (backgroundColor = "#FFFFFF", width = "320" height = "480")]

    public class iPhoneAIRApp_demo1 extends Sprite

    {

    protected var context: PhoneAppContext;

    myBut:Button private var;

    / / create NativeWindow

    mainNativeWindow:NativeWindow private var

    iPhoneAIRApp_demo1() of the public service

    {

    super();

    this.stage.nativeWindow.visible = true;

    AddButton());

    }

    protected function addButton (): void

    {

    myBut = new Button();

    myBut.width = 120;

    myBut.x = 10;

    myBut.y = 10;

    myBut.height = 40;

    myBut.label = "Hello";

    addChild (myBut);

    }

    }

    }

    So what am I am I missing here, why in AS3 AIR apps can components added in this way?

    Thank you

    Stephen

    Moved to the Mobile AIR forum

  • Download and cache in the issue of AIR

    Hi guys

    I did a program using AS3, AIR and php to search a remote directory and download the mp3 file to a folder on my local computer.

    It works very well.  However, even if I delete the mp3s downloaded into the folder on my local machine and test, the program 'instantly' seems to fill the folder with mp3s once again, as if it is bring some windows temp folder and not worry about the re - download.

    I was wondering if the above is the case and, if so, if there is a way to force them to download the file, even if it resides in a folder temp somewhere?

    This is the code that is called for each file:

    var mp3File:File = File.userDirectory.resolvePath("Downloads/"+saveFileNameVar;)

    var fs:FileStream = new FileStream();

    FS. Open (mp3File, FileMode.WRITE);

    fs.writeBytes (loader.data);

    FS. Close();

    mp3File.downloaded = true;

    Thanks for your help.

    Shaun

    > I was wondering if the above is the case and, if so, if there is a way to force them to download the file, even if it resides in a folder temp somewhere?

    You want to change the call to the server, receives it the file. The usual way is to add a random number as a parameter to query - something like:

    myLoader.load (new URLRequest ("http://somedomain.com/script/getMusic.php?r=" + String (Date .valueOf (()) () ") new;)

  • Embed fonts in iOS (FLASH CS5 AS3)

    I created an app (a simple dashboard), but when I publish it... I'm not able to see the correct font (I used a font of type LCD FTT)! I know I have to integrate it. I did, but it still doesn't work. Need help!
    INFO: With Adobe Flash CS5, compilation with AS3, AIR for IOS mode.

    http://blog.flexexamples.com/2008/10/15/embedding-fonts-in-Flex-gumbo/

    Do not remember. The fonts are copyright property. If you do not have permission to incorporate a non-native police, then you shouldn't.

    Here is a good list of fonts of iOS:

    http://iosfonts.com/

  • Disadvantage of developing for the iphone with air?

    I have developed a few games with flash and wanted to try my hand at a few mobile apps. Most of my games are point and clicks and since I already know AS3, AIR appears to be a very good option.

    I asked about Android - I intend to targeting first - and it appears that a major drawback is that many AIR apps woud require additional software on older phones and that the required software is a bit a space hog.

    What are the disadvantages for development for iphone? IOS requires special software to play AIR apps? They work particularly slow on the iphone?

    (1) the most recent version of air is only compatitble with ipod 3/4 generation and iphone 3GS and iphone 4

    (2) as with android, you do have access to all the features of the phone like tongues (contact lists, push notifications, etc.)

    (3) air for IOS is still a fairly new technology, so there is / will be bugs and problems you will encounter

    (4) a lot more care needs to take for optimization that you would normally do on a desktop application

    (5) the size of each IOS app is minimum 4 MB because the duration of air is conditioned with each app.  This allows ios not its users install air runtime separately as android, but it also means for much larger applications according to your original size

    That being said, I am relatively satisfied with the speed that updates / changes are coming.  IMO, with a few other settings and optimizations, air will be really able to compete with the mother tongues for some projects.

    Hope this helps

  • Faced with AS3 XML

    Hello

    I'm trying to understand the new AS3 xml structure.  I know that I can use the XMLdocument class and go back to the old way of doing thinsg but I don't want to do that, if I can help it.

    So I have an AS3 Air application that is successfully read and write to an XML file.  Now, I want to replace a whole node or an attribute if it is easier, but I can't understand how to target.

    If the XML starts with a blank node:

    < info > < / info >

    and I add to the nodes that take the following form:

    < comment >

    < name > name < / name >

    < number > < / number >

    < time > some value < / time >

    status <>status < / status >

    < / guests >

    What I want to know is how to target the State node (or indeed any other node) so that I can replace the attribute she or he is.  So, let's say I have a bunch of these nodes of comments and I want to change the status for the first, how do I do this using the new syntax.

    I'd appreciate any help you can give.

    Best regards

    Chris McLaughlin

    If there is only one node comments:

    yourxmlinstance. Guest.Status

    If you have several nodes of comments, you can use array notation to indicate which node comments:

    yourxmlinstance. Guest [0]. Status

  • Implementation of "Checkout".

    Hello!

    can someone tell me how to implement the features of the FUND to make purchases via app? In fact I have to create a simple application, where user a list of elements and user can add these items to the cart and ultimately paid through credit cards.i might have implemented the shopping cart feature up to, but does not implement the cash portion.

    So, I need your help... Please...

    Thanks in advance

    It can be done since AS3/AIR, but it's quite complicated. Here is an old article to do in Flex, Flash Builder 4.0 with a desktop AIR application. You will need to use another way to call the web browser on mobile and the PayPal API will probably changed now...

    http://www.Adobe.com/devnet/flex/articles/flex_paypal.html

    Way the easiest way is probably by using a StageWebView (or QNXStageWebView) to direct the user to a page on your site and use PayPal or Amazon it. And then when buying, a poll for the news of your site or send a big boost to the app.

    Don't forget that you still have to pay RIM their share of the revenue generated by the application. If you go around App World, you need to do a lot more work, inform RIM sales, process monthly payments and open your accounts for inspection on demand.

Maybe you are looking for

  • With Javascript error messages

    I constantly get this error message after updating Firefox. I am running FF 22.0. I have updated Java, no joy to get rid of the error messages, "evalInSandbox:Error: Permission denied for <https://facebook.com> create a wrapper for the object of clas

  • Malfunction VI

    The attached .vi aims to determine a correction factor based on the standard CTVS and input frequency "current". You will notice when you open it there ' has a structure big enough deal, and the only case that seems to be defective is 25, where I alw

  • What happened to magic puzzle

    I can get the page up, but there is no download option to download.

  • Big problem blackBerry Smartphones = Trackpad

    HelloMy Trackpad on my Curve9300 is broken in his first layer. I can just move around the screen a little...Is it possible to change or do I have to buy a new mobile phone?Thank you

  • How to upgrade to LightRoom 5.0-6?

    I have a 5.0 version and you need to update to 6. I have several user also option and you must save a macbook.