Using existing DisplayObjects with Flint
Posted in Flash on April 3rd, 2009 by Simen – Be the first to commentI wanted to create a random cloud generator with Flint using existing DisplayObjects, it took a while to find the right initializer but after that it’s a breeze!
public class CloudsView extends View { public function CloudsView() { // This class is exported from the IDE; containing // instances of the particles I want to use. var particles:Array = new Array(); while (numChildren) { particles.push(removeChildAt(0)); } var emitter:Emitter2D = new Emitter2D(); ... emitter.addInitializer(new SharedImages(particles));
