This is too complicated for me to try and explain, so I just did a mock up for you. I tried to keep it as simple as possible since you said you don't have much experience with Flash.
View the SWF here (the animated color boxes are clickable)
Download the FLA here
Here's the code I used:
Hope this is helpful. If you need a more detailed explanation of things, just let me know.Code:var myUrlArray:Array = Array("http://www.google.com/", "http://www.msn.com/", "http://www.yahoo.com/", "http://www.digg.com/"); var myCounter:Number = 0; //since arrays start at element[0], for simplicity sake, start the counter at 0 as well // click button and show webpage _root.main.onRelease = function() { getURL(myUrlArray[myCounter]); }; // button controls _root.myControls.btnPrev.onRelease = function() { // prevents the counter from being less than 0 if (myCounter <= 0) { myCounter = 0; } else { myCounter--; //subtract 1 from itself }; _root.main.prevFrame(); //backup the timeline 1 frame }; _root.myControls.btnNext.onRelease = function() { // prevents the counter from being more than 3 if (myCounter >= 3) { myCounter = 3; } else { myCounter++; //add 1 to itself }; _root.main.nextFrame(); //advance the timeline 1 frame };![]()


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks