You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Mark Line <ma...@gmail.com> on 2013/03/15 15:06:07 UTC

Wokers in library projects

Bit of a random question but I thought someone on here may know if it's
possible.

 

Has anyone managed to use AS3 workers with in a library project?

 

Currently I embed the worker with into the project (the default way Flash
builder tries to get add a worker).  I can't however use  the "embedded"
meta tag in a pure AS3 project.

 

For example this won't work for me: 

 

[Embed(source="workerswfs/uk/co/fujifilm/WordParserWorker.swf",
mimeType="application/octet-stream")]

 

I experimented using  "Worker.current.isPrimordial" then creating a worker
from "worker = WorkerDomain.current.createWorker(this.loaderInfo.bytes);"

 

Although this.loaderInfo will only be valid if I've added the class to the
display list, as the worker I want to use is just for processing data I
don't really want to add it to the display list as it's a bit of a hack and
I'll have to clear up after it.

 

I'm compiling everything with Apache Flex 4.9 targeting fp 11.5 and air 3.5