Im lost... help me Lost!

errr, i was bored so i decided to mess around and make somethign similar, but not really, to what lostinbeta made with the jumping orbs… what im trying to do is make it so when the mouse gets closer to text it fades in and scales up, and vice versa

btw, im doing this the sloppy way, just as a test

MC’s

50 MCs

f1
f2
f3
etc.

the MCs are in 10 rows of 5

ACTIONs

[AS]
onClipEvent (enterFrame){
ymouse = _root._ymouse-(_root.this._y);
if(ymouse>=50){
this._alpha==20;
thix._scale==200;
};
if(ymouse<=40){
this._alpha==40;
thix._scale==180;
};
if(ymouse<=30){
this._alpha==60;
thix._scale==160;
};
if(ymouse<=20){
this._alpha==80;
thix._scale==140;
};
if(ymouse<=10){
this._alpha==100;
thix._scale==120;
};
}
[/AS]

these actions are on each MC

I KNOW THIS IS A SLOPPY WORK AROUND, this is just how im doing it now…

thx in advance

hawk

Workaround? That script won’t even work so I don’t see how that is what you have on your clips.

_root.this? (doesn’t exist)
thix? (doesn’t exist)
== to set a variable to equal something? (== is to check if two values are equal to eachother)

Try something like this…

[AS]MovieClip.prototype.scaleClip = function() {
//get the effected area, aka the width of the clip
this.area = this._width;
//onMouseMove dynamic event handler
this.onMouseMove = function() {
//time for basic trig
//distance x
this.dx = this._x-_root._xmouse;
//distance y
this.dy = this._y-_root._ymouse;
//hypotenuse between points dx and dy
this.hyp = Math.sqrt(this.dxthis.dx+this.dythis.dy);
//if the hypotenuse width is within the area variable value
if (this.hyp<this.area) {
//this creates the scaling
this.strength = Math.pow((this.area-this.hyp)/this.area, 3);
//scale the clip (15 is minimum scale, 100 is max scale)
this._xscale = this._yscale=this._alpha=15+100*this.strength;
} else {
//else if the hypotenuse is not within the area variable
//set the _xscale, _yscale, and _alpha to 15
this._xscale = this._yscale=this._alpha=15;
}
};
};
f1.scaleClip();
f2.scaleClip();
f3.scaleClip();
f4.scaleClip();[/AS]

instead of typing f1.scaleClip(), f2.scaleClip() etc etc you can use a for loop.

[AS]//create for loop to cycle through the clips
for (var i = 1; i<=50; i++) {
//set a variable that contains the instance name of the clip
clip = this[“f”+i];
//assign the function to the instance
clip.scaleClip();
}[/AS]

LOL, i had a few typos, as well as i dont fully know AS yet, not nearly… and u lost right at… ur first post… but when i learn more AS ill come back to this thread and go… ohhhhhhh…

:smiley:

thx for ur time
hawk