Marco Ribeiro
Marco Ribeiro

Reputation:

How can I create a new STATE in a button in Flash CS3?

I'm trying to create a new state for a button, like when I take the mouse pointer out of the Hit Area and, doing this, it fires a small movieclip. How can I do it? I probably need some especific name for this state, like Hit or Over, right?

Upvotes: 0

Views: 147

Answers (1)

back2dos
back2dos

Reputation: 15623

you can't do that ... buttons are of type SimpleButton, which only has 3 actual states and one hitarea ...

to do, what you want to do, you need to create a custom button component, subclassing Sprite or MovieClip ... don't forget to set buttonMode and useHandCursor to true ... if you want to be able, to edit it much like a button, the best will be creating a MovieClip subclass ... then you can create a MovieClip, which has a scene for each state, and you associate it with the class ... the class will have to stop the MovieClip to avoid strange behaviour ... and then you can listen to all type of mouse events, deciding, to which scene to jump ... well be a bit of work ... or you create a proper CS3/CS4 componenent ... or maybe you can find one ...

greetz

back2dos

Upvotes: 1

Related Questions