-
1. Re: Providing a reference to the Stage in a Pure AS3 Environment
Michael Labriola Feb 24, 2011 2:05 PM (in response to JonnyReeves)You mention you are in a pure AS3 environment, but the code below says things like mx.core::Container which is Flex.
So, at least 2 things
1) You have the Flex version of the FlexUnit.swc not the ActionScript-only version. You mention the ant tasks, so it is possible that our ant tasks are doing something wrong and including the wrong version for you
2) When it is complied it is using Flex libraries. This code would actually crash with a verify error on startup if you were using the Flex version of FlexUnit and compiling in an ASOnly environment. The fact that it runs this far means it is the FlexUnit version of the SWC and it is actually compiling in Flex classes too.
The specific cast you mention is crashing because in a Flex version of the project, the visual root ends up being an IUIComponent.
The ant tasks are not my specialty, but let me take a look and see what I see. The ultimate issue though is the library.
Mike
-
2. Re: Providing a reference to the Stage in a Pure AS3 Environment
Michael Labriola Feb 24, 2011 2:07 PM (in response to Michael Labriola)Side note:
To keep moving forward you could do exactly what you mentioned. You could just make a static class in your test project that you assign the stage reference to at startup and grab it during your tests.
Obviously want to fix this for you, but just noting that is viable in the meantime.
Mike

