surfjoe
asked on
Bring button to top on mouse over
I have a gallery style page of small thumbnail image buttons. When the user rolls over each button it needs to enlarge to twice the size and display over the thumbnail images allside of it. Whe the user rolls of the button it needs to return to the original size. I am currently enlarging the buttons on roll over by setting the size on the button over state (frame 2 and 3) of the button library file but cannot get the button to appear on top when the user rolls the mouse over.
I have tried this but I get an error
on (rollOver) {
//Bring to Front Behavior
mx.behaviors.DepthControl. bringToFro nt(this);
//End Behavior
}
Thanks in advance
I have tried this but I get an error
on (rollOver) {
//Bring to Front Behavior
mx.behaviors.DepthControl.
//End Behavior
}
Thanks in advance
ASKER
If I add the code on the actions layer with an instance of myMC on the stage I get and error but if I add
on (rollOver) {
swapDepths(1000);
}
to the movie clip it works.
Have do I reset the size when the mouse rolls out back to original size?
Thanks
on (rollOver) {
swapDepths(1000);
}
to the movie clip it works.
Have do I reset the size when the mouse rolls out back to original size?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi surfjoe,
just for your knowledge,
you code is not functional because..."mx.behaviors.De pthControl .bringToFr ont" does not work with Buttons,
it only support MovieClip...
if you use MovieClip instead of Button, you original code will work fine.
Rgds
Aneesh
just for your knowledge,
you code is not functional because..."mx.behaviors.De
it only support MovieClip...
if you use MovieClip instead of Button, you original code will work fine.
Rgds
Aneesh
and the easy code will be
on (rollOver) {
myMC.swapDepths(1000)
}
Regards,
Ramy