# Actionscript still not working in flash 8.2

**URL:** <https://forum.kirupa.com/t/actionscript-still-not-working-in-flash-8-2/218815>\
**Category:** Uncategorized\
**Created:** [March 11, 2007, 1:54pm UTC](https://forum.kirupa.com/t/actionscript-still-not-working-in-flash-8-2/218815 "2007-03-11T13:54:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lane411](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lane411/32/3397_2.png) [@lane411](https://forum.kirupa.com/u/lane411)\
**Post date:** [March 11, 2007, 1:54pm UTC](https://forum.kirupa.com/t/actionscript-still-not-working-in-flash-8-2/218815/1 "2007-03-11T13:54:54Z")

</div>

The script was made in old flash 5.1  
i’m trying to update my website in 8.2  
this of course is the last script to fix.  
this is a starfield script,the stars must  
move from left to right , if someone  
knows of a script already let me know,all i  
have found was old 5.1 scripts…

there are three frames  
first frame of code:

numstars = 100;  
numlevels = 6;  
xmin = refrect.\_x;  
ymin = refrect.\_y;  
xmax = refrect.\_width;  
ymax = refrect.\_height;  
t = 1;  
while (Number(t)\<Number(numstars)) {  
duplicateMovieClip(“star”, t, t);  
xspeed = int((t/numstars)_numlevels);  
setProperty(t, \_x, Number(random(xmax))+Number(xmin));  
setProperty(t, \_y, Number(random(ymax))+Number(ymin));  
setProperty(t, \_xscale, xspeed_20);  
setProperty(t, \_yscale, xspeed\*20);  
tellTarget (t) {  
xspeed = xspeed;  
}  
t = Number(t)+1;  
}  
setProperty(“star”, \_visible, 0);  
setProperty(“refrect”, \_visible, 0);

Second frame of code:

t = 1;  
while (Number(t)\<Number(numstars)) {  
tellTarget (t) {  
xpos = Number(\_x)+Number(xspeed);  
}  
if (Number(xpos)\>Number((Number(xmax)+Number(xmin)))) {  
xpos = xpos-xmax;  
setProperty(t, \_y, Number(ymin)+Number((random(ymax))));  
}  
setProperty(t, \_x, xpos);  
t = Number(t)+1;  
}

Third frame of code:

gotoAndPlay(2);

Now there is’nt any error promblems but no movement from my stars

Three MC are refract,star,starfield…
