# Im lost... help me Lost!

**URL:** <https://forum.kirupa.com/t/im-lost-help-me-lost/18979>\
**Category:** Uncategorized\
**Created:** [April 23, 2003, 5:14am UTC](https://forum.kirupa.com/t/im-lost-help-me-lost/18979 "2003-04-23T05:14:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hawk](https://avatars.discourse-cdn.com/v4/letter/h/22d042/32.png) [@Hawk](https://forum.kirupa.com/u/Hawk)\
**Post date:** [April 23, 2003, 5:14am UTC](https://forum.kirupa.com/t/im-lost-help-me-lost/18979/1 "2003-04-23T05:14:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 5:22am UTC](https://forum.kirupa.com/t/im-lost-help-me-lost/18979/2 "2003-04-23T05:22:57Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 5:38am UTC](https://forum.kirupa.com/t/im-lost-help-me-lost/18979/3 "2003-04-23T05:38:14Z")

</div>

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.dx_this.dx+this.dy_this.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]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 5:43am UTC](https://forum.kirupa.com/t/im-lost-help-me-lost/18979/4 "2003-04-23T05:43:18Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 24, 2003, 2:17am UTC](https://forum.kirupa.com/t/im-lost-help-me-lost/18979/5 "2003-04-24T02:17:10Z")

</div>

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…

😃

thx for ur time  
hawk
