I am working on my buttons a similar to Soulty’s but it’s far too complicated for me, I think they r over-engineered for a so simple button animations! I couldn’t get them to work as it was trickly to work on which layer, which graphics should convert to and which frames etc.
But I had done a menu, working the same was as Kax’s…it looked great but I would like to make out-animation last a bit longer. I suppose there is a simpler way to make out-animation last longer? Cheers
hey barnettgs , yeah my style is kinda rough and ragged, because iam not very AS based (not yet anyway, (-: ) , but if you want to make out-animation last longer you might be able to use the code Kax wrote earlier.
onClipEvent (enterFrame) {
if (this.hitTest (_root._xmouse, _root._ymouse, true)) {
if (!flag) {
this.gotoAndPlay("inAnimation")
flag ++
}
} else {
this.gotoAndPlay("outAnimation")
delete flag
}
}
on his original fla , in the movie clip he had one tween, so i though maybe you can have two tweens, one for over and one for out, and use a frame label for out, and then call it in the AS. I have yet to try this, beacause i have been busy with work, but give it a go and tell me how it went.
you’d be using cpu resources for no reason …
i’d use a simple onRollOver and onRollOut handlers
by the way … in the script i posted before you’d need another flag in the [color=red]else[/color] statement … i just noted that i didn’t wrote it. once again i wouldn’t do that … besides now the script would be bigger for such a little thing
Ok, I have done it now…using ‘roll over’ and ‘roll out’ functions in Action Script.
It works fine with normal mouse movement but if I move mouse across button too fast, it will flash instead of glowing. So I know it isn’t same as macromedia site as they don’t flash if you move mouse too fast.
So here is my Fla file shown below and see if there is something wrong with it. Thanks!
*Originally posted by Soulty *
**thats great dude, nice work, one question , how did you make flash go into those movie clips and use goto statements???
dnt u usually use
onClipEvent (enterFrame) **
I had tried OnClipEvent, it’s bit complicated for me to use it…how do I enable rollout with these code like OnClipEvent? But I suppose it will be same effect?
The reason its ‘flash’ because I move mouse on it, first few frames playing but when mouse moves out too early, it jumps to frame 17 making it flash rather than playing it all the way from 2 to 16 then goes dim from 17 to 32.
yeah i knew about the flash thing, just curious on how u made the movie a button without using onClipEvent, but i guess u can use movie clips as buttons in flash MX, didnt really think about that.
*Originally posted by Soulty *
**yeah i knew about the flash thing, just curious on how u made the movie a button without using onClipEvent, but i guess u can use movie clips as buttons in flash MX, didnt really think about that. **
I can see what u mean. I guess I am using rollover/rollout because I intended to use it as a button. Anyway, I will figure out a way to prevent button ‘flashing’ if mouse move across fast.
Cheers