# \[Flash CS5\] floating leaves/petals, need help!

**URL:** <https://forum.kirupa.com/t/flash-cs5-floating-leaves-petals-need-help/321568>\
**Category:** flash\
**Created:** [April 23, 2011, 9:20pm UTC](https://forum.kirupa.com/t/flash-cs5-floating-leaves-petals-need-help/321568 "2011-04-23T21:20:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marisama](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@marisama](https://forum.kirupa.com/u/marisama)\
**Post date:** [April 23, 2011, 9:20pm UTC](https://forum.kirupa.com/t/flash-cs5-floating-leaves-petals-need-help/321568/1 "2011-04-23T21:20:41Z")

</div>

What I’m trying to accomplish is to construct a movie clip using actionscripting. I have 6 small flower/petal .png’s to use, which i want to randomly spawn and waft down through the movie clip at the rate of falling snow, leaves or flower petals. Rotating would be a cool added effect, if that’s possible.

I checked around and havent been able to find a suitable tutorial for what i want to do. I tried your snow 2.0 tutorial and failed, then I tried the 3.0 snow tutorial, and it seems to be working for now, but I need help to get it to work, or maybe advice on an alternative way that would be easier to work with.

[http://www.kirupa.com/developer/flash8/snow2.htm](http://www.kirupa.com/developer/flash8/snow2.htm)

I was going to make one movie clip for each png I want to use and just turn down the number of spawn frequency to see if I could get the achieved effect, a nice mix without the background being too cluttered.

Also this actionscript spawns the flower images halfway on the frame I want to apply it to. Since theres no movie clip to drag onto the scene and possition with this technique, and its all script based, how do I get it to spawn within the viewing window instead of half off to the side?

If I put a masking layer on top of this, will it mask the flowers into a specific area I want them to fall?
