[RESOLVED] [MX] Question on reading array information
Hello, I'm working on making Back and Forward buttons (like browser buttons) for the projector file I'm creating. I have looked briefly at swfaddress, but I don't think that will work on my case since I want the file to run as a standalone movie, not in a browser. Anyhow, my question is how can I read the last value in my array? Or even better, how can I read the second to last value in my array? I've got the back button to work slightly by using the .pop() function. I ran into a problem though doing it that route. I don't necessarily need the information stripped from the array, I simply want to have Flash read the data within it. As I was typing this I had an idea and tried it, it seems to work out for the most part, some bugs still, but hey. I'm going to post the .fla to get opinions anyhow. Is there a better route to take then what I'm doing? Is there a more efficient way? Appreciate any comments. Thanks.
Mo
P.S. the forward is yet to be coded, and to nav you use the "2, 3, 4, and 5" keys. "Back Arrow" is to go back.
I tried out your code. I had to edit "array0.length - 1" to "array0.length - 2" It kept on getting the information of the frame that I was currently on, not the one I came from. I do like the tidier code. Going to see if I run into problems when I go forward and backward. I don't really see why I should off the top of my head, but seldom do things work out the way I plan I'll post anymore questions and the .fla when I get everything working. I thank you.
I finally got the thing to work the way I needed it to. I'm uploading the .fla in case anybody else is interested in implementing browser "back" and "forward" functions into standalone applications. The file is in MX format. To navigate use the 2, 3, 4, and 5, keys on the keyboard. To go back or forward use the left arrow key and the right arrow key respectively. The number on the screen shows the current frame that you're on.