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


Categories Back and Forward Buttons for Flash
Author: Simon Bolus | Website: http://www.graphicinjection.co.uk |

 
Page 6
«prev 1 2 3 4 5 6

Constructing the Back and Forward Buttons (2)

For the back button logic: Create a new movie clip call it backLogic - add 2 key frames in the time line, in the first key frame put the code:

if (_root.back.length>1) {
 _root.backButton.gotoAndStop(2);
} else {
 _root.backButton.gotoAndStop(1);
}

This checks to see if the length of the array has more than one value (more than one value is needed to make the back button necessary , i.e. we don't need it to go back to the frame we are already on) If this is true the code instructs the backButton movie clip instance to goto and stop on frame 2 of its time line which is where the back button sits. If the statement is false the code instructs the movieclip to goto and stop on frame 1

Now put this in the second key frame:

gotoAndPlay (1);

This loops the movie clip so it will keep on checking.

Now drag an instance of this logic movie clip on to the main stage put it next to the back button.

The forward button logic is slightly different: Do the same as above but call it forwardLogic and put this code in the first key frame:

if (_root.forward.length>=1) {
 _root.forwardButton.gotoAndStop(2);
} else {
 _root.forwardButton.gotoAndStop(1);
}

The only difference this has to the back button is that it checks to see if there are any values in the forward array i.e. 1 or more (>=1).

Don't forget the gotoAndPlay (1) in frame 2, now drag an instance of this logic movie clip on to the stage put it next to the forward button.

That's it test your movie and your away, any problems go back and check the code or cross reference it with my movie in the download. You could also try using flash's debugger in test movie to check if the variables and arrays are working properly

Hope this tutorial was useful, have fun!!!!!

«prev 1 2 3 4 5 6

» Level Advanced

Added: : 2001-03-14
Rating: 7.12 Votes: 61
Hits: 6267
» Author
No details available.
» Download
Download the files used in this tutorial.
Download (18 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