Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Published application Issues #13

Closed
polar1225 opened this issue Jan 13, 2016 · 3 comments
Closed

Published application Issues #13

polar1225 opened this issue Jan 13, 2016 · 3 comments

Comments

@polar1225
Copy link

Hi Frédéric
I got the same issuse as this post:#3
I can get it worked by adding the compiler option -optimize=false,By I want to optimize the swf by the complier.So I change the code in Thread.as:
const file:FileReference = new FileReference();
file.save(swfBytes, "Worker.swf");
Save the swf in debug mode.Embed the swf.
create the worker by swf bytes:_worker = createWorkerFromSWF(swfBytes,workerDomain);
But it does not work in release version,
Any Idea? Thanks..

@doublefx
Copy link
Owner

If you give me the small project that demonstrates what you are saying, I could have look.

@polar1225
Copy link
Author

General speaking,i save the swf created by as3swf in debug mode.Create the thread worker by this swf instead.It seems like threads are never responding in publish application..

@doublefx
Copy link
Owner

Indeed, it won't work like that as the application has not set all the shared properties and message channels that easyworker provides.

But if your use case is to create a Worker with easyWorker, save it as swf, then eventually use the optimizer on it, embed it or load it into another application and call the flash.system.Worker.createWorker to use it, I guess you can extend Thread, override the constructor to plug the optimized worker with the easyWorker shared properties and message channels, just remove the call to the reflection parts and createWorkerFromSWF.

Does it make sense ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants