Quantcast
Channel: Adobe Community : Discussion List - Using Flash Builder
Viewing all articles
Browse latest Browse all 1802

Worker Question

$
0
0

Hi, I can't get any traces from my worker swf. I have a main swf and a worker swf. The traces in the worker's constructor and the message handler when receiving messages are not showing. In the main swf, the event handler for worker running works and the listWorkers function shows there are workers. Heres the code for the worker:

 

publicfunction Worker()

                    {

  trace("BackWorker");

                              bm = Worker.current.getSharedProperty("btm");

                              mb = Worker.current.getSharedProperty("mtb");

  trace("BackWorker " + mb);

                              mb.addEventListener(Event.CHANNEL_MESSAGE, onMainToBack);

                    }

 

                    protectedfunction onMainToBack(event:Event):void

                    {

  trace("onMainToBack");

                              if(mb.messageAvailable)

                              {

                                        var header:String = bm.receive();

                                        if(header == "HELLO")

                                        {

                                                  trace("WORLD");

                                                  bm.send("WORLD");

                                        }

                              }

                    }

 

none of the traces from the worker swf is showing and I don't get a reply from the bm.send() function.

 

Anyone know why?


Viewing all articles
Browse latest Browse all 1802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>