[thelist] Flash buttons/ clear all?

Philip Lindsay phil at presence-multimedia.co.uk
Thu Jan 25 12:57:34 CST 2001


>> If you made the buttons as movieclips instead of button symbols you could
>> control the 'state' of them by switching on and off the value of variables
>> and the 'tell target' command.
> 
> Hmmm... that's definitely one way to go. Thanks for the hint. Could I change
> the instance behavior to "movie clip" and get the same effect?
>

yeah that would work, just add a few frames to the movie clip to replicate
the different states of a button, add labels (e.g. "on" and "off" in the
script below) and give the movieclip a unique instance name (e.g. "box1" in
the script below) to identify them in your script.

I forgot to add that because you can't put actions on a movieclip (because
Flash is weird like that - but that's for another day...), you need to place
the script below on a button which sits over the movieclip on your stage. If
you create a button with only a 'hit' state it is invisible to the user but
you can attach actions on it.

>> On (Release)
>> If (a = 0)
>> Begin Tell Target ("/box1")
>> Go to and Play ("on")
>> End Tell Target
>> Set Variable: "a" = "1"
>> Else If (a = 1)
>> Begin Tell Target ("/box1")
>> Go to and Play ("off")
>> End Tell Target
>> Set Variable: "a" = "0"
>> End If
>> End On
>> 
>> Hope this helps,
> 
> I think so! I'll give it a shot. Thanks so much, Philip.

good luck :)






More information about the thelist mailing list