Hi,
The following code is cute:
var Xpos:Number = 0;
var Ypos:Number = 0;
var SWF:MovieClip;
var loader:Loader = new Loader();
loader.x = Xpos;
loader.y = Ypos;
var newSWFRequest:URLRequest = new URLRequest("HandBook.swf");
loader.load(newSWFRequest);
BookHolder.addChild(loader);
The problem comes only when I add the following 2 lines at the bottom of the code:
The "HandBook.swf" external file doesn't load andy no any error as well. Where I did the mistake?
loader.width = 600;
loader.height= 400;
(Note: Actual "HandBook.swf" file width & heigt is 1000 x 700)
Please help me.
When you are trying to load anything through the loader, it doesn't allow to specify its height and width. If you specify those, object doesn't displayed on the stage. I dont know the exact reason. But I experienced it many times. Instead fo loading swf, load swc file of that component and pass height and width as you want.
Thanks for your reply.
The following code is working fine (greensock tweenMax):
var mySwf1:SWFLoader = new SWFLoader("MainSWF/Books.swf", {width:650, height:475, container:this, onComplete:completeHandler1});
mySwf1.load();
function completeHandler1(event:LoaderEvent):void {
TweenLite.to(event.target.content, 0,{alpha:0});
TweenMax.fromTo(event.target.content, 3, {x:0, y:0, width:650, height:475, alpha:.5}, {x:0, y:0, width:650, height:475, alpha:1, delay:1});
}
North America
Europe, Middle East and Africa
Asia Pacific