Yes that works of course. But I am trying to understand why AS3 do this thing. What is wrong? Is it just bug?
2010/5/6 Mattheis, Erik (MIN - WSW) <[email protected]>: > Duh, just realized I replied in the wrong thread. Got me why that's > happening, but a fix: > > What about just saying > > nav.btnBack.gotoAndStop(1); > nav.btnNext.gotoAndStop(1); > > ________________________________________ > From: [email protected] > [[email protected]] On Behalf Of natalia Vikhtinskaya > [[email protected]] > Sent: Wednesday, May 05, 2010 8:32 AM > To: Flash Coders List > Subject: [Flashcoders] Adding MC with some frames from library > > Hi > I met situation with AS3 that I can not explain or even understand > where I should look answer. > Simple example. > In library I have simple movie clip with linkage class name nav. This > mc has mc2 with two frames. In frame 1- stop(). > On the stage I add this nav > function init():void{ > var nav:Nav=new Nav(); > nav.x=200; > nav.y=200; > addChild(nav); > } > init(); > > nav is on the stage correctly. Mc2 in frame 1. > But if I use another way > function init(e:Event):void{ > var nav:Nav=new Nav(); > nav.x=200; > nav.y=200; > addChild(nav); > } > > btn.addEventListener(MouseEvent.CLICK,init); > nav is on the stage but mc2 somehow stops in frame2. > Please can anybody explain this situation? > Thanks in advance. > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

