|
|
|
#1 |
|
Member
Join Date: Jan 2006
Posts: 44
|
Fade Effect
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?
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jul 2004
Location: Los Angeles
Posts: 291
|
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. |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2006
Posts: 44
|
That's what I tried to start off with but when I play movie it comes up as 0% transparent
|
|
|
|
|
|
#4 |
|
up to my .as in work
Join Date: Dec 2004
Posts: 4,364
|
Submitted a scripted example to the Exchange. Should be available soon.
http://flashnow.servebbs.com/example...uttonFade.html |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Jul 2004
Location: Los Angeles
Posts: 291
|
Quote:
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). |
|
|
|
|
|
|
#6 |
|
up to my .as in work
Join Date: Dec 2004
Posts: 4,364
|
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/example...ttonFade2.html There are literally dozens of ways to skin this cat. |
|
|
|
|
|
#7 |
|
KoolMoves Moderator
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
|
Exchange example approved and ready for download
|
|
|
|
|
|
#8 |
|
up to my .as in work
Join Date: Dec 2004
Posts: 4,364
|
Thank you sir
|
|
|
|
|
|
#9 |
|
Member
Join Date: Jan 2006
Posts: 44
|
Thanks
|
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Sep 2005
Location: Gothenburg, Sweden
Posts: 357
|
why dont u guys use "hit test" much more easy
![]() just ad this to any movieclip: Code:
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));
}
__________________
/xzerox... Take a look at http://www.vmgcomputers.com/h75 |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|