Hi I take it this is as2
Usually to center a clip, I would use the following : clip.x = Stage.width / 2 - clip.width / 2; clip.y = Stage.height / 2 - clip.height / 2; Other than that I would start looking at how you're scoping your code by using trace(this) within your functions to see if you're scoped to the same place as the item you're trying to move Best A On May 16, 2011 8:27 AM, <a...@yonearth.com> wrote: > hi to all, > > I have a main.swf movie LT 100% 100% settings for the main.swf file etc.... > > i added a another movie called as > > loadMovieNum("slide1.swf",2 ) > > but the slide1.swf doesn't stay centered when the browser is resized.. > > i used the code given below > > > loadMovieNum("slide1.swf",2 ) > > import gs.TweenMax; > import gs.easing.*; > var main1_mc= this; > var aaa:Number = Stage.width/100; > var bbb:Number = Stage.height/100; > > TweenMax.to(_level2, 1.5, {_x: aaa * 3, _y:bbb *-4, ease:Expo.easeOut}); > > var stageListeners1:Object = new Object(); > > stageListeners1.onResize = function():Void { > var aaa:Number =Stage.width/100; > var bbb:Number =Stage.height/100; > > TweenMax.to(_level2, 1.5, {_x: aaa * 3, _y:bbb *-4, ease:Expo.easeOut}); > > }; > > Stage.addListener(stageListeners1); > > > Any additional code would be greatfull!! > > Thanks > amol > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders