I added the snow effect to one of my movies, it plays from the time you add
the action script, to the end of the movie. I only want it to play in certain
scenes, is there any way to do that?
Create the snow effect inside a movie clip symbol in your scene.
After you got the snow working within a movie clip symbol go to your code where you change scenes.
Right before your code to change scenes use a removeMovieClip() command on the clips instance name. So let’s say you give it the instance name “snowStorm” you will remove it like snowStorm.removeMovieClip(); In theory this should work, never tried it though.
Oh yeah… and keep in mind that since your code and all snow clips are going inside the movie clip symbol the targetting will change. That means in this code…
[AS]for (k=0; k<50; k++) {
duplicateMovieClip(_root.snow, “snow”+k, k);
}[/AS]
Remove _root so that it just says “snow” (no quotes), or you can use this.snow.
And to keep dragging this out I have a few questions…
Snow in the Spring/Summer season? Live in a snowy area eh?..lol
And as a little tip… as you get more comfortable with Flash, try and steer away from scenes as much as you can, it will be good for you as Flash kinda sucks with scenes, and putting everything into one file seriously beefs up file size… that was why loadMovie() was created
I don’t think you can use removeMovieClip when you make the movieclip in the authoring tool. You have to attach the movieclip using attachMovie(); or duplicateMovieClip .
Yeah, or you could set its _visible property to 0. Anyway, I hope in the next version Macromedia fix scenes, or take them out. It’s one of the most buggy things in Flash at the moment.
Originally posted by lostinbeta FRIGGIN FRAGGIN!!! I have been coder retarded for weeks now, this is the longest funk i’ve been in with AS… it makes me sad
*Originally posted by njs12345 *
**I don’t think you can use removeMovieClip when you make the movieclip in the authoring tool. You have to attach the movieclip using attachMovie(); or duplicateMovieClip . **
*Originally posted by njs12345 *
**Yeah, or you could set its _visible property to 0. Anyway, I hope in the next version Macromedia fix scenes, or take them out. It’s one of the most buggy things in Flash at the moment. **
its not as buggy as much as it is misunderstood. They are what they are, but arent quite what they intuitively should be. :-\
… I think Lost had it closest with
Originally posted by lostinbeta Create the snow effect inside a movie clip symbol in your scene
If you put the effect in a clip and just run it through that, then when that clip is no longer on the timeline of the scene, it will be removed, despite whatever attaching has been going on within it. Because its all contained within that clip and not being maintained within the main timeline itself (which applies to all scenes) then when the clip is gone, so is the effect. If you ever go back to that scene, the clip will be reinstated and reactivated bringing back the snow. The removeMovieclip shouldnt be necessary since its handled by the timeline.
Originally posted by senocular If you put the effect in a clip and just run it through that, then when that clip is no longer on the timeline of the scene, it will be removed, despite whatever attaching has been going on within it. Because its all contained within that clip and not being maintained within the main timeline itself (which applies to all scenes) then when the clip is gone, so is the effect. If you ever go back to that scene, the clip will be reinstated and reactivated bringing back the snow. The removeMovieclip shouldnt be necessary since its handled by the timeline.
and that’s exactly what i meant to say… the only difference is that you explained it.