In this tutorial you learn to create a banner ad showing multiple ads and using buttons the rotating banner ad stops at a certain position. The design is mainly frame to frame animation and not much actionscript. First create a button with only the hitarea and movieclips, which we place over these buttons. Then of course you need your ads, which are also movieclips. If you have done all that create two movieclips, one which we call "opening clip", which actually rotates all the time (see figure 1).
Now we create a second movieclip as shown in the figure below and add framenames pic1 and pic2 as shown.
We now put both clips on the stage and put this bit of actionscript in an action frame.
// defining general button function function buttonChange(i) { // hiding the rotating clip openingClip._visible = false; // press button and go to framename buttonClip.gotoAndPlay("pic"+i); } // functions for individual buttons button1.onRelease = function() { buttonChange(1); }; button2.onRelease = function() { buttonChange(2); };
Check the individual movieclips for the actionscript.