Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

help on stopping action script

New Here ,
Jan 28, 2014 Jan 28, 2014

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);

TOPICS
ActionScript
578
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 29, 2014 Jan 29, 2014
LATEST

What you likely need to do is the delete the onEnterFrame and somehow set the value of i to be equal to n within that function or otherwise stop the looping

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines