my external swf file push the stage to the left

21 views Asked by At

When I test movie in Adobe flash cc, my external swf file push the stage to the left side of the screen.

import flash.display.MovieClip;
import fl.motion.MotionEvent;
import flash.display.StageAlign;

panelnewbtn.addEventListener(MouseEvent.CLICK, goToAgenda9);

function goToAgenda9(event:MouseEvent):void
{
    gotoAndStop("agenda");
    loader.unloadAndStop();
    removeChild(loader);
    loader = null;
}

var Xpos:Number=0;
var Ypos:Number=0;
var swf:MovieClip;
var loader:Loader = new Loader();                     
var defaultSWF:URLRequest = new URLRequest("Data/talk2/Presentation - Mumbai-2.swf");
loader.load(defaultSWF);                                     
loader.x = Xpos;                                          
loader.y = Ypos;

function loaded(event:Event):void 
{ 
    var content:Sprite = event.target.content; 
    content.scaleX = 0.5 ; 
}

addChild(loader); 
0

There are 0 answers