This content has been marked as final. Show 5 replies
>I used the multi-state behavior from the library to set up my nav bar. How
>do I set a button to be in the on state at the state of the movie?
You can use sendsprite:
sendsprite(x, #toggle, true)
Thank you. Now, where do I put this code?
> Thank you. Now, where do I put this code?
It can be used in several ways to tell the button to toggle - as long as the
button sprite is drawn on stage, and have the multi-state script is
Put in a framescript, like this:
(assuming that the button is in spritechannel 1)
on exitFrame me
sendsprite(1, #toggle, true)
Put in a script attached to the button sprite, like this:
on beginSprite me
sendsprite(spriteNum, #toggle, true)
As a simple test:
- start the movie
- open the message-window (ctrl-m on windows..)
- write: sendsprite(1, #toggle, true), and press return
change 1 to the correct spritechannel, and toggle the button on/off by using
Look up sendSprite in the director help documentation and will know exactly how to use the script.
If for some reason you don't have help documentation located on your computer here is the link for the online help page with this information,
Thanks again. It works!