PDA

View Full Version : button help


stompwampa
08-23-2006, 02:50 AM
I have an image that has a blurry verion of it, and a clear version of it.
I want to make a button with the blurry version as the "Up" State, and then when they roll over the button, the blurry fades away to the clear version of it, and then for the "Down" state it'll have a reddish tint to it.

Here's what I've done so far:

Created a new Button

Crated a new layer for the "Up" state and placed the blurry image in that layer

Created a new layer and added a keyframe to the "Down" state. Here I created a new move clip.

Within the movie clip, I have two layers, "blurry" (on top) and "original" (on bottom)
I drag my blurry image onto the blurry layer and the original image onto the original layer. I create a keyframe at frame 15 for both layers.

Now, from here, I want to make the blurry image fade out using tweening.

How do I do that? I've tried it a few different ways, and nothing works...I can't seem to find a way to actually fade the image...there isn't an opactiy changer anywhere...

icemart525
08-23-2006, 03:08 AM
here's a sample. :D

stompwampa
08-23-2006, 03:24 AM
OK...I figured it out now actually...

here's my next question:

How do I make it so that when the user rolls the mouse out, that it fades back to the original image instead of just snapping back to it?

I know I have to essentially reverse the animation in frames 16-30, and i need to have

stop ();

in frame 15, followed by the code that will gotoandplay (16) on mouse out...

what would be the exact code for that?

icemart525
08-23-2006, 03:47 AM
that would require you some codes. here's a post i think is related
blur (http://www.actionscript.org/forums/showthread.php3?p=268623)

stompwampa
08-23-2006, 04:23 AM
there's no way I can just use an "onMouseOut" feature instead of using all the code?

icemart525
08-23-2006, 04:57 AM
here's an alternative, i've made three MC buttons, blurbtn, clearbtn and transparentbtn. you can experiment with this sample by changing the MC size or opacity. :)

stompwampa
08-23-2006, 03:02 PM
is there no such thing as an onMouseOut command in action script, or something similar that doesn't require an instance name to work...?

icemart525
08-23-2006, 11:57 PM
onRollOut? or you mean the up state of the button?

stompwampa
08-24-2006, 12:43 AM
i found onRollOut, but doesn't that require an instance name?
Do I have to give the actual button an instance name, and then use the code within the button or within the main timeline?
Or do I have to go the more complex method and use ActionScripting with alpha values?
Thanks.

icemart525
08-24-2006, 01:24 AM
if you don't want to use instance names then you can put your code within the buttons. you still need to use actionscript to perform the blur effect. try googling the blur class. :)

stompwampa
08-24-2006, 01:33 PM
well, that way I have it set up, the Over frame on my button contains a movie clip in it that fades into the graphic when the user rolls over it. When I double click on the movie clip, I get the seperate movie clip time line to edit.
From there, I have the fade effect that accurs when the user Rolls Over.
Could I maje just a transparent symbol that covers the whole button and then give it the instance name "transparent" to use the onRollOut code? The initial animation goes to frame 15, and then stops. I would then want the revers animation to go form frames 16-30. Would this work for the code?

In frame 15:

stop ();

transparent.onRollOut ();
gotoandPlay (16);

}


I'm not sure if that is the correct way to format it...please correct me. But essentially, would that work?

icemart525
08-25-2006, 12:04 AM
sure that's what i did in my last example. have a transparent button then a mc underneath to do the work. :)

stompwampa
08-25-2006, 12:51 AM
so is that code I used correc then? formatically at least?