Actuate issue on exported SWC

Hi, I’m using the Actuate library on a project that is being exported for HTML5 and Flash targets. Everything works fine until I export the Flash output as a library SWC file. At this case, Actuate raises an error - It seems that flash.Lib.current ( is never set if I’m using the SWC.

Since the Flash export directly from OpenFL works as expected (and Lib.current is correctly set), I believe that some initialization is not being made by my Apache Flex code. Does anyone know what I need to do to initialize this Lib.current (and any other needed Haxe variables) on the code I import the SWC into?

What if you create a “flash.Lib” class in AS3, and set “current” from your document class?

public function MainClass () {
    super ();
    Lib.current = this;

Might work?

Thank you for the idea. It worked like a breeze :wink:

1 Like

If you have ideas for how we could make things work better automatically on our end, let me know. This one’s a little tricky, because I think the Stage reference has to come from the user’s code somewhere

Ok, Joshua. I don’t see how it could be done automatically, but I’ll keep my eyes open for ideas :wink: