Internet Commerce

Partners & Affiliates

Developer Channel


Featured Flash FLA
Gallery Downloads 11401 Flash Movies | 5 New Flash Movies Added
What's New | Top 100

Featured FLA

»  Author: Nick Kouvaris
»  Title: Znax
»  Description: Znax is a board game. Click 4 tiles of the same color and form squares as big as you can. You will erase all the tiles inside the square and collect points. Get maximum score if you make a square with game edges.
»  More by: Nick Kouvaris


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 4941 Flash Sites | 1 New Flash Links
What's New | Top 100 Flash Site

Featured Site

»  Author Agence WOP Digital Agency
»  Title: Electricdrum
»  Description: French WOP Agency, 3D websites, Flash (Papervision, Away 3D), event or institutional projects. The agency operates on all digital projects: consulting, design, graphic design, development, online communication. The WOP agency follows you on the implementation of original, creative and optimized digital projects.


Random Links | Add your own Flash Related Links
Flash Tutorials 1481 Tutorials 7 New Tutorials Added!
What's New | Top100

» How To Make A Simple Animation Using Christmas Clips
» Simple Step by step flash game tutorial Spot the diffrence
» How To Make A Moving Text Slide
» Create Flash Banner With Text Float Effect
» How To Make Zoo Photos Slideshow
» How To Make A Dolphin Photos Slideshow
» How To Make A Fathers Day Slideshow
» How To Make A Transparent Background of Your Flash File
» Create Flash Banner With Text Disco Light Effect Today we will introduce you a Text Disco Light eff
» Unknown Tag: Title10
Random Tutorial | Add Site


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Actionscripting

Categories Flash 5 Dynamic History Object
Author: Ben Pritchard/Dave Karpinski | Website: http://www.blattnerbrunner.com |

 
Page 6
«prev 1 2 3 4 5 6

--Not Using Multiple Movieclips--

The code for a one-movie clip version of this code is very similar. Let's start by adding to the first frame of our movie, the action script given in step 1 above. This code works the same way in this instance. We will not be loading external MC's, so the only other way to get new content on the screen is to move to another frame somewhere in the movie. Therefore we will move to a new frame on the timeline, and set this as our theoretical page2. It will contain the same code given in step 2. Ok, guess what? The code described in step 3 is also the same! Just navigate to the new frame that contains the content that is your page2 and place a back button there with the code I mentioned.

Ok, finally - some differences; Step 4 will be different because we are not loading MC's - we are jumping to different frames. Let's look at the code:

// ///////////////////////////////////////////
// history object functions
// //////////////////////////////////////////
function go () {
 trace (_level0.history[_level0.history.length-2]);
 if (_level0.history[_level0.history.length-2] == "page1") {
 _level0.onPage1 = "yes";
 with (_root) {
 gotoAndStop(1);
 }
 } else {
 with (_root) {
 gotoAndStop(_level0.history[_level0.history.length-2]);
 _level0.onPage1 = "no";
 }
 }
 _level0.history.splice(_level0.history.length-1, 1);
}
// /////////////////////////////////////////////
// omniMode & linking functions
// ////////////////////////////////////////////
function omniLink (pageToLoad) {
 with(_root){
 gotoAndStop (pageToLoad);
}
 _root.cameFrom = _root.referrer;
}

As you can see - Above are the history object and omniMode Linking. A few changes have been made. First, instead of loading movies, we are jumping to frame labels in the movie. I named a frame "page2" and a frame "page3." On the omniLink, I just tell the root movie to jump to the frame requested from the page2 or page3 buttons.

This about covers it all - I have provided source files for the above tutorial. They are very stripped down FLA's and contain no format - just functionality. They are:
master.fla -- the multi-movieclip master movie.
page2.fla -- the multi-movieclip page2 movie.
master_no_external.fla -- the single movieclip history movie.

Feel free to email me with questions: bpritchard@blattnerbrunner.com.

«prev 1 2 3 4 5 6

» Level Advanced

Added: : 2001-12-21
Rating: 8.34 Votes: 27
Hits: 4606
» Author
Easy 4 step history object for flash movies and externally loaded movie clips.
» Download
Download the files used in this tutorial.
Download (31 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments