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);
}
};
};
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);
}
};
};