It would be interesting to see an example of how it could work. There is the class mx.core.SimpleApplication that you can try to use as the base for a Worker. If that doesn't work it might be possible to create a variant that behaves within the constraints of a Worker.
-Alex On 3/12/14 2:55 PM, "Sean Thayne" <s...@skyseek.com> wrote: >Sounds like a very strange way to use workers. > >-Sean Thayne > > >On Wed, Mar 12, 2014 at 3:18 PM, Alex Harui <aha...@adobe.com> wrote: > >> So really, what you want is to use MXML to define a SWF that can be used >> as a Worker, right? >> >> On 3/12/14 1:23 PM, "Gary Yang" <flashflex...@gmail.com> wrote: >> >> >Greg, >> > >> >I agree with you on the display list thing. >> > >> >But I am not using any display list features in worker, I am trying to >> >build a reactive model with Flex's binding, meta tag processing, >> >collection >> >classes, PropertyChangeEvent. This reactive model will pass changes to >>the >> >main UI thread to drive UI, and user input will be passed back to >>reactive >> >model as a trigger input. >> > >> >For long run, the best solution would be divide Flex into different >> >modules, https://issues.apache.org/jira/browse/FLEX-34138; >> >But for now, please just make it usable. >> > >> >Thanks. >> > >> >Thanks. >> > >> >-Gary >> > >> > >> > >> > >> > >> > >> >On Wed, Mar 12, 2014 at 4:05 PM, Greg Dove <greg.d...@gmail.com> wrote: >> > >> >> I can't imagine using a flex application as a worker. I don't think >> >>Workers >> >> can access the main display list/stage, and a flex application >>expects >> >>to >> >> do so. It may be because of this that you are seeing the error >>because >> >> ContextMenu is not available on Android, and that part is nothing to >>do >> >> with Flex. >> >> >> >> >> >> >> >> >> >>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ >> >>ui/ContextMenu.html >> >> *AIR profile support:* This feature is not supported on mobile >>devices >> >>or >> >> AIR for TV devices. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> On Thu, Mar 13, 2014 at 8:14 AM, Gary Yang <flashflex...@gmail.com> >> >>wrote: >> >> >> >> > You have to support it!!! >> >> > >> >> > Flex's binding, [remote class], collection data models are critical >> >>for >> >> > building reacting model which is a key for complex application and >> >>this >> >> is >> >> > Flex's core value! >> >> > >> >> > It's already working for Flash Player in browsers, if you can add a >> >>few >> >> > lines to make sure >> >> > >> >> > var defaultMenu:ContextMenu = new ContextMenu(); >> >> > >> >> > won't kill the initialization process, it will be good for now!! >> >> > >> >> > For the future, I would like to recommend to take a look at Java >> >>Spring's >> >> > growth. >> >> > >> >> > Please!! >> >> > >> >> > >> >> > >> >> > >> >> > On Wed, Mar 12, 2014 at 2:49 PM, Alex Harui <aha...@adobe.com> >>wrote: >> >> > >> >> > > You're trying to run a Flex SWF as a worker and not the main >>app? I >> >> > doubt >> >> > > that is supported. >> >> > > >> >> > > -Alex >> >> > > >> >> > > On 3/12/14 8:43 AM, "Gary Yang" <flashflex...@gmail.com> wrote: >> >> > > >> >> > > >https://issues.apache.org/jira/browse/FLEX-34137 >> >> > > > >> >> > > > >> >> > > >On Wed, Mar 12, 2014 at 10:26 AM, Gary Yang >> >><flashflex...@gmail.com> >> >> > > >wrote: >> >> > > > >> >> > > >> Error: Error #3731: This feature is not available within this >> >> context. >> >> > > >> at >> >> > > >> >> >> > > >> >> > >> >> >> >>>>>>spark.components::Application/initContextMenu()[/Users/justinmclean/D >>>>>>oc >> >>>>um >> >> > > >> >> > >> >> >> >>>>>>ents/ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/ >>>>>>Ap >> >>>>pl >> >> > > >>ication.as:1832] >> >> > > >> at >> >> > > >> >> >> > > >> >> > >> >> >> >>>>>>spark.components::Application/initialize()[/Users/justinmclean/Docume >>>>>>nt >> >>>>s/ >> >> > > >> >> > >> >> >> >>>>>>ApacheFlex4.12.0/frameworks/projects/spark/src/spark/components/Appli >>>>>>ca >> >>>>ti >> >> > > >>on.as:1385] >> >> > > >> at AppMain/initialize() >> >> > > >> at >> >> > > >> >> >> > > >> >> > >> >> >> >>>>>>mx.managers.systemClasses::ChildManager/childAdded()[/Users/justinmcl >>>>>>ea >> >>>>n/ >> >> > > >> >> > >> >> >> >>>>>>Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/manag >>>>>>er >> >>>>s/ >> >> > > >>systemClasses/ChildManager.as:197] >> >> > > >> at >> >> > > >> >> >> > > >> >> > >> >> >> >>>>>>mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[/U >>>>>>se >> >>>>rs >> >> > > >> >> > >> >> >> >>>>>>/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/framewor >>>>>>k/ >> >>>>sr >> >> > > >>c/mx/managers/systemClasses/ChildManager.as:367] >> >> > > >> at >> >> > > >> >> >> > > >> >> > >> >> >> >>>>>>mx.managers::SystemManager/initializeTopLevelWindow()[/Users/justinmc >>>>>>le >> >>>>an >> >> > > >> >> > >> >> >> >>>>>>/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/mana >>>>>>ge >> >>>>rs >> >> > > >>/SystemManager.as:3065] >> >> > > >> at mx.managers::SystemManager/ >> >> > > >> >> >> > > >> >> >> > > >> >> > >> >> >> >> >> >>http://www.adobe.com/2006/flex/mx/internal::kickOff()[/Users/justinmclean >> >> > > >> >> > >> >> >> >>>>>>/Documents/ApacheFlex4.12.0/frameworks/projects/framework/src/mx/mana >>>>>>ge >> >>>>rs >> >> > > >>/SystemManager.as:2851] >> >> > > >> at mx.managers::SystemManager/ >> >> > > >> >> >> > > >> >> >> > > >> >> > >> >> >> >> >> >>http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[/ >> >> > > >> >> > >> >> >> >>>>>>Users/justinmclean/Documents/ApacheFlex4.12.0/frameworks/projects/fra >>>>>>me >> >>>>wo >> >> > > >>rk/src/mx/managers/SystemManager.as:2731] >> >> > > >> at flash.events::EventDispatcher/dispatchEventFunction() >> >> > > >> at flash.events::EventDispatcher/dispatchEvent() >> >> > > >> at >> >> > > >> >> >> > > >> >> > >> >> >> >>>>>>mx.preloaders::Preloader/timerHandler()[/Users/justinmclean/Documents >>>>>>/A >> >>>>pa >> >> > > >> >> > >> >> >> >>>>>>cheFlex4.12.0/frameworks/projects/framework/src/mx/preloaders/Preload >>>>>>er >> >>>>.a >> >> > > >>s:572] >> >> > > >> at flash.utils::Timer/_timerDispatch() >> >> > > >> at flash.utils::Timer/tick() >> >> > > >> >> >> > > >> >> > > >> >> > >> >> >> >>