PDA

View Full Version : RvGaTe



RvGaTe
May 19th, 2003, 06:52 PM
clean, and actionscripted, rollover to c

pom
May 19th, 2003, 07:09 PM
Very cool! It gets crazy most of the time, but the idea is great :phil:

RvGaTe
May 19th, 2003, 07:10 PM
it supposed to get cray, you gotta tread my name gentle :P

nobody
May 19th, 2003, 07:58 PM
thats really cool.. right now it says vGaTeR which is extremely amusing to me

RvGaTe
May 19th, 2003, 08:03 PM
if your interested, here's the code:



MovieClip.prototype.ease = function(x) {
speed = 5;
this.onEnterFrame = function() {
this._x += (x-this._x)/speed;
};
};
function changeLayout(x) {
if (x == 1) {
number1.ease(71);
number2.ease(100);
number3.ease(123);
number4.ease(153);
number5.ease(177);
number6.ease(201);
} else if (x == 2) {
number1.ease(100);
number2.ease(123);
number3.ease(153);
number4.ease(177);
number5.ease(201);
number6.ease(71);
} else if (x == 3) {
number1.ease(123);
number2.ease(153);
number3.ease(177);
number4.ease(201);
number5.ease(71);
number6.ease(100);
} else if (x == 4) {
number1.ease(153);
number2.ease(177);
number3.ease(201);
number4.ease(71);
number5.ease(100);
number6.ease(123);
} else if (x == 5) {
number1.ease(177);
number2.ease(201);
number3.ease(71);
number4.ease(100);
number5.ease(123);
number6.ease(153);
} else if (x == 6) {
number1.ease(201);
number2.ease(71);
number3.ease(100);
number4.ease(123);
number5.ease(153);
number6.ease(177);
}
}

rollover calls the function with a random number

simple code, but it gets harder when your name is something like:

thisismylamelongnickname
:P

edit:
btw,all thanks to this thread:
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=23691
i just learnd myself using the prototype today ! :D

noxious
May 19th, 2003, 10:58 PM
hahaa .. i just wanna tickle that some more! :P

RvGaTe
May 20th, 2003, 06:21 AM
i would love to let it work with springs, but i never figured out how :s, maybe im to lazy or whatever...

noxious
May 20th, 2003, 06:34 AM
try modifying your code a bit..


MovieClip.prototype.ease = function(x) {
speed = 5;
viscosity=0.7
this.onEnterFrame = function() {
xmove=(_root._xmouse-this._x)/speed;
xvis=(xvis+xmove)*viscosity; //
this._x += xvis;
};
}


hope you'll like it.. =)

RvGaTe
May 20th, 2003, 06:43 AM
wow, impressive, check it out

thx for the code, could you give me an xplenation of the vars you used ?

noxious
May 20th, 2003, 11:48 PM
=) ..i think there is one out there who can explain it a lot better.. im not really good with digits or phycs.. lol ..anyhu, viscosity is some kinda measure of a fluids resistance/friction to flow...
beyond that.. hee hee..
all i know that if you combine that with the easing effect it will result in a somewhat "elasticity/bounce" effect... i also used that in my footer :)