I’m not even sure that I am putting this in the right place. I originally posted it to the AS3 forum, but when I open a new flash movie, I am choosing 2.0. When I realized that, I posted it here. I apologize if I’ve posted to the wrong place.
I am using Flash CS3. I’m new at actionscripting and I do not understand it completely. I have a movie that has a few (2-4) scenes in it. Each scene is like its own “commercial” I created a holiday movie that has snowflakes falling using an online tutorial. The movie works fine by itself, but when I load it as a scene in the movie that has my “commercials”, the snowflakes continue to fall throughout the rest of the scenes. The holiday movie has a movie clip that has a snowflake falling straight down. The actionscripting duplicates the movie clip randomly as well as its opacity, postition, etc. I understand what I did during the tutorial, but I’m not sure how to get the snowflakes to stop falling throughout the rest of the scenes. I’ve tried entering a stop after the script but it just seems to stop the scene there without continuing to rotate through the rest of them. I don’t quite understand where to tell it to stop. Somewhere else on the actions timeline? In the movie clip itself? Here is the actionscript code I’m using:
this.createEmptyMovieClip(“canvas_mc”,10);
var i = 0;
myInterval = setInterval(addFlake,500);
function addFlake() {
if (i<20) {
var t:MovieClip = canvas_mc.attachMovie(“snowflake”,“flake”+i,canvas _mc.getNextHighestDepth());
i++;
t._xscale = t._yscale = Math.random()*80+20;
t._x = Math.random()*Stage.width;
t._y = -50;
t._alpha = Math.random()*40+50;
}
}
I hope I’ve provided enough info. Any help you can provide is greatly appreciated!!!