Answered
reversing a clip on a button click
Hi,
What I want to happen here is that the page go through its load animation backwards (to unload the page) when the user clicks a button on the nav menu.
It kinda worked once or twice, but in the if {} suddenly jumped to main time line from the page clip and only a couple frames worth were reversed.
a trace() after "_parent.gotoAndStop(70)" shows the _parent._currentframe as 70.
breakpoints while debugging don't seem to get close to the if{} now? It is always skipping from " _parent.onEnterFrame = function() {" directly to " _root.gotoAndPlay(_global.pageToPlay);" Breakpoints on and inside the if are not hit?
Can anyone help?
Sue
on (release) {
_global.pageToPlay = 2;//main page
_parent.gotoAndStop(70);
_parent.onEnterFrame = function() {
if (_parent._currentframe > 1) {
this.prevFrame();
}
};
_root.gotoAndPlay(_global.pageToPlay);
}
What I want to happen here is that the page go through its load animation backwards (to unload the page) when the user clicks a button on the nav menu.
It kinda worked once or twice, but in the if {} suddenly jumped to main time line from the page clip and only a couple frames worth were reversed.
a trace() after "_parent.gotoAndStop(70)" shows the _parent._currentframe as 70.
breakpoints while debugging don't seem to get close to the if{} now? It is always skipping from " _parent.onEnterFrame = function() {" directly to " _root.gotoAndPlay(_global.pageToPlay);" Breakpoints on and inside the if are not hit?
Can anyone help?
Sue
on (release) {
_global.pageToPlay = 2;//main page
_parent.gotoAndStop(70);
_parent.onEnterFrame = function() {
if (_parent._currentframe > 1) {
this.prevFrame();
}
};
_root.gotoAndPlay(_global.pageToPlay);
}