-
Stop Alpha Gain
LOL... Okay once again I am plagued with a problem. How do I stop the alpha/fader gain? Notice how when I rollover the object I want it to stay at the 50... When it goes to 50 it gains back to 100... How can I stop the alpha from adding to 50 once I rollover? Thanks for all the help guys!
PHP Code:
onClipEvent(load){
this._alpha=0;
this.fader=0;
}
onClipEvent (enterFrame) {
if (this.fader==0){
this._alpha+=12;
}
if (this._alpha>=100){
this.fader=0;
}
}
on (rollOver) {
_parent["color1"]._alpha=50;
xstart = this._x;
ystart = this._y;
Mouse.show();
}
-
Did I crap an egg on this one? lol...
I can't stop the gain of the alpha... Once it hits 100 I'd like for it to stop adding ++++
-
Anyone?
Maybe it would help if I try to explain what I am trying to accomplish rather than fix it.
I would like for the MC to load at a opacity of 0. Once loaded, it will fade in at a rate of +12 when the movie entersframe. I would like for the gain or rather the fade to stop once opacity has reached 100. That way when I rollover the MC it will set the opacity to 50 and stay at 50 until I rollout the MC. The issue is that it will go to 50 when I roll over, but will automatically add +12 again. How can I get it to stay on 50 when I rollover?
-
Maybe you can adapt this to what you are trying to do...
Code:
onClipEvent (load) {
this._alpha = 0;
function fadeIn() {
if (this._alpha < 100) {
this._alpha += 12;
if (this._alpha >= 100) {
delete this.onEnterFrame;
}
}
}
this.onEnterFrame = fadeIn;
}
on (rollOver) {
delete this.onEnterFrame;
_parent["color1"]._alpha = 50;
xstart = this._x;
ystart = this._y;
Mouse.show();
}
on (rollOut) {
_parent["color1"].onEnterFrame = fadeIn;
}
-
Figured it out.
PHP Code:
onClipEvent (load) {
this.onEnterFrame = function() {
this._alpha += 12;
if (this._alpha>=100) {
delete this.onEnterFrame;
}
};
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|