Is it possible to use workers if one develops in the Flash IDE?

I've been tryting to get the new concurrency feature working - I downloaded Flash CC and have the latest versions (11.7) of the player and plug-ins installed. But - none of the code from the forums or AS3 reference works (and yes, I've tweaked it so it compiles either as an external as class or as timeline code).
There are no errors, but Worker.isSupported returns false.
I'm a very confident coder (usually), but this has me completely stumped....

Yes. You should be able to use workers. Workers can only be used for background processing. There are mechanisms for communication with workers using shared properties and channels.
Check the url below.
http://help.adobe.com/en_US/as3/dev/WS2f73111e7a180bd0-5856a8af1390d64d08c-7ffe.html
I am also sharing a simple sample which shows usage of worker.
Loader movie which is loading the worker (LoaderMovie.swf)
package  {
          import flash.display.MovieClip;
          import flash.net.*;
          import flash.events.*;
          import flash.concurrent.*;
          import flash.utils.ByteArray;
          import flash.system.Worker;
          import flash.system.*;
          import flash.events.Event;
          public class LoaderMovie extends MovieClip {
                    private var worker:Worker;
                    public function LoaderMovie() {
                              // constructor code
                              //Load the swf for worker
                              var workerLoader:URLLoader = new URLLoader();
                              workerLoader.dataFormat = URLLoaderDataFormat.BINARY;
                              workerLoader.addEventListener(Event.COMPLETE, loadComplete);
                              workerLoader.load(new URLRequest("simpletween.swf"));
                              this.addEventListener(Event.ENTER_FRAME, handleEnterFrame);
                    public function loadComplete(evt:Event):void
                              var workerBytes:ByteArray = evt.target.data as ByteArray;
                              worker = WorkerDomain.current.createWorker(workerBytes);
                              worker.addEventListener(Event.WORKER_STATE, workerStateHandler);
                              worker.setSharedProperty("counter", 10);
                              worker.start();
                              this.play();
                    public function workerStateHandler(evt:Event)
                              if(worker.state == WorkerState.RUNNING)
                                        this.WorkerStateText.text = "Worker Running";
                              else if (worker.state == WorkerState.NEW)
                                        this.WorkerStateText.text = "Worker created";
                    public function handleEnterFrame(evt:Event)
                              if(worker)
                                        this.WorkerCounter.text = worker.getSharedProperty("counter");
The worker movie clip (simpletween.swf)
package  {
          import flash.display.MovieClip;
          import flash.net.*;
          import flash.events.*;
          import flash.system.*;
          public class simpleTween extends MovieClip {
                    public function simpleTween() {
                              // constructor code
                              this.play();
                              this.addEventListener(Event.ENTER_FRAME, handleEnterFrame);
                    public function handleEnterFrame(evt:Event)
                              var counter:int = Worker.current.getSharedProperty("counter");
                              counter = counter + 10;
                              Worker.current.setSharedProperty("counter", counter);
Hope this helps
Vinod
Engineer
Flash Pro CC

Similar Messages

  • Use more than one transition in the same time between two video clips?

    Dear Premiere Pro programmers,
    Could you please create a way to use more than one transition in the same time between two video clips without exporting to media, or creating new sequence, or using another layer (adjustment or transparent)?
    Message was edited by: Kevin Monahan
    Reason: Next time, create a more descriptive title.

    Hi Aqsa Nori,
    I'm not sure what you are imagining, but it might be possible to achieve by key framing effects. Can you tell us what you want to do? Also, please feel free to file a feature request: http://adobe.ly/feature_request
    Thanks,
    Kevin

  • Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes? Both my daughters have ipods, my wife has one

    Dear All
    Can anyone give me simple instructions on how to use more than one ipod on the same computer with itunes. My daughters have a different generation 'nano' each & my wife a 'shuffle'?
    Many thanks

    Click here for options.
    (69081)

  • I am using iphone 5 one corner of the screen has bulged its started to come out from place

    Dear Sir,
    I am using iphone5
    Presently one corner of the screen bulged. It has started to come out.
    Regards
    M.K.Nazar
    +******
    <Personal Information Edited by Host>

    Hello mknazar,
    Thanks for using Apple Support Communities.
    If you're iPhone is experiencing an issue where the screen appears to be coming out of the bezel, please seek service for the iPhone.  In the article below you can learn on how you can obtain service.
    Apple - Support - Service Answer Center
    Take care,
    Alex H.

  • Reply address: is it possible to use another reply address other than the pop address used in my account. I have a special work account and would like to send emails with that address as my reply address...or sent from address

    Reply address: is it possible to use another reply address other than the pop address used in my account. I have a special work account and would like to send emails with that address as my reply address...or sent from address

    i found out how to do this finally!
    1) set up google gmail account to forward your emails to (from the [email protected])
    2) go to your gmail account
    3) go to settings (cog in right hand corner)
    4) go to 'accounts and import'
    5) go to 'send mail as'
    6) click 'Add another email address you own' - add your [email protected] address
    7) google will send a verification email with code to that email address.
    8) enter code
    9) go back to gmail account  >'send mail as' and select 'make default'
    10) close mac 'mail' program and reopen it.
    as long as you have gmail account selected as the primary account in MAIL - mail will now come throught as being sent from that  [email protected] address!!

  • Is it possible to use more than one external hard drive for Time Machine backups?

    I want to use two hard drives for Time Machine backups.
    Bigger one keep at home and be sure it is safe.
    Second one (very small pocket size) keep with me for travels.
    I want to backup to both drives to be sure I can restore everywhere and to be sure if something bad happened with my small travel disk I can restore from home backup.
    Is there any problem with listed schema? Is it normal for Time Machine to handle backups for different drivers and keep everything consistent and smooth?

    I really need some help!  I have been using an Iomega NAS 1TB HD for the past year.  And I received an error message.  I believe I have ran out of memory on this drive.
    Then recently in the last couple of months I got a ReadyNAS Duo 2TB with 2TB RAID.  Should I switch my back ups to this one and delete the other back up file or keep the old back up image file on the Iomega?
    Can I transfer the old image back up to this new ReadyNAS? How do I do this?
    I appreciate any help.

  • Is it possible to use more than one value in SUPPRESSCHARACTER option

    Hi,
    Is it possible to Suppress more than one value uisng SUPPRESSCHARACTER option in transformation file?
    if yes, any syntax?
    I have 'Z' and '1000' that i wish to suppress from the values being loaded. Any thoughts ?
    Thanks.

    HI,
    i don't really know if it's possible to suppress more than one character, but you can do load your data in two steps in the first step skip all the information that has the Z character in your conversion file and skip all 1000 values, then repeat the process but this time skip the 1000 values and then suppress the Z value...
    hope this helps,

  • TDMS: is it possible to use sender and receiver client within the same SID

    Hi all
    I have a general question about TDMS: i always read that it is possible to refresh data from a productive system/client to a test system/client, e.g. PRD100 => DEV100. But is it also possible to refresh data from one sender-client to the receiver-client inside the same system using TDMS, e.g. DEV100 => DEV200.
    i'm asking because if i start to build up a new client using tdms the first step is to build up the client using package "ERP Initial Package for Master Data & Customizing". This includes under point "data transfer" the step "lock the system" with teh following description:
    Lock System
    Activities
    During data deletion in the receiver client, the tables are dropped. All clients in the system are affected by this procedure. Consequently, all users in all clients in the receiver system must be temporarily locked while the data deletion takes place.
    The function for this activity locks only the current client. If the receiver system is a single client system, it is sufficient to execute the function. If, however, the receiver system is a multi-client system, the user in the other clients must be locked using standard means.
    Anyone has any experience with this scenario inside the same system?
    Regards
    Adrian

    You can run TDMS package on the same system and between different clients. However SAP don't recommend to run TDMS package on the same system.
    There are 2 ways to delete data in receiver system: Array delete and drop insert.
    You have to use Array Insert only which is usually very slow as it first select all the relevant entries from the tables in the target client and then drop it. So, it is slow.
    Drop insert is much optimized and fast but the same can not be used in this use case.
    That is the reason SAP don't recommend to have TDMS run in same system.

  • Is it possible to use bootcamp to install windows on a flash drive (rather than an HD partition)?

    I would like to run windows on my Mac preferably from a flash drive, or an external drive. I don't want to install it locally because I don't have enough HD space. I've found a few sites and videos that show you how to do this from a PC (like this one http://www.youtube.com/watch?v=vh-F6dcXmsE) but I don't have a PC and I'd like to know if it's possible to use bootcamp to accomplish this.
    Thanks very much for any help! Would be greatly appreciated.

    If you have Windows-to-Go, it can be installed on an external disk, otherwise Windows licensing restricts it. Bootcamp has additional checks to enforce such licensing.
    You can always install it on an internal drive first and then put the drive in a USB enclosure.

  • Using more than one camera at the same time..

    Hello every body..
    I have a problem with dealing with java media frame work and i want to solve the problem as fast as i can since it will delay my work..
    I hope that any one can hep me..
    I post this problem previous but i don't have agood answer i want to knew if this problem can be soved or not and if can be solved How???
    The problem:
    If any one use JMF Studio it is known that any one can captre any device connected such as ( camera , mic,...) using JMFStudio..
    I do the capturing very well but the problem i face it is HOW I CAN CONFIGURE MORE THAN ONE CAMERA AT THE JMF??
    If i connect 2-cameras from different types ( sony , web cam) then the jmf registary will register the 2-cameras with only one difinition is( vfw:Microsoft WDM Image Capture (Win32):0 ) so when i use the java code to access the 2-cameras then i found only one difinition for one camera and i can access only one camera!!!!!!!!!
    I don't know how i can solve this problem??
    please help me !!
    For reply or any information contact me at my e-mail
    [email protected]

    Please Help me .....!!!!
    If the Sun Community Forums don't Help me who will help me at my problem??????!!!!!
    Help Me!!1

  • Is it possible to use an external controller, such as the Digi002?

    I use a Digi002 (mixer/transport controller) with ProTools.  Is it possible to use FinalCutPro X with the same contoller?  If so, how do I set it up?
    thanks,
    Geoff

    gmrsamson wrote:
    I use a Digi002 (mixer/transport controller) with ProTools.  Is it possible to use FinalCutPro X with the same contoller?  If so, how do I set it up?
    thanks,
    Geoff
    Geoff,
    I believe the Digi stuff is proprietary. Digi won't let the Transport/Mixer work with any other DAW system including Apple's Logic Pro so I doubt if it's going to work with FCPX.
    Digi does have an audio driver that allows the 002 to be used as a simple MIDI/Audio OSX but that's about it.
    pancenter-

  • HT201250 Is it possible to use Dropbox or Microsoft OneDrive as the backup disk for time machine?

    I have a MacBook Pro for which I have not set up Time Machine. I have a Dropbox account and a Microsoft OneDrive account, each with plenty of space to serve as backups. Is it possible to use either of these as THE backup disk for Time Machine? It doesn't appear intuitive from Time Machine on my MBP.
    Thank you.

    No. Time Machine does not work with "cloud" drives.

  • In Windows 7 Professional, Firefox suddenly started using more than one symbol on the taskbar... Why?

    After installing Firefox it placed a symbol in the taskbar from which to launch it. When moving the mouse above this symbol it would then also display the various tabs that were open in the browser. So, the program was launched from and operating inside this ONE Firefox symbol on the taskbar... there was never (at any given point), more than one symbol.
    Now suddenly it started opening a second Firefox symbol in the taskbar in which the browser actually runs and displays the open tabs. In other words I now have one Firefox symbol in the taskbar to launch the browser, and another, second symbol in which the browser runs. I don't want this because it takes up too much space on the taskbar. How can I get back to keeping Firefox limited to one symbol on the taskbar at all times?

    Is the first icon "pinned" to the Windows 7 Task Bar in an earlier version? Could you try unpinning and repinning Firefox and see whether that helps?
    (I think someone posted this same question yesterday, but I can't find that thread at the moment.)

  • Use compiled Box2D.swc from samples in Flash IDE?

    Hi,
    I downloaded Crossbridge and compiled the sample in Example_Box2D directory. I got HelloWorld.swf and Boxes.swf which work great, but how can I use Box2D.swc library in Flash IDE? It seems to be not working there.
    What I'm trying to do is get Box2D v2.2.1 flash port to use it in Flash IDE. I know there's an existing port made with old Alchemy, but those Box2D version is 2.2.0 and I need 2.2.1. Please help, I really get stuck with this problem.

    Hi,
    I downloaded Crossbridge and compiled the sample in Example_Box2D directory. I got HelloWorld.swf and Boxes.swf which work great, but how can I use Box2D.swc library in Flash IDE? It seems to be not working there.
    What I'm trying to do is get Box2D v2.2.1 flash port to use it in Flash IDE. I know there's an existing port made with old Alchemy, but those Box2D version is 2.2.0 and I need 2.2.1. Please help, I really get stuck with this problem.

  • Is it possible to use a different Adobe account to the one you downloaded the software with on a machine with it not screwing with another versions on that account?

    I  have 2 adobe accounts, one is my CS5 student license on my mac and one is as a CC trial on this PC.
    The trial has run out and I want to buy the CC subscription for my PC but I cant because I signed up with a wrong email address for this account so cant log in to buy it and Adobe customer services are taking over 24 hours to get back to me.
    For reference heres a better idea of my situation:
    https://forums.adobe.com/message/7480974#7480974
    Is it possible to buy the CC on my account associated with the account/software on my Mac onto this computer? (On that account I have already done the 30 day trial and also had it for under 30 days before cancelling CC and going back to CS5).
    Or is it only possible to install the software with the specific account you signed up with? As when I have access to my Mac I would like to still use my CS5 on that but CC on this PC.(I really don't want to risk somehow screwing it up so I cant use my CS5)
    Thanks a lot
    V

    In case the email is incorrect & it can not be verified then you can abandon that Adobe id, if you have purchased CC with incorrect Email, then you need to get the CC cancelled & buy a new CC with correct Email ID.
    Please personally inbox me the incorrect Email ID for further investigations.
    Regards
    Rajshree

Maybe you are looking for