We've a Flex project that needs to load a Flash 8 movie
(AS2). The movie has a masking which doesn't seem to render well in
Flex (when loaded for second time). Appended below is the code and
attached is the project.
private function initApp():void
var loader:Loader=new Loader();
var urlReq:URLRequest=new URLRequest("for_musk.swf");
var loader2:Loader=new Loader();
var urlReq2:URLRequest=new URLRequest("for_musk.swf");
var ui:UIComponent=new UIComponent;
var ui2:UIComponent=new UIComponent;
The SWF file (being loaded) has the following code to
illustrate a general masking:
var _mc1:MovieClip = this.createEmptyMovieClip ("mc1", 1);
The result is that whichever instance of the SWF gets loaded
first produces the correct result (in terms of masking). The second
one falters and shows the mask as well as the underlying movie (and
doesn't perform the masking function).
Also, the getBounds method of Flash generates
‘undefined’ values for the instance that was loaded
We have added textbox to track down the moviecilp structure
and getBounds values.
hitTest is also behaving and producing weird results for
these type of situations.