Hello, how do I get the value M (received from another class through the setter. I know I get it because the trace gives me the value) to the MovieLoader function. The answers probably in front of my nose, but I just can’t see it.
package {
import flash.display.MovieClip;
import flash.events.Event;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.ProgressEvent;
public class MovieLoader extends MovieClip {
public function MovieLoader() {
var M:String;
var imageReq:URLRequest=new URLRequest(M+".swf");
var imageLoader:Loader = new Loader();
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadHandler);
imageLoader.load(imageReq);
}
public static function set scenePlay(M:String):void {
trace(M);
}
public function loadHandler(event:Event) {
var scene:MovieClip=event.target.content;
addChild(scene);
scene.stop();
}
}
}
Thanks for any help!!!