# Need Help!

**URL:** <https://forum.kirupa.com/t/need-help/29632>\
**Category:** Uncategorized\
**Created:** [August 28, 2003, 9:13pm UTC](https://forum.kirupa.com/t/need-help/29632 "2003-08-28T21:13:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheXboY](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@TheXboY](https://forum.kirupa.com/u/TheXboY)\
**Post date:** [August 28, 2003, 9:13pm UTC](https://forum.kirupa.com/t/need-help/29632/1 "2003-08-28T21:13:09Z")

</div>

I don’t know why when i tried to create a falling snow animation using actionscript it either one work and the other won’t why??

below is my code that i use for each one of them

onClipEvent (load) {  
//specifies the size of the movie stage  
movieWidth = 637;  
movieHeight = 479;

```
//variables that will modify the falling snow
i = 1+Math.random()*8;
k = -Math.PI+Math.random()*Math.PI;

//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*50;
this._alpha = 75+Math.random()*50;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;

```

}  
onClipEvent (enterFrame) {  
//putting it all together  
rad += (k/50)\*Math.PI;  
this.\_x -= Math.cos(rad);  
this.\_y += i;  
if (this.\_y\>=movieHeight) {  
this.\_y = -5;  
}  
if ((this.\_x\>=movieWidth) || (this.\_x\<=0)) {  
this.\_x = -10+Math.random()\*movieWidth;  
this.\_y = -5;  
}  
}

and this one comes with the one on top but this action is put in the frame 1

for (k=0; k\<25; k++) {  
duplicateMovieClip(\_root.bluestar, “bluestar”+k, k);  
}

* * *

This one is for a stripe or rain as i call it…

onClipEvent (load) {  
//specifies the size of the movie stage  
movieWidth = 200;  
movieHeight = 35;

```
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;

//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*50;
this._alpha = 75+Math.random()*50;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;

```

}  
onClipEvent (enterFrame) {  
//putting it all together  
rad += (k/50)\*Math.PI;  
this.\_x -= Math.cos(rad);  
this.\_y += i;  
if (this.\_y\>=movieHeight) {  
this.\_y = -5;  
}  
if ((this.\_x\>=movieWidth) || (this.\_x\<=0)) {  
this.\_x = -10+Math.random()\*movieWidth;  
this.\_y = -5;  
}  
}

Code for the Frame also on frame 1 but on different layer

for (k=0; k\<25; k++) {  
duplicateMovieClip(\_root.rain, “rain”+k, k);  
}

sorry it’s long. if anyone know anything about this please reply and also how can I move the animation to where ever I put it to.

let say I want the blue star to be bottom only and not at the top or at the corner only. Please let me know i am a beginner at this thanks!! if i miss some info about my question please let me know also…

thanks in advanced

---

<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:** [August 28, 2003, 11:48pm UTC](https://forum.kirupa.com/t/need-help/29632/2 "2003-08-28T23:48:30Z")

</div>

It may have something to do with where your code is placed. Could you post your fla?

---

<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:** [August 29, 2003, 1:00am UTC](https://forum.kirupa.com/t/need-help/29632/3 "2003-08-29T01:00:42Z")

</div>

thanx for helping me out

please follow the link below to download my .fla file

[http://www.i-marketings.com/cp/spacelayout.ace](http://www.i-marketings.com/cp/spacelayout.ace)

the file is kinda big and it’s kinda messy when you look into it.

thankz in advanced

---

<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:** [August 29, 2003, 2:15am UTC](https://forum.kirupa.com/t/need-help/29632/4 "2003-08-29T02:15:46Z")

</div>

What’s an ace file?? Could you zip it instead?

---

<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:** [August 29, 2003, 3:32am UTC](https://forum.kirupa.com/t/need-help/29632/5 "2003-08-29T03:32:14Z")

</div>

lol use winace to unzip it ;0) [winace.com](http://winace.com)

alrite let me put it to zip file

[http://www.i-marketings.com/cp/space.zip](http://www.i-marketings.com/cp/space.zip)

---

<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:** [August 29, 2003, 4:38am UTC](https://forum.kirupa.com/t/need-help/29632/6 "2003-08-29T04:38:26Z")

</div>

okay, make an extra movieClip off of the stage, could be empty, whatever. Put this on it:

```auto

onClipEvent (load) {
	for (k=0; k<50; k++) {
		duplicateMovieClip(_root.redstar, "redstar"+k, k);
	}
}

```

Then remove the “redstar” code from the timeline.

The problem you’re having is that it duplicates the movieClips onto level0. You cant have two of them on the same level, so move your code to the other movieClip and it should work for you. 😛
