Hi all,
i tried to get duplicate swf using from event.target.content.constructor(); its working fine but keep getting the following message appear in my logs:
"Warning: An ActionScript 1.0/2.0 SWF file has loaded an ActionScript 3.0 SWF; code in the ActionScript 3.0 SWF will not run."
I know the CS3 swf has been produced using Actionscript 3 as it's settings and published for FP9. It does nothing more than a motion tween of a graphic.
Here is a really simple example of how to emulate the problem:
ActionScript Code:
package{
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLRequest;
[SWF(backgroundColor=0x000000)]
public class Test extends Sprite{
private var _mc:MovieClip;
public function Test():void{
var mc:String = "rain.swf";
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loadedSWF);
ldr.load(new URLRequest(mc));
}
private function loadedSWF(event:Event):void{
var duplicateMC = MovieClip(new event.target.content.constructor());
this.addChild(duplicateMC);
}
}
}
I need help from this issue pls help me any one friends....
Thanks.
North America
Europe, Middle East and Africa
Asia Pacific