PDA

View Full Version : Can _currentframe use a string?


roygbiv123
05-28-2005, 09:01 PM
I have a function named artistsReturn() which moves the movie back to a certain frame. It works fine hardcoded, but does not work when I give the frame a label and call the label name, rather than the frame number.

Am I even able to use a string in place of a number when using _currentframe?

The following code works fine:

function artistsReturn() {
onEnterFrame = function () {
if (_root._currentframe == 100) {
delete onEnterFrame;
} else {
_root.gotoAndStop(_currentframe-1);
}
};
};

This, however, does not:

function artistsReturn() {
onEnterFrame = function () {
if (_root._currentframe == "historical") {
delete onEnterFrame;
} else {
_root.gotoAndStop(_currentframe-1);
}
};
};

oldnewbie
05-29-2005, 01:11 AM
Quick answer nope! No way!

roygbiv123
05-30-2005, 01:02 AM
Thank you very much for the reply! That's all I needed.