Kbee
08-08-2006, 08:41 PM
If you go to
http://www.enhancedwireless.net/Technology/keyMechtest.shtml
I need to know how to make the play_mc fade out ALL the way upon clicking it (if you look closely there's a remnant of it after it's supposed to have faded out) and how to come fully back at the end.
Currently this play_mc is on the same frame on the main timeline as the main movie clip, KeyMech_mc, and has action script (on an actions layer) on frame one of the timeline as below -
_root.KeyMech_mc.stop();
play_mc.onRollOver = function(){
this.gotoAndStop("over");
}
play_mc.onRollOut = function(){
this.gotoAndStop("out");
}
play_mc.onRelease = function(){
this.onEnterFrame = function(){
so = this;
rate = 15; // choose number between 1 and 100
newAlpha = so._alpha - rate; // subtract rate from current volume
if(newAlpha > 0) { // continue fade
so._alpha = newAlpha; // set newVolume to decrease volume
}else if(newAlpha == 0)
delete onEnterFrame;
}
}
(The above script was kindly given to me)
And on the play_mc clip itself is this:
on(press){
_root.KeyMech_mc.play();
}
Inside the main KeyMech_mc in the actions layer on the last frame is this:
gotoAndStop("Scene 1", 1);
Lastly, there is a stop action on frame 1 inside the play_mc. And there is a drop shadow on the word "play" which I added in "filters" using Flash 8 Prof. Don't know if that's the remnant I'm seeing, if so how to get rid of?
So given what I'm trying to do, what do you suggest?
Thanks much
KB
http://www.enhancedwireless.net/Technology/keyMechtest.shtml
I need to know how to make the play_mc fade out ALL the way upon clicking it (if you look closely there's a remnant of it after it's supposed to have faded out) and how to come fully back at the end.
Currently this play_mc is on the same frame on the main timeline as the main movie clip, KeyMech_mc, and has action script (on an actions layer) on frame one of the timeline as below -
_root.KeyMech_mc.stop();
play_mc.onRollOver = function(){
this.gotoAndStop("over");
}
play_mc.onRollOut = function(){
this.gotoAndStop("out");
}
play_mc.onRelease = function(){
this.onEnterFrame = function(){
so = this;
rate = 15; // choose number between 1 and 100
newAlpha = so._alpha - rate; // subtract rate from current volume
if(newAlpha > 0) { // continue fade
so._alpha = newAlpha; // set newVolume to decrease volume
}else if(newAlpha == 0)
delete onEnterFrame;
}
}
(The above script was kindly given to me)
And on the play_mc clip itself is this:
on(press){
_root.KeyMech_mc.play();
}
Inside the main KeyMech_mc in the actions layer on the last frame is this:
gotoAndStop("Scene 1", 1);
Lastly, there is a stop action on frame 1 inside the play_mc. And there is a drop shadow on the word "play" which I added in "filters" using Flash 8 Prof. Don't know if that's the remnant I'm seeing, if so how to get rid of?
So given what I'm trying to do, what do you suggest?
Thanks much
KB