all groups > flash actionscript > january 2007 >
You're in the

flash actionscript

group:

rollover link


rollover link MoizeShah
1/1/2007 5:13:13 PM
flash actionscript:
plz can someone help me, how do you create a rollover link like when you
rollover it takes you to a differen frame i am trying to create something like
on http://www.zune.net at the bottum of the page where multiple objects are
moving when the mouse is over one
Re: rollover link kglad
1/1/2007 5:25:47 PM
Re: rollover link kglad
1/1/2007 10:24:53 PM
if your movieclip buttons have instance names btn1, btn2,...btn10, try:





tl=this;
for(var i=1;i<=10;i++){ // <- this is a loop used to code for all your button
rollOver handlers
tl["btn"+i].onRollOver=function(){ // <- this is a rollOver handler
for(var j=1;j<=10;j++){ // this loop is used to shrink all the buttons
(including this one which we don't want but will fix soon)
tl["btn"+j].gotoAndPlay("shrink"); // this is your frame where you start the
animation of your movieclips shrinks (and maybe fading)
}
this.gotoAndPlay("expand"); // this line stops the current button (this one
being rolled over) from shrinking and expans it
}
}
AddThis Social Bookmark Button