Saturday, May 19, 2018

How to Import External .swf into Flash File using AS3.0

import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.display.MovieClip;


var urlReq:URLRequest = new URLRequest("SWF/The Last Samurai.swf");////------location of that .swf
var loader:Loader = new Loader();
    loader.load(urlReq);
    addChild(loader);///---------add loader into stage
    loader.x = 0;///---------------x position on stage
    loader.y = 0;///---------------y position on stage
    loader.scaleX = loader.scaleY = .5;///------------make loader smaller  if necessary

No comments:

Post a Comment

Please, do not enter any spam link in the comment box.