|  | event listener for a movie clip |  | |
| | | Richard Morey |  |
| Posted: Tue Aug 26, 2008 4:04 pm Post subject: event listener for a movie clip |  |
Hi --
I am trying to replace a stock button (from the components) with a movie clip. The button has this code:
btnSubmit.addEventListener("click",sendData);
I deleted the button, btnSubmit, and replaced it with a movie clip with the same instance name but that did not work. I tried the replacement as both a "button" and a "movieclip". What is the correct event listener to get a movie clip to fire an event when it is pressed/clicked?
Thanks
Rich |
| |
| | | Richard Morey |  |
| Posted: Tue Aug 26, 2008 4:35 pm Post subject: Re: event listener for a movie clip |  |
Hi --
Thanks! That worked.
Rich
"kglad" <webforumsuser@macromedia.com> wrote in message news:g91hi2$g3t$1@forums.macromedia.com...
| Quote: | if you're not using a button component and you're using a movieclip, you need to use a movieclip method. onRelease would be the equivalent of the click handler. check the flash help docs:
btnSubmit.onRelease=function(){ //do whatever }
|
|
| |
| | | kglad |  |
| Posted: Tue Aug 26, 2008 6:20 pm Post subject: Re: event listener for a movie clip |  |
if you're not using a button component and you're using a movieclip, you need to use a movieclip method. onRelease would be the equivalent of the click handler. check the flash help docs:
btnSubmit.onRelease=function(){ //do whatever } |
| |
| | | kglad |  |
| Posted: Tue Aug 26, 2008 9:44 pm Post subject: Re: event listener for a movie clip |  |
| |
|
|