Button help

OK, I created a button and on the over I want the button to “breathe” so to speak. So on the over I put in a movie clip to create this effect. Only problem is when I move off of the button I want the button to “breathe” back down to the state that it started out in. So if I am over the button and it is at the heighth of taking a breath I want it to ease back down and not just jump back to the original state. How can I achieve this effect?

at this link macromedia has done something similar to what I am trying to do. On the products - support - designer/developer - …
the buttons turn to blue, but when you move off of the button it reverses the alpha and returns to original state.

http://www.macromedia.com/software/

thanks,

digs

I don’t think that was made with a button but a movie clip

make your animation inside an mc … then just paste this actionscript into the movie clip actions

onClipEvent (enterFrame) {
	xmouse = _root._xmouse
	ymouse = _root._ymouse
	if (this.hitTest(xmouse, ymouse, true)) {
		this.nextFrame()
	} else {
		this.prevFrame()
	}
}

ok, I created the button and on the over state i inserted a movie clip (where i created the animation). Now in that movie clip i cut and pasted the as but when i test the button nothing changes. It doesn’t say that there are problems with the script it just doesn’t change the button any.

forget about buttons …

I don’t think that was made with a button

take a look at the attachment :slight_smile:

Perfect!! I got it to work. I have another question. So in order for me to get the breathe effect, I would like the (using your example) clip to go from white to red and then fade back to white and then to red and so on as long as the mouse is over clip. And, when you move off the clip it goes back to white. Do you know how that effect is done?

I tried it by extending the tween from red back to white, but when I rolled back off the clip, if it was on the down, from red to white, it reversed it back thru the red and then down to white.

[size=1]:: bump ::[/size]

hmmm … are you happy now digletinms?? you really got me thinking! :stuck_out_tongue:

lost and friends!! we need some ideas here you know … :slight_smile:

I know it can be done, I am looking at a sample I have on a mini CD, I just don’t know what to do about it. :slight_smile:

ok … surely this is not the best way … but it works :slight_smile:

kax, you are the greatest!! Works great, looks great. Thanks, I was stuck on that for quite some time.:beam:

no prob :smirk:

I can assure you … I was more happy when I got it working than you are now :stuck_out_tongue:

I found an easier way in the code…

Here is one…

It uses functio on the first frame…

Its pretty easy