O.K., pretty good. But, there's no emphasis on which page
has been selected other than it's in the centre of screen
and that's not good enough because if you press button 1
first, then nothing happens. So now you're going to alter
a different property to _x, namely the movie clip property
_alpha:
Because you've got the movie set up thus far, you only
need to alter the script. Up until now your script has been
referring to movie clips on the main time line. The pages
movie clip contains pageOne, pageTwo and pageThree which
all move together because it's the clip that holds them
that's moving. The same applies for the buttons movie clip.
For this section you're going to refer to the three page
movie clips, and so you need the script and variables three
times.
The reason you've set the _alpha of these movie clips to
50, is that the default is 100 (being opaque), and you want
them to start at 50 and fade up to 100.
Key Frame 2:
//These are the variables that set the destination
of our changes
_root.pagesTargetX = 50;
_root.buttonsTargetX = 130;
_root.pageOneAlpha = 100;
_root.pageTwoAlpha = 50;
_root.pageThreeAlpha = 50;
//This sends the appropriate MC into action
_root.motionScript.gotoAndPlay ("change");
These variables work in the same way as the ones you already
had, except that you've added three. One for each movie
clips _alpha property.
Key Frame 3:
//These are the variables that set the destination
of our changes
_root.pagesTargetX = -170;
_root.buttonsTargetX = 80;
_root.pageOneAlpha = 50;
_root.pageTwoAlpha = 100;
_root.pageThreeAlpha = 50;
//This sends the appropriate MC into action
_root.motionScript.gotoAndPlay ("change");
Key Frame 4:
//These are the variables that set the destination
of our changes
_root.pagesTargetX = -390;
_root.buttonsTargetX = 30;
_root.pageOneAlpha = 50;
_root.pageTwoAlpha = 50;
_root.pageThreeAlpha = 100;
//This sends the appropriate MC into action
_root.motionScript.gotoAndPlay ("change");
Inside motionScript update the script as follows:
//This controls the x position of the pages
gap = _root.pagesTargetX - _root.pages._x;
_root.pages._x = _root.pages._x + (gap / 3);
//This controls the x position of the buttons
gap = _root.buttonsTargetX - _root.buttons._x;
_root.buttons._x = _root.buttons._x + (gap / 6);
//This controls the transparency of page 1
gap = _root.pageOneAlpha - _root.pages.pageOne._alpha;
_root.pages.pageOne._alpha = _root.pages.pageOne._alpha
+ (gap / 9);
//This controls the transparency of page 2
gap = _root.pageTwoAlpha - _root.pages.pageTwo._alpha;
_root.pages.pageTwo._alpha = _root.pages.pageTwo._alpha
+ (gap / 9);
//This controls the transparency of page 3
gap = _root.pageThreeAlpha - _root.pages.pageThree._alpha;
_root.pages.pageThree._alpha = _root.pages.pageThree._alpha
+ (gap / 9);