i’m not really sure if this requires a script, but i guess i’ll pose the question here anyway. is there a way to keep buttons pressed down after you click on them? like, to maintain the “down” look as opposed to going back to the “up” ? and this is to be without the use of a new scene or movie or whatever. just in one frame, to have a button be clicked on, and for the button to remain at that state. :-\
How about you use a movie clip as a button. Have 4 labelled keyframes: ‘up’, 'over, ‘down’, ‘hit’. Make the movie clip go to a certain frame depending on what the user is doing.
movieClip.onRollOver = function () {
gotoAndStop(“over”);
};
movieClip.onPress = function () {
gotoAndStop(“down”);
};
movieClip.onRelease = function () {
gotoAndStop(“hit”);
};
Any more questions, don’t hesitate to yell at me. I may be a liar, but I love to help!
though keep in mind that Dan is proposing an MX solution. If it’s Flash5.0 it’s a little more tricky.
ah, thanks! i’ve actually switched to flash mx now, so hopefully i can get this to work.
what i’m doing is having a bunch of the same button on one frame. if i were to do this, it wouldn’t give the same action to all the other buttons, would it?
so basically all i do is make a new movie, insert 4 keyframes, then go to “frame label” and label each accordingly? i don’t add any code to the individual keyframes though, right?
i feel so ignorant :pirate:
The code on each individual clip will not matter as long as you give all your movie clips instance names: i.e. ‘home’, ‘links’, ‘contact’, etc.
You must also place a stop(); action on each of the four frames so that the movie clip does not play.
I 'm trying to do this too and couldn’t get it to work.
I created an MC called “RSVPmc”. Inside the “RSVPmc” movie clip timeline I’ve created 4 frames, labeled respectively up, over, down and hit, placing the appropriate graphic on each frame. Also, each frame has a stop() action. Then, back on the mc itself on the main timeline I’ve added the following AS:
RSVPmc.onRollOver = function () {
gotoAndStop(“over”);
};
RSVPmc.onPress = function () {
gotoAndStop(“down”);
};
RSVPmc.onRelease = function () {
gotoAndStop(“hit”);
};
Any event handlers or something else missing? Am I putting things in the right place? (obviously not!)
*<:) Scottie