Smal flash question/ Flash button help!

Helo,
When creating animated buttons, i cant seem to make a button that animates on rollover and then plays an animation when clicked.
Not playing an animation elsewhere, but just a “clicked” animation on the button itself…

thnx…

Helo,

Just having some trouble creating abutton that anim’s during scrollover and also anim’s when clicked… the scroll over anim part is no problem i just cant seem to create a button that anim’s when clicked.
thnx a ton.

A

i rarely use buttons, so is a bit hard to remember, but can’t you put a movieClip with the animation in the downstate of your button?

on(rollover){
//do something}

on(press, release){
//do something else}

Just write different functions for the different button states. Or do what sintax suggested.

:hr:

thnx guys.
i tired tossin the button anim into the downstate but to no avail.

Can you post an example of what you are trying to do?

if your using a button, you can’t (easily) have a clicked animation. the best way to do that is with a MC.

:p:

im tryin to make a similar nav to this site.
i just cant gethe button to do what i want when its depressed.
http://www.liquidintelligence.com/

forinstance, i just want the button to even stay a certain color once depressed.
or play an anim…

or even in this site. enter the tour directly>
in the nav how the button plays an anim whne depreesed.
http://www.orbik.com/dell/#

thanks alot.

Please don’t double-post :wink:

If you could post an example in the other thread you started I can try to help.

:hr:

this is the nav im working on…

http://www.precisiongroupmedia.com/nav.html

thnx for the help.

Rollovers look good. What would you like to happen when the button is released? Do you want text to appear? Do you want some kind of animation to appear in the button itself? Outside the button?

:hr:

Sorry,

my goal was to have an anim play in the button itself… once depressed.

thnx alot.

Here’s what you do:

NEVER MAKE BUTTONS USING FLASH’S BUILT-IN BUTTON CLASS.

Intead, create MovieClips that behave like buttons. That way, you have more control and can create some really awesome effects.

Then, once you have your faux-button you add this:

myButtonMC.onPress = function() {
this.gotoAndPlay("mouseDown");
}

I can attach an FLA if it’d help, but it’s all very, very basic ActionScript. :geek:

Hey thnx.
i tried actionscripting it up as well.
if its possible attach up an fla… that would probably help me tons.
thnx…

Yep, that’s exactly it. You can give movie clips button behaviors but also added functionality since every movie clip has its own timeline. So you can give a frame a label like “over” and then another frame a label of “hit”. Then you can have different things going on at those frames - one is an your button that is a different color, the other is an animation that starts and stops.

Your actionscript would be:


myMovieClip.onRollover = function(){
gotoAndPlay("over");
}

myMovieClip.onRelease = function(){
gotoAndPlay("hit");
}

does that make sense?

:hr:

I always use a MC as my buttons. But I’m pretty this would work:

Keyframe your down and hit inside your button. Put the animation you want in those frames and it will animate.

This is also in the wrong section to post this, should be in one of the flash sections.

yes thank you dearly.
ill see if i can get it working.

i have merged and moved the two threads into mx2004 forum.

as lunatic said , please dont double post and keep all flash related question in the flash forums.

thanks.
.soulty