Groups | Blog | Home
all groups > flash (macromedia) > october 2005 >

flash (macromedia) : How did they do this nav effect?


avylon
10/22/2005 10:43:07 PM
Would you please mouseover the navigation at http://www.iflashfx.com? How do the rectangle and circle chase the mouse to each item?

Thanks!
Patrick
urami_
10/23/2005 12:00:00 AM


[quoted text, click to view]

Make the little circle and the rectangle shape two separate movie clips.
Give it instance name MC1 and MC2.
To give instance name, select movie clip, hit CTRL F3 to open properties panel,
type name in the < instance name > box.

Than on timeline frame place the following action :

_root.onLoad = function() {
POZ = new Array("100", "120", "180", "200");
};
_root.onEnterFrame = function() {
r += (rot-r)/5;
r1 += (rot1-r1)/7;
MC1._x = r;
MC2._x = r1;
};


and buttons to move the clips would use actions like :

on (rollOver) {
rot = POZ[0];
rot1 = POZ[0];
}

on (rollOver) {
rot = POZ[1];
rot1 = POZ[1];
}

etc...

NOTE !
on start it will locate Mc1 and Mc2 center point at x=0 , once roll over ,depends on poz[ it will
take the X cord from array 100,120,180...
and slide it smoothly .

Array count start from ZERO so if you want to get the 100 you must use rot = POZ[0];
you can add as many as you want , also if you want MC1 and MC2 in particular position on screen on
start , you can add rot = POZ[0]; and rot1 = POZ[0]; in to onload event .

_root.onLoad = function() {
POZ = new Array("100", "120", "180", "200");
rot = POZ[3];
rot1 = POZ[0];
};


This cause different delay for the item, you can change it by adjusting the namer /5 and /7

r += (rot-r)/5;
r1 += (rot1-r1)/7;





--
Regards

Urami

--


<urami>
http://www.Flashfugitive.com
</urami>

<web junk free>
http://www.firefox.com
avylon
10/23/2005 12:00:00 AM
AddThis Social Bookmark Button