peterworth
Programmer
hi, i'm trying to use the current frame to determine what to do when an event occurs in a symbol, but _currentframe seems to always be 1 when the event gets triggered, no matter where in the animation we actually are. i guess this is because the script for the event handler is in frame 1 of the symbol's timeline. is there any way around this?
in this script:
this.onRollOut = function()
{
trace(_currentframe);
if (this._currentframe < 40)
{
gotoAndPlay("_out");
}
trace(_currentframe);
}
the first trace is always 1 (wrong) and the second trace is always 40 (right).
in this script:
this.onRollOut = function()
{
trace(_currentframe);
if (this._currentframe < 40)
{
gotoAndPlay("_out");
}
trace(_currentframe);
}
the first trace is always 1 (wrong) and the second trace is always 40 (right).