Flashmatazz: plz answer(or anyone else)

How did you make the white arrow in the nav window “follow” the cursor to the different selections and then slow down at the end. I want to have the same effect only horizontally and with a different picture(not an arrow).
tia
p.s. his url"
http://www.twc.sshunet.nl/~swmvanbo/MT/flash/

It’s similar to the easing motion tut you can find on this site.

What I did:


// variables declared when frame loads:
speed = 4;
end = 0;
y = _root.pointer._y;     


_root.pointer.onEnterFrame = function() {
	this._rotation += (end - this._rotation)/speed;
	this._y += (y - this._y)/speed;
}

on the buttons I have:


on (rollOver) {
	// other stuff
	end = 45;
	y = _root.item1._y + 18;
}
on (rollOut) {
	end = 0;
}

I think thats’ it if I didn’t forget anything… :slight_smile:

If you can’t figure it out, just let me know.

Cheers.

i tried the code, replacing all y’s with x’s, and pointer with the name of my mc(brackets)…nothing happens at all…it won’t even trace the x variable(y in your case) i’ll put the file on my site(
http://www.flashtek.devisland.net/website3.fla )
it should be up in a few mins…can you please check it out(it’s a megabyte big so watch out) and see if you can do anything…btw i removed all the code that you told me to do from it since it didn’t work.

bump…anyone?

bump…flash you there?

sorry, but it’s really nice weather overhere so I wasn’t behind my screen but behind a beer or two :stuck_out_tongue:
I downloaded your fla and will have a look at it tomorrow

Cheers

alright thanx very much

hey crazy gamer, i fixded it to do what you want (i hope).
here is what i did…

first i made some new keyframes and turned your thing into a MC called “sliderMC”. make it with the registration pt at the top left

then i assigned this to the MC.

//sets the original position to match the x of “mask” which is our placement MC
onClipEvent (load) {
_root.xnew = _root.mask._x+(1-1)*100/2;
}
// the number here determines the speed that it moves at. if you want it faster, make it less then 5, slower, more then 5
onClipEvent (enterFrame) {
_x += (_root.xnew-_x)/5;
}

then i made a new layer for the slider actions. and put this on them

MovieClip.prototype.move2 = function() {
dest = _root.xnew;
pos = this._x;
vel = vel*0.7+(dest-pos)/7;
this._x += vel;
};

MovieClip.prototype.move = function() {
dest = _root.xnew;
pos = this._x;
vel = (dest-pos)/7;
this._x += vel;
};

then i made a mask layer, simply a MC named “mask” that is invisible to use as placement for the equation. name the instance “mask”. i just duped the sliderMC. it has to be the same size and registration pt. i put it on the home button, since that is where we want it to originate

then i added this to each button with the corresponding coordinates as to how far over past “mask” we want it to go

//change the (1+9.25) part if you need to change the mask. 1 is the starting x pos. + goes to the right, and - goes to the left
on (rollOver) {
_root.xnew = _root.mask._x+(1+9.25)*100/2;

}

here is a link to the complete fla on my server…
golgiEdit.fla

i know the other way is easier prob, but i could never get that to work so i did it this way on one of my sites…

wow man thanks…also, do you know if it is possible to make this whole complicated code work for the y axis too…because i changed my site a little(actually a lot), so i’d like it to move up AND down…you think you can solve this?!
TIA
thanx for the code

yah, i did it on the Y on my site… BTW, i just found the tut that I used to help me do this stuff,
http://www.kirupa.com/developer/flash5/slidingmenu.htm
(wanna give credit where credit’s due ;))

i have to run to school now, but ill breif you real quickly on how to do the Y axis…
ya ready?
hehe. change all the x’s to y’s
put your mask where you want it
fuss with the #s to get the things located right.
i made comments on the thing in the fla so you should be able to see what needs to get changed. you try that out, get familiar with it, and let me know if you need any help and i’ll check back when i get home tonight. :slight_smile:
good luck!

ok golgi, since i don’t get a lot of the code you gave me, to make the y movement for my slider i pretty much doubled what you gave me and replaced half of the x’s with y’s. I got it to work, but it doesn’t work right…the x is fine, but the y is WAAYYYY off, like 300 pixels above what it should be…and i can’t control it…i posted the fla, see if you can get it to work!:
www.flashtek.devisland.net/newwebsite.fla

golgi, i got it to work…i found a mistake in my code…i forgot to replace an x with a y in one place…do you want to see the code?

hey. just got back in. you got it working alright then?

ya…it works great…you want me to put up an swf or fla?

sure! i’d like to see your swf and see what you’ve done with it. (dont need the fla, i know what the code is…lol)
:slight_smile:

ok…it’ll be up in a sec at:
www.flashtek.devisland.net/newwebsite.swf
oh, and don’t ask about the brackets in the middle…it’s the start of something else

nice!!. looks very cool with that x&y thing. :slight_smile:
good job! its awesome that you got it working good.

He crazygamer,

I see you got it working. Good job!

and sorry I couldn’t help you out myself…I’ve been sleeping like a baby =)