tooskinnee
06-26-2006, 03:52 PM
I have been using http://actionscript.org/tutorials/intermediate/Enabling_a_back_button_within_flash/index.shtml which uses Robert Penner script to enable the back buttons in flash. It works great and I am really impressed.
My question is, does anyone know how to use this to deal with movie clips that are not located on the _root timeline. If I have a MC that is nested inside of other MC's, I would still like to be able to make the back button work for these pages as well. Here is the code he uses:
// this code and back button by Robert Penner you can
// find it in full here http://www.robertpenner.com/
function checkPage () {
newPage = _root.page;
// grab variable from main timeline
// if the page variable has changed, navigate to new page
if (oldPage != newPage) {
// an object-oriented way of telling the
// content object to navigate to the new page
trace (newPage);
_root.gotoAndPlay("f"+newPage);
}
oldPage = newPage;
}
If any one has an idea or a tutorial that explians it let me know. THANKS!!!
My question is, does anyone know how to use this to deal with movie clips that are not located on the _root timeline. If I have a MC that is nested inside of other MC's, I would still like to be able to make the back button work for these pages as well. Here is the code he uses:
// this code and back button by Robert Penner you can
// find it in full here http://www.robertpenner.com/
function checkPage () {
newPage = _root.page;
// grab variable from main timeline
// if the page variable has changed, navigate to new page
if (oldPage != newPage) {
// an object-oriented way of telling the
// content object to navigate to the new page
trace (newPage);
_root.gotoAndPlay("f"+newPage);
}
oldPage = newPage;
}
If any one has an idea or a tutorial that explians it let me know. THANKS!!!