Script a button for its rollover state?

Does anyone know if it is possible, via AS3, to change the button to its rollover state, if it is not, actually rolled over?

The client decided late in the process to ask for some other elements to affect button states. If I knew I would use clips instead of buttons.

Thanks for any advice.

+1


a source to share


3 answers


Have you tried manually calling gotoAndStop (2)?



If none of the above solutions work, you will have to either subclass the SimpleButton, link it to your symbols, or rebuild into MovieClips

+1


a source


Manually dispatch rollover event? Also, I see no other way. I am curious, however, what requirement (s) would ask such a weirdness.



+1


a source


You can open the properties of any library display object and change it to a button, graphic, or movie clip type. this should then allow you to change the instance type to a button and retain rollover capabilities while still allowing "gotoAndStop" actions on the instance. I'm not entirely sure if this works and this thread is outdated, but if anyone has the same problem it will be worth it. This assumes you are not creating SimpleButtons dynamically.

0


a source







All Articles