web design template web design template web design template

Page : 1 2 3

1. Insert a new layer above Trigger layer and name it as 'Actions'

2. Select frame 1 and choose Window > Actions

3. In the Actions panel type the following actions


_root.targetx=-10;
but1.onRelease = function(){
_root.box.gotoAndPlay(2);
_root.targetx = _root.but1._x;
}
but2.onRelease = function(){
_root.box.gotoAndPlay(2);
_root.targetx = _root.but2._x;
}
but3.onRelease = function(){
_root.box.gotoAndPlay(2);
_root.targetx = _root.but3._x;
}
but4.onRelease = function(){
_root.box.gotoAndPlay(2);
_root.targetx = _root.but4._x;
}
but5.onRelease = function(){
_root.box.gotoAndPlay(2);
_root.targetx = _root.but5._x;
}


// _root.targetx=-10;
This action determines the position of box jump movie clip in the initial stage.

// but1.onRelease = function(){
This action creates a function for but1 i.e. About Us Button. Through this function it passes an action for on release of the button.

// _root.box.gotoAndPlay(2);
This action enables actionscript to enter into box jump movie clip and let it play from frame 2.

// _root.targetx = _root.but1._x;
This action determines the X position of About Us Button (but1) and stores the value into variable named as 'targetx'

(Similarly other actions are assigned for remaining buttons)

4. Insert a new layer above Actions layer and name it as 'Outline'

5. Draw an outline of the stage size

6. Choose Control > Test Movie

The box jump movie clip appears out of the stage area. But it won't appear in the web page when actual swf loads in html file. Still to avoid this we can put a patch over it.

7. Insert a new layer above Outline layer and name it as 'Patch'

8. Create a small white patch so that the box jump movie clip can hide behind it.


Choose Control > Test Movie

Click any of the buttons to see how the box jumps on top of the specific button.


Regards,

Manoj Kotak.
The author is Director of Image Online Pvt. Ltd.
Developer of Layout Galaxy web site design templates for photoshop and Flash.

All accompanying logos, brands and product names are trademarks of their respective companies.

Blood for humans comes only from humans : Donate Blood
http://www.donate-blood.org   E-mail - om@donate-blood.org





© Image Online  2001-2003