Workers in AIR for desktop

My question here specific to AIR apps for desktop, not for the web. I have Flex 4.6 and AIR 3.5. I've beed Googling for days with no joy.
There are no code errors but does anyone know where and how to initialize workers in the main mxml file or hat appliaction handler should be used to get the worker thread to set the mainToWorker and workerToMain MessageChannel's, as there is no class initializer like there is in web flex projects.
if(Worker.current.isPrimordial){
                                                  worker = WorkerDomain.current.createWorker(this.loaderInfo.bytes);
                                                  mainToWorker = Worker.current.createMessageChannel(worker);
                                                  workerToMain = worker.createMessageChannel(Worker.current);
                                                  worker.setSharedProperty("mainToWorker", mainToWorker);
                                                  worker.setSharedProperty("workerToMain", workerToMain);
                                                  workerToMain.addEventListener(Event.CHANNEL_MESSAGE, onWorkerToMain);
                                                  worker.start();
                                        }else{
     // if in worker thread
                                                  mainToWorker = Worker.current.getSharedProperty("mainToWorker");
                                                  workerToMain = Worker.current.getSharedProperty("workerToMain");
                                                  mainToWorker.addEventListener(Event.CHANNEL_MESSAGE, onMainToWorker);
Cheers,
Nige

1.Make sure you understand the big differences between video and stagevideo, its tempting to think that stagevideo is the better videosoultion in any case, but its not.
The best Article (however a little outdated) on the subject is imo: http://www.adobe.com/devnet/flashplayer/articles/stage_video.html
2.In a performance heavy environment the combination stageVideo+greensock might not be the optimal solution, if you have time to reprogram Starling/feathers will probably give you a much better performing combination:
http://forum.starling-framework.org/topic/stagevideo-with-starling-example
3.I don`t know how you encode your Backgroundvideo, there are literally dozens of viable codecs that should differ extremly in how they stress the gpu/cpu. Maybe you have to experiment with a lower than HD resoultion and see if scaling up the background is a good compromise.

Similar Messages

  • I have flash professional cc and I need air for desktop application with .exe or .air that should contain all swf's and captive air runtime in one Installer only . I don't want to install separate adobe air runtime .

    I need Air for desktop application either in .exe or in .air with embedded captive runtime just like .apk . I don't want to install adobe air separate . everything should come in installer
    I have adobe flash professional cc development tool , let me know whether I have to go with other development tool???
    your reply will  increase my confidential level
    please anyone can help me to solve this problem
    Thanks&regards
    Niranjan

    Adobe Flash Professional CC manual
    1) Create new project
    2) Configure your Project properties
    3) Embed runtime, so you users can use Adobe AIR without pre-installed Adobe AIR runtime
    4) After publishing you will receive %APP_NAME%.app folder that contain your project files

  • AIR for desktop and TouchEvents

    Building a kiosk application that only requires button press and button drag(scroller) detection.
    I DON'T need multitouch, or gesture recognition.
    Will I still need to substitute any MouseEvents for TouchEvents?

    Hi jbach...
    In AIR for desktop, you can definitely load external swfs and they can contain code (works on Android also).
    There's a in-depth discussion of how to accomplish this here:
    http://blogs.adobe.com/cantrell/archives/2010/03/extending_air_applications_with_plugins.h tml
    This article talks about security considerations, etc - and is worth understanding.
    However, if you want to just test it out without worrying about security:
    var stream:FileStream = new FileStream();  
    stream.open(_file, FileMode.READ);
    var bytes:ByteArray = new ByteArray();
    stream.readBytes(bytes);
    stream.close();
    var context:LoaderContext = new LoaderContext();
    context.allowCodeImport = true;
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);
    loader.loadBytes(bytes, context);
    function loadHandler(e:Event):void
    _content = DisplayObject(e.target.content);
    So basically:
    Read the file as a byte array.
    Create a loader context and set allowCodeImport to true.
    Create a loader and use loadBytes to "convert" to a useable swf.
    On complete, e.target.content contains your swf (fully accessible with code, etc.)
    Hope this helps!  Good luck with your application.

  • AIR for desktop and multiple swfs

    I know when packaging AIR for mobile devices, you can load external swfs as long as they contain no code, but I was wondering if the same limitation exists for AIR on the desktop.
    Building a kiosk application and would like to organize and load the various 'views' similar to how I would create and organize a flash based web application.

    Hi jbach...
    In AIR for desktop, you can definitely load external swfs and they can contain code (works on Android also).
    There's a in-depth discussion of how to accomplish this here:
    http://blogs.adobe.com/cantrell/archives/2010/03/extending_air_applications_with_plugins.h tml
    This article talks about security considerations, etc - and is worth understanding.
    However, if you want to just test it out without worrying about security:
    var stream:FileStream = new FileStream();  
    stream.open(_file, FileMode.READ);
    var bytes:ByteArray = new ByteArray();
    stream.readBytes(bytes);
    stream.close();
    var context:LoaderContext = new LoaderContext();
    context.allowCodeImport = true;
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);
    loader.loadBytes(bytes, context);
    function loadHandler(e:Event):void
    _content = DisplayObject(e.target.content);
    So basically:
    Read the file as a byte array.
    Create a loader context and set allowCodeImport to true.
    Create a loader and use loadBytes to "convert" to a useable swf.
    On complete, e.target.content contains your swf (fully accessible with code, etc.)
    Hope this helps!  Good luck with your application.

  • Flash CC Publish Air for Desktop for Windows from a Mac?

    I've been trying to figure out how to publish my game for windows and it is driving me nuts. On the adobe help page it says there should be a checkbox right below the "output as" boxes. It should say "Windows InstallerSelect this option to compile a native, platform specific Windows installer (.exe) instead of a platform-independent AIR installer (.air)." On my publish settings however, this is missing. Does anyone know how I can publish a windows .exe from Flash CC on my mac?

    Hi,
    Air for Desktop settings are platfrom specific , you couldn't publish the Windows.exe from MAC , you can publish the windows installer from windows machine .
    Thanks!

  • Worst performance of AIR for Desktop on PC

    Hi,
    I've been using AIR for mostly developing Android projects for my clients recently. And so far it's been pretty good for that.
    I have noticed before and specifically with my current project, which is also simple branded Android app for a client, the performence of AIR on Desktop is worst of all my Android devices. When testing the app on PC, (ctrl + enter in Flash Pro) when simple animations starts, AIR takes 100% CPU on all cores on my i5 Dell with Intel HD4000 and Nvidia GF630M.
    I was expecting it to run supper smooth on PC, while surprisingly, the app performs smooth on almost 3 years old Samsung Galaxy S2, then Galaxy Tab2, then chinese tab, and lastly comes PC, performace wise. For mobile, I have set the app to use GPU, and while testing on PC, I have tried all the "Render mode" options, but performance is exactly same.
    I am not using Stage3D/Starling. It's just classic Flash, with timeline animations, and AS3 document class to make it all interactive.
    Is it a must to use Stage3D/Starling combo to get same performance as on mobile, even for classic timeline style apps?
    I thought Flash was getting improved on PC the most, but it feels like other way around :/
    // chall3ng3r //

    Yes, I have tried debug and regular test, no diffirence.
    I have noticed that as three timeline animations stop one by one (they are not too big graphically, it's just a slot machine app), performance gets better. But, still not compareable to GSG2. I'm not using any filters, I did applied the motion-blur in Photoshop in alternate gfx, and just use that when in running state.
    Edit: also, i've tried with latest beta build, and latest release build. it's same.
    // chall3ng3r //

  • Will there be future support from Adobe AIR for Desktop native Applications

    We have a desktop native application developed using Flex SDK 4.1 and running on Adobe AIR. Now as Adobe has donated Flex SDk to Apache we are concerned about the future of this application. If we rescale our application with new versions of Flex SDk released by Apache, in future will the new versions of Adobe AIR support it? As I have read in Adobe Forums that Adobe is more concentrated on providing HTML5 support in Adobe AIR, and not working for Flex support anymore, can we face any problems going forward with this combination?

    We have a desktop native application developed using Flex SDK 4.1 and running on Adobe AIR. Now as Adobe has donated Flex SDk to Apache we are concerned about the future of this application. If we rescale our application with new versions of Flex SDk released by Apache, in future will the new versions of Adobe AIR support it? As I have read in Adobe Forums that Adobe is more concentrated on providing HTML5 support in Adobe AIR, and not working for Flex support anymore, can we face any problems going forward with this combination?

  • Using AIR for desktop

    is drag'n'drop from system and back possible?
    i would like to build an air desktop drop zone area.
    it would be cool when i can use flex for building desktop gadgets.
    last time i checked it was not possible to drop content to air at all.
    hence a cs4 floating icon which offers all programs as icons for opening a file on mouse move over.

    Here is information on building Flex-based applications that use drag-and-drop functionality:
    http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7e8a. html
    http://www.adobe.com/devnet/air/flex/quickstart/scrappy_copy_paste.html
    And here is information on processing arguments passed into an AIR application when it is invoked:
    http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118676a5d46-8000. html

  • Flash Professional Help | Publishing for Adobe AIR for desktop

    This question was posted in response to the following article: http://helpx.adobe.com/flash/using/publishing-adobe-air-desktop.html

    This page is extremely helpful. Thank you!
    With the help of this page, I've managed to figure out how to do most of what I need to do, however, I'm having troubles creating a Mac and Linux installer for my application. So far, I have only been able to create a Windows installer (.exe). In the "general" tab, the only options I have in "output as" are "AIR package", "Windows Installer" and "Application with runtime embedded".
    I am using Adobe Flash Professional CS 6 and am using a Windows 7 computer.
    Thanks in advance.

  • Surround Sound via StageVideo in Air for Desktop?

    I can't seem to find an obvious answer to this question:
    I want to use StageVideo to play h.264 videos with 5.1 AAC audio in full surround via a Mac Mini.
    Flash is able to play back video with Surround sound, correct?
    What is required to make this work?
    Thanks!

    Thanks for the answer Alex.
    Here is a follow-up: Will a StageWebView within an AIR Desktop app, playing the video via HTML produce the Surround Sound?
    Browsers themselves seem to play back the audio fine, just curious before I'm able to test if a StageWebView would produce the same result.
    Thanks!

  • AIR for Desktop – Video 'wall' using 'virtual' tiles

    Creating a huges video wall- 10x6 ft  which is actually 1 large screen and will display a variety of video, pictures and text content. I want to break up the screen using 'virtual' tiles. A variety of approaches will be taken to create transitions, 3d rotation effects, ripple effects etc.
    I know I will make ample use of Bitmapdata, rednering my video(s) and loaded images off stage and probably copyPixel or drawRect  methods to render my main canvas.
    What are some other 'best pratices' I should keep in mind to optimize performance and playback?
    What are some general guidelines for video encoding if all video content will be prerendered and played back locally?

    1.Make sure you understand the big differences between video and stagevideo, its tempting to think that stagevideo is the better videosoultion in any case, but its not.
    The best Article (however a little outdated) on the subject is imo: http://www.adobe.com/devnet/flashplayer/articles/stage_video.html
    2.In a performance heavy environment the combination stageVideo+greensock might not be the optimal solution, if you have time to reprogram Starling/feathers will probably give you a much better performing combination:
    http://forum.starling-framework.org/topic/stagevideo-with-starling-example
    3.I don`t know how you encode your Backgroundvideo, there are literally dozens of viable codecs that should differ extremly in how they stress the gpu/cpu. Maybe you have to experiment with a lower than HD resoultion and see if scaling up the background is a good compromise.

  • Adobe air with flex, file new, open and save for Desktop software program

    I already have a headache from all the searching. I cannot believe this to be such a confusing topic as every software program we create must be able to save user input, right.
    Here is the problem:
    Novel writing software program Main window has tabnavigator with four navigatorcontent pages 1. characters, 2. worlds, 3. objects, 4. Editor
    Each navigatorcontent page has user input fields in the form of textinput component, textarea component, richtexteditor component, etc.
    problem 1:
    The user needs to be able to open a new project and give it a name and state where it must be saved. All user input in the Novel writing software program must be attached to the file name the user specified - cannot give sample code cause I don't even know where to start looking anymore.
    Problem 2:
    If the user has now defined a new project name, all his input from the different input components has to be compiled into a single file that can be saved. (Dan Pichelman gave me a satisfactory answer on using the file.borwseforsave funtion.) That makes sense, but I first need to get all the user input into that single file. I was convinced that it must be an xml file and that there would be a guide on how to do this but...
    Problem 3:
    This brings me to another problem. All the pages I've researched so  far tell me how to load data from an xml file into a component, but not how to write the text from the component into the xml file. And this xml file cannot be the prefs file in the storage directory, it has to be named by the user and then after filling in all his text in the different tabs of the software, must be saved in this xml file and saved where the user chooses.
    Problem 4:
    now that the user put in his text and it is written to an xml file that he has named and set the path to, he goes on vacation and in two weeks opens his saved file to work on his project again. All the data that was stored in the xml must now be written back into the different user input components so he can continue working on his project, truth be told, there are some samles and tutorials on this subject, but again from only a single page perspective not a multiple tab perspective.
    Problem 5:
    Now the user has deleted and/or changed some text he put in when he started, he wrote some more text in the textareas and texteditor and he clicks the file - save button. The xml file or whatever needs to be used must be updated and saved with all the changes overwriting the old file.
    Problem 6:
    The data entered by the user will end up being a book of say 400 pages. This data will obviously be mostly in the richtexteditor component, so whatever method of saving is used, database or xml or whatever, needs to be able to contain all this data.
    Thought, if you are working with for instance, microsoft powerpoint, it has multiple pages all containing different user inputs and when you click flie - save, it saves all that input into one file. When I as a user opens that saved file it loads all that content back into its place and I can change and manipulate the input and save it again. I would have thought this would be one of the first things adobe or any other software would teach as this is what sofware programs are all about. But alas, the tutorials on this subject for adobe air for Desktop application is extreeeeemely rare.
    My promise is, if someone can help me with this or there is a tutorial out there that covers this properly I  will write a tutorial on this for other newbies as I progress step by step.  
    Pleeeeeeease help this ignorant novice
    Regards

    to save a file you would do something like:
    FileWriter fw = new FileWriter( fileName );
    textComponent.write( fw );
    fw.close();See the JFileChoose API for filtering files by extension. The API gives an example.

  • Textfield not working in air for android

    Hi,
    I have a weird problem. An input text component that works in air for desktop refuses to work in an air for android application.
    It draws on the screen as it should but i cant input text. Am i missing something fundamental?
    It is kind of hard to log in if i cant enter credentials
    Here is the code:
       idFmt1= new TextFormat("arial",18,0x000000);
       idFmt1.align="left";
       _inputText= new TextField();
       _inputText.defaultTextFormat = idFmt1;
       _inputText.x=150;
       _inputText.height = 35;
       _inputText.width= 150;
       _inputText.type = TextFieldType.INPUT;
       _inputText.background = true;
       _inputText.backgroundColor = 0xa0a0a0;
       _inputText.text = _initText;
       _inputText.tabEnabled = true;
       _inputText.tabIndex = 1;
       _inputText.displayAsPassword = false;
       _inputText.antiAliasType = flash.text.AntiAliasType.ADVANCED;
       _inputText.embedFonts = true;
       _inputText.alwaysShowSelection = true;
       _inputText.mouseEnabled=true;
       addChild(_inputText);

    I can't seem to get anywhere with capturing text input! I set the "type" to TextFieldType.INPUT  but this is still ignored on both the desktop and the device. If I place an input textield on the scene in Flash, that works in so far as it brings up the Android keyboard - but then nothing you type is of any consequence.
    What could I be missing?

  • AIR for IOS, ApplicationDomain problem: Error #2007: Parameter Possible symbol clash in multiple swf

    I am exporting a game for IOS in Flash CS6.
    I have isolated classes, except a framework for static utilities that do not clash, but I still get this message when exporting for IOS.
    AIR for desktop, even with ApplicationDomain.currentDomain works and does not give any error. Same on android.
    When I export the same exact project for IOS, it triggers that error randomly in different parts.
    All related with a call to a method on superclass, the instantiation of an internal class, or of a Vector typed to a custom internal class.
    TypeError: Error #2007: Parameter Possible symbol clash in multiple swfs, abcenv must be non-null.
    The line that triggers the error:
    return new RouletteChoserItemDev(num, data);
    Any help is appreciated.
    UPDATE
    I have changed the code into:
    var item:RouletteChoserItemDev;
    var MyClass:Class = RouletteChoserItemDev;
    item = new MyClass(num, data);
    Now I get this funny error:
    Error #1034: Type Coercion failed: cannot convert device.plugins.rouletteLobby::RouletteChoserItemDev@6284bc9 to .
    Yes, cannot convert to ".", a dot!

    *FOUND A SOLUTION*
    The way ApplicationDomain.sameDomain works on Android and Desktop, and on IOS, IS DIFFERENT!!!
    I probably have to file this under AIR bugs.
    Anyway:
    - In loaded SWFs, classes which are not already stored in parent SWF CANNOT be instantiated.
    I.E.
    var c:MyClass = new MyClass(); // Will not work
    var c = new MyClass(); // Will not work
    var c:MyClass = getDefinitionByName("fullpackage.MyClass"); // Will not work
    var c = getDefinitionByName("fullpackage.MyClass"); // WORKS!!!!!
    var c:DisplayItem = getDefinitionByName("fullpackage.MyClass"); // WORKS!!!!!
    So, it seems that classes stored in local loaded SWF will not be accessible directly. Even though tracing it trace(MyClass) works well, the class cannot be used in code in any place. Variables cannot be typed, and class can only be instantiated with getDefinitionByName();
    All this, is true ONLY on IOS, same exact project and settings, will not trigger any error in AIR for Desktop or for Android.
    But since obviously we use the same codebase for all devices, this IOS *feature* has to guide the way we code, even though we break a few important OOP best practices.
    Hope I spared someone else the 3 days including an entire weekend I had to invest to find this out.

  • Problems with BBC iPlayer Desktop and Adobe Air for Mac

    I would be grateful for anyone who can help me with a problem I have on my Laptop running Mac OS X Lion 10.7.3.I am having difficulty running BBC iPlayer Desktop and I suspect it is caused by Adobe Air.
    Recently I was prompted to update Adobe Air to the latest version (as of February 2012) and after I successfully updated the program, this began to cause problems when I used BBC iPlayer desktop.
    The first problem I noticed was that I was unable to play any downloaded programmes in full screen - only the sound played, not the video.
    Secondly, a few weeks after this problem began, all my TV programmes mysteriously disappeared.
    My final problem is that everytime I launch BBC iPlayer it is unable to download new programmes - when I am connected to the internet, the application still says it is "offline".
    I have tried to resolve the problem by restarting my computer, uninstalling and reinstalling BBC iPlayer, disabling and re-enabling my firewall, connecting to the internet in different locations but this has not resolved the problem.
    I tried to uninstall Adobe Air, but the installation package tells me it is 'corrupt'. So I tried to download and reinstall the application from the adobe website, but the computer already recognises that the app is installed. i.e. - I can't uninstall or reinstall Adobe Air.
    I contacted BBC iPlayer support and they were unable to help - directing me to your website. I have read several other discussion topics posted on this website but not found the solution I am looking for.
    Please can some help me to solve this problem, by helping me uninstall and reinstall Adobe Air for Mac?
    I am not very technical minded - for example - I don't know what log files are or how to find them - so please explain it as simply as possible.
    Thank you in advance for your help!
    Ryan

    Just had the same thing happen AGAIN. Suddenly - a blank iPlayer Desktop which failed to download new programmes. All previous programmes were still in the repository folder. This time the sequence I outlined previously didn't work.
    What eventually got things working this time was to reinstall Adobe Air as part of the BBC iPlayer Desktop installation process - and not separately.
    So:
    a) Move iPlayer to trash.
    b) Find and delete the following folder: Users/Yourname/Library/Preferences/BBCiPlayerDesktop.61DB7A798358575D6A969CCD73DDBBD 723A6DA9D.1
    c) Find and delete the following folder:
    Users/Yourname/Library/Application Support/Adobe/AIR/ELS/BBCiPlayerDesktop.61DB7A798358575D6A969CCD73DDB BD723A6DA9D.1
    d) Find and delete the following folder:
    Users/Yourname/Movies/BBC iPlayer/repository/cache
    e) Find and run: Applications/Utilities/Adobe AIR Uninstaller
    f) Empty the Trash. I found that bits and pieces of BBC iPlayer were still running despite having been quit and dumped in the trash - and so it wouldn't allow me to complete this part. Restarted the computer, then empty the trash.
    g) Find the folder: Users/Yourname/Movies/BBC iPlayer/repository and rename it repository2
    h) Reinstall iPlayer. It will tell you that you have no programmes to view. Quit the programme.
    i) Find and delete the folder: Users/Yourname/Movies/BBC iPlayer/repository
    j) Find the folder: Users/Yourname/Movies/BBC iPlayer/repository2 and rename it to repository.
    k) Relaunch iPlayer
    It would be terribly nice if the BBC or Adobe stopped buggering about with this . . .

Maybe you are looking for

  • Windows 2008 R2 SP1 (64bit) shared folders no longer work with Windows 7 Pro but do work with WindowsXP & Windows 2003

    As of last week, our Windows 7 Pro workstations can not map or browse the Windows 2008 Server shares. They can ping the Windows 2008 server. The Windows 7 Pro machines can still access the Windows 2003 Server Shares. The older workstations running Wi

  • Performance issues with Spry

    Hi all, I'm facing some performance issues with Spry. I'm using it for handling a menubar acting as a rollover menu : its color changes under mouse cursor, and a submenu does appear at the same time. I have no problem when working with Firefox, but i

  • Wrong Load reporting via KAL-AP form CSM to GSS

    When multiple virtual servers are configured on the same VIP (each using another TCP port), the CSM averages all the CAPP load values when reporting the final CAPP load to the GSS. Unfortunately, when a redirect vserver is configured on the same VIP

  • Missing AIR SSL in Robohelp 8 trial

    I have a purchased copy of RoboHelp7 and have dowloaded the Robohelp AIR Packager.  But, when I attempt to use the Robohelp 8 trial version to generate an AIR help system, I don't see the AIR packager in the SSL pod.  What am I doing wrong?

  • Struts actionform and checkboxes

    hi! I'm having trouble creating an actionform for a jsp that i have. Basically, my jsp lists files which have their corresponding checkboxes. The user can click multiple checkbox representing the files he wants to download. On clicking the download b