# \[FMX\]anyone can help me to fix this FLA,please?

**URL:** <https://forum.kirupa.com/t/fmx-anyone-can-help-me-to-fix-this-fla-please/76681>\
**Category:** flash\
**Created:** [January 20, 2005, 3:43pm UTC](https://forum.kirupa.com/t/fmx-anyone-can-help-me-to-fix-this-fla-please/76681 "2005-01-20T15:43:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scha](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@scha](https://forum.kirupa.com/u/scha)\
**Post date:** [January 20, 2005, 3:43pm UTC](https://forum.kirupa.com/t/fmx-anyone-can-help-me-to-fix-this-fla-please/76681/1 "2005-01-20T15:43:10Z")

</div>

I got a flash,it’s about spark.  
I want to learn its ActionScript,but it’s a bad test.

Attach Files[color=red]spark.zip[/color]

Reason:the spark is infinite loop.

can anyone help me to check it,please?  
thx.

## ===================== the main Frame 1:

## gravity = 0.97999999999999998; setProperty("/spark", \_visible, false); startDrag("/draggie", true);

## one Moive clip 2 frames use the same AS

## zpos += …/:zspeed; scale = (zpos \* 4 + 100) / 100; factor = (zpos / 10 + 100) / 100; setProperty("…/spark", \_x, (getProperty("…/spark", \_x) + …/:xspeed) \* factor); …/:yspeed += /:gravity; setProperty("…/spark", \_y, (getProperty("…/spark", \_y) + …/:yspeed) \* factor); setProperty("…/spark", \_xscale, scale \* 100); setProperty("…/spark", \_yscale, scale \* 100); setProperty("…/spark", \_alpha, (getProperty("…/spark", \_alpha) - …/:fade)); if (getProperty("…/spark", \_alpha) \< 0) { removeMovieClip("…/spark"); }

## the Button

## on (release) { temp = 1; while (10 \>= temp) { current = random(1000); duplicateMovieClip("/spark", (“spark” add current), (current + 1182793728)); setProperty(("/spark" add current), \_x, \_x); setProperty(("/spark" add current), \_y, \_y); set((("/spark" add current) add “:xspeed”), (random(6) - 3) + 1); set((("/spark" add current) add “:yspeed”), random(8) \* -1); set((("/spark" add current) add “:zspeed”), random(10) - 5); set((("/spark" add current) add “:fade”), random(5) + 3); temp += 1; } }
