back history navigation button within movie
I am trying to create (I know this will sound so basic) an additional navigation sytem in my flash movie that consists of a back button. I basically want the user to be able to click the back button and return to previous areas that they have navigated to in the website. This was pretty easy for me to sort out with a basic linear timeline.... however....
I have a main movie timeline with other movies being loaded into one of those keyframes as kind of a sub movie.
An example:
the main timeline is: Frame1 Frame2 Frame3 Frame4
If I go to Frame2, there are links to choose different movies to load into that area. So while in Frame2, the user may navigate deeper into a loadedMovie.
The problem I face right now, is telling the main timeline where the user is in the movie and translating that into an appropriate navigation. There are ways that I can make it work, but it requires changing the architecture of the site.
I am currently using arrays.
Anyone who might have a thought on this would be very helpful... even if its links to a good tutorial or otherwise. Thanks in advance!
You could do it with an array...
You could do something like this:
var myArray:Array = new Array();
frame2_btn.onRelease = function() {
gotoAndStop(2);
myArray.push("frame2");
trace(myArray);
};
clicky_btn.onRelease = function() {
attachMovie("my_mc", "my_mc", 10);
my_mc._x = Stage.width/2;
my_mc._y = Stage.height/2;
myArray.push("loadedMovie");
trace(myArray);
};
back_btn.onRelease = function() {
lastValue = myArray.pop();
if (lastValue == "loadedMovie") {
trace("removedMovie!");
} else if (lastValue == "frame2") {
trace("back to frame 2!");
}
};
You could do something like this:
var myArray:Array = new Array();
frame2_btn.onRelease = function() {
gotoAndStop(2);
myArray.push("frame2");
trace(myArray);
};
clicky_btn.onRelease = function() {
attachMovie("my_mc", "my_mc", 10);
my_mc._x = Stage.width/2;
my_mc._y = Stage.height/2;
myArray.push("loadedMovie");
trace(myArray);
};
back_btn.onRelease = function() {
lastValue = myArray.pop();
if (lastValue == "loadedMovie") {
trace("removedMovie!");
} else if (lastValue == "frame2") {
trace("back to frame 2!");
}
};
#If you have any other info about this subject , Please add it free.# |