;

PDA

Click to See Complete Forum and Search --> : Fade Effect


bailyesboy
11-08-2006, 01:09 PM
I've got an image that is 50% transparent. I want there to be no tranparency on it when I put my mouse over it. Any ideas on how to do this?

pherbrick
11-08-2006, 01:57 PM
Quick and dirty solution:

1) Convert the image to a button,
2) Copy the Up state to the Over state
3) Set the transparency to 0% on the image in the Over State
4a) If you need a transition from 50% to 0%, before step 1 above, copy the image to a movie clip and create a multiframe clip, w/ image on first frame starting at 50% and image on last frame at 0% transparency. Don't forget to put a stop() on the last frame or you will have a cycling image.
4b) After step 1) above, create a blank Over state and cut and paste the clip from the stage to the button's Over state; disregard steps 2) and 3).
5) Create a Down state.

bailyesboy
11-08-2006, 02:00 PM
That's what I tried to start off with but when I play movie it comes up as 0% transparent

Chris_Seahorn
11-08-2006, 07:07 PM
Submitted a scripted example to the Exchange. Should be available soon.

http://flashnow.servebbs.com/examples/Scripted_ButtonFade.html

pherbrick
11-08-2006, 07:16 PM
That's what I tried to start off with but when I play movie it comes up as 0% transparentDid you adjust the transparencies within the states?

I found I ccouldn't keep the Over state from cycling each time the mouse was clicked. For that reason, using a movie clip is better. I was working on a movie clip version when Chris beat me to posting (his looks much nicer than mine).

Chris_Seahorn
11-08-2006, 07:32 PM
Mine is just like Peter mentions, a MovieClip as a button. If you want the look of a component button (drop in) but the added benefit of a movieclip just convert your onstage component button to a clip:

http://flashnow.servebbs.com/examples/Scripted_ButtonFade2.html


There are literally dozens of ways to skin this cat.

blanius
11-08-2006, 10:24 PM
Exchange example approved and ready for download

Chris_Seahorn
11-08-2006, 10:42 PM
Thank you sir :thumbsup: :thumbsup:

bailyesboy
11-09-2006, 11:56 AM
Thanks

xzerox_xzerox
11-09-2006, 03:57 PM
why dont u guys use "hit test" much more easy :)

just ad this to any movieclip:


onClipEvent (enterFrame) {
t = this.hitTest(_root._xmouse, _root._ymouse, 0);
//fade out
//_alpha += (10*t*(_alpha<0)-10*!(t)*(_alpha>100));
//fade in
_alpha -= (20*!t*(_alpha>0)-20*(t)*(_alpha<100));

}


Does anyone know how to use this script but with blur for example? Or is it even possible?