all groups > flash actionscript > december 2004 >
You're in the

flash actionscript

group:

On press fade movie clip


On press fade movie clip windsor
12/16/2004 10:57:14 PM
flash actionscript: Hi Im a complete novice when it comes to flash and I need some help. I have a
button and a moviclip. When I press the button I want the movieclips opacity to
gradually fade out. How would you accomplish this. Any help would be greatly
appreciated thanks
Re: On press fade movie clip gerzornenplat
12/17/2004 12:50:23 AM
try putting the following actionscript on the first frame of the root timeframe.
Remember to make sure that your button and movie both have instance names in
the property inspector or it won't work. Hope this helps...

windsorButton_btn.onPress=function(){
if (windsorMovie_mc._alpha>0){
windsorMovie_mc._alpha-=1;
}
Re: On press fade movie clip gerzornenplat
12/17/2004 5:06:12 PM
Dear Windsor -
Sorry about my previous code, it was late at night!. Please use the code below
instead - I tested it this time....

windsorButton_btn.onPress = function() {
windsorMovie_mc.onEnterFrame = function() {
if (windsorMovie_mc._alpha>0) {
windsorMovie_mc._alpha -= 10;
} else {
delete windsorMovie_mc.onEnterFrame;
}
};
};

AddThis Social Bookmark Button