all groups > flash actionscript > november 2004 >
You're in the

flash actionscript

group:

Remove the Animation Script


Remove the Animation Script Tical18433
11/16/2004 9:36:13 PM
flash actionscript:
My animation plays fine in scene 1 but when I go to scene 2 (where none of the
graphics, scripts, etc for the animation are located), the animation still
plays (at least part of it). Do I need to add some script to clear the scene
so each scene is independant of the others?
Re: Remove the Animation Script VisionaryStudios
11/16/2004 9:49:15 PM
How are you adding the animation to the scene Tical?
Re: Remove the Animation Script Tical18433
11/16/2004 10:01:24 PM
Here is my script I'm using numstars = 20; speed = 5; star_field = new
Array(numstars); // x is x axis, y is y axis, z is speed of star function
star(x, y, speed) { this.x = x; this.y = y; this.speed = speed; } for (i=0;
i<numstars; i++) { star_field = new star(random(800), random(600),
random(speed)+1); duplicateMovieClip('star', 'star_' add i, i+10); } for
(i=0; i<numstars; i++) { star_field.x += star_field.speed; if
(star_field.x>800) { star_field.x = 0; } setProperty('star_' add i, _x,
star_field.x); setProperty('star_' add i, _y, star_field.y); } This animation
is a starfield script I borrowed that I incorporated our company logo into. I
want this to go away when i go to the next scene and what happens when i change
scenes is that the starfield animation shows up on thenext scene but is frozen
as a background image. I want the background to be clean when I change scenes.

AddThis Social Bookmark Button