PDA

View Full Version : Problem with onClipEvent(enterFrame). Help please!


mx-guest2004
05-26-2004, 05:59 AM
Hi!
I have a MC on the stage and for example 100 frames on the main timeline.
I use this code to first change the MC's _alpha and from frame 50 to 100, change the _scale (zooming).
Problem is that only the _alpha part works and the movie stops then. I don't have any stop(); .
I have one keyframe in frame 1 and another one in frame 100.

Any help? please.
mx-guest2004

The code:


onClipEvent(load) {
this._alpha = 0;
}

onClipEvent(enterFrame) {
if(this._currentframe < 50) {
this._alpha += 5;
}
else {
if(this._xscale <= 200) {
this._xscale +=10;
}
if(this._yscale <= 200) {
this._yscale +=10;
}
}
}

mx-guest2004
05-26-2004, 12:50 PM
Answer:
since the MC's timeline is _root's timeline in this case, we must write: _root._currentFrame AND NOT this._currentFrame

mx-guest2004 :)