function down(e:MouseEvent):void{ var _obj:Button = e.target Button;
TweenMax.to(obj.menuSquare_mc, .3, {alpha:.06, delay:0, ease:Sine.easeOut}); } > Date: Thu, 7 May 2009 09:29:05 -0500 > From: zu...@zadesigns.com > To: flashcoders@chattyfig.figleaf.com > Subject: [Flashcoders] e.target subobjects how do I refrence?? > > > > I have a loop that is assigning event listeners to "target". My targets > are named btn1, btn2, btn3, etc etc. > > inside each btn, I have a movie clip called "menuSquare_mc" which I want > to animate. how can I target menuSquare_mc of each button using only 1 > function??? > > function down($e:MouseEvent ):void { > > trace($e.type + " : " +$e.target ) ; > > if ($e.type == "mouseOver") { > > TweenMax.to($e.target.menuSquare_mc, .3, {alpha:.06, delay:0, > ease:Sine.easeOut}); > > } > > } > > the above code fails... I want it to say btn1.menuSquare_mc, > btn2.menuSquare_mc, etc) using just 1 function... > > in fact, my idea would be to use if $e.type == "mouseDown" do another > function just like the over and one just like the out. > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _________________________________________________________________ 上MClub和Messenger好友一起都市寻宝! http://club.msn.cn/?from=1 _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders