Skip to main content
Inspiring
May 3, 2006
Answered

Simulating a button press

I was just wondering if it is possible to simulate the onPress event for a button. For example, lets say I have the button "layers" and want to simulate the onPress event for it using actionscript. Is this possible or does it actually have to be clicked on? I hope I am missing something obvious here! Thanks in advance.
This topic is closed to new replies. Start a new post to keep the conversation going.
kglad
kgladCorrect answer
Community Expert
May 3, 2006
you can execute all the code of a button without a button press, but to control the button's appearence and simulate the over/down states is not possible with a true button.

if you need to simulate a button press, including displaying the over and/or down states you should use a movieclip button.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 3, 2006
you can execute all the code of a button without a button press, but to control the button's appearence and simulate the over/down states is not possible with a true button.

if you need to simulate a button press, including displaying the over and/or down states you should use a movieclip button.
Translate