# Help on actionscript

**URL:** <https://forum.kirupa.com/t/help-on-actionscript/332103>\
**Category:** flash\
**Created:** [January 29, 2014, 3:35am UTC](https://forum.kirupa.com/t/help-on-actionscript/332103 "2014-01-29T03:35:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruwan\_Perera](https://avatars.discourse-cdn.com/v4/letter/r/58f4c7/32.png) [@Ruwan\_Perera](https://forum.kirupa.com/u/Ruwan_Perera)\
**Post date:** [January 29, 2014, 3:35am UTC](https://forum.kirupa.com/t/help-on-actionscript/332103/1 "2014-01-29T03:35:11Z")

</div>

im using this actionscript code to generate fire effect on my flash ad but i want this code to disable in a frame when the ad plays, can you pls help me on this.

function mover(){  
this.\_y += this.speed;  
}  
function fire(x1,n){  
for(i = 0; i\<n; i++){  
path = this.createEmptyMovieClip(“path”+i, i);  
path.\_x = Math.random()_x1;  
path.startFrame = 2_Math.abs(25 - path.\_x);  
dot = this.path.attachMovie(“flame”, “flame”, 0);  
dot.speed = -(Math.random()\*5+1);  
dot.gotoAndPlay(Math.round(Math.random()\*34));  
dot.onEnterFrame= mover;  
}  
}  
fire(600, 725);
