![]() |
![]() |
||||||
|
|||||||
| Tags: button, component, flash |
![]() |
|
|||
|
I have come across a problem with the Director documentation (there's a shocker
eh?) regarding Button component events that may be causing some confusion. In the events section for the Button, it lists Button.click as the triggered event. This is in fact incorrect and it is "onRelease" that gets triggered when this button is pressed. Here is a sample snippet to help people on their way... --Create the new object for the flash connection myNewObject = newObject("Anything") --Set the callBack for the sprite which has the button in it and specify the Button event --"onRelease" and the handler to be called in shockwave when the event is triggered "#shockwaveHandler" sprite(??).setCallBack(myNewObject, "onRelease" , #shockwaveHandler, me) --Create the handler to handle that event on shockwaveHandler me --Put some code here to run when the Button is pressed end |
| Sponsored Links |
|
|||
|
Although the documentation is atrocious, and your "workaround" might
work, it is unnecessary. If the member.eventPassMode = #passNever (default) then you can attach a behavior to the sprite that implements an "on click" handler and this will fire: -- on click me put "mouseUp" end |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise