animated flash buttons
- Started
- Last post
- 5 Responses
- gabe0
no prob! let me know if you have any issues...
- brains0
ahh ! thanks alot man. I just broke open this old project I was working on and it was really getting my goat. That starts me off pretty well. the hitTest !=true thing is really what I needed to know. bomb. thanks again.
- gabe0
hey brains, i usually set my buttons up like this...
there's an "idle" state, an "in" state and an "out" state (frame labels.)
onRollOver - gotoAndPlay(in)
at the end of the in sequence is a stop frame, and in that frame is an invisible movie clip. on the invisible movie clip, it says if hitTest != true, then gotoAndPlay(out), otherwise do nothing.i don't usually use onRollOut; for one it's not accurate like you're experiencing, and (2) it looks weird jumping to an out sequence during the middle of your in sequence. i'd rather play the in sequence through, then if the user doesn't have their mouse over the button anymore AFTER it's done playing it's rollover state, it plays it's rollout state.
very abbreviated AS here, but it's enough to get you started.
- brains0
but if I don't.. won't it just play all the way through on roll over ?
- Mick0
and why do you have a stop on the rollout keyframe? That would make it ummmm stop :)
- brains
bargh.
actionscript n00b here. trying to work out some flash buttons, I am having problems with the rollOver state. if I brush over the button really fast, it only completes the rollOver state and sticks there. I am using really simple actionscript, and I'm pretty sure I'm missing something huge here to get these buttons working well.
any help would be bomb.
here's the code.
on(rollOver, dragOver){
gotoAndPlay ("roll");
}
on(rollOut){
gotoAndPlay("roll_out");
}I have a stop on the roll_out keyframe and the first and last keyframe.