import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
function loadSwf(swf:String){
var loader:Loader = new Loader();
var request:URLRequest = new URLRequest(swf);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(request);
}
function loadComplete(e:Event) {
addChild(e.currentTarget.content);
}
loadSwf("yourswf.swf");
Welcome to my actionscript snippet library!
Actionscript Snips is a small repository of actionscript code that aims to save developers and designers time when developing a website.
Showing posts with label Swf. Show all posts
Showing posts with label Swf. Show all posts
Loading An External Swf
This code can be used to load an external image or swf.