my external swf file push the stage to the left

时间:2015-06-26 10:26:30

标签: flash-cs5

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 个答案:

没有答案