流光溢彩

 

 

代码:

 

import org.flintparticles.common.counters.Blast;
import org.flintparticles.common.displayObjects.RadialDot;
import org.flintparticles.common.initializers.ColorInit;
import org.flintparticles.common.initializers.ImageClass;
import org.flintparticles.common.initializers.ScaleImageInit;

 

        private function setupSnow():void
        {
            var emitter:Emitter2D = new Emitter2D();
            //   emitter.counter = new Steady (1);
               emitter.counter = new Blast( 10)
            emitter.addInitializer( new ColorInit( 0xFFFF00FF, 0xFF00FFFF ) );
            emitter.addInitializer( new ImageClass( RadialDot, 2 ) );
            //emitter.addInitializer( new Position( new RectangleZone( 0, 260, 500, 340 ) ) );

              emitter.addInitializer( new Position( new LineZone( new Point( 0, 200), new Point( 0,400 ) ) ) );
             emitter.addInitializer( new Velocity( new PointZone( new Point( 80, 0 ) ) ) );
            emitter.addInitializer(new ScaleImageInit(0.75, 4));
            emitter.addAction(new Move());
          //    emitter.addAction(new DeathZone(new RectangleZone(0,200, 1000, 400), true));
             emitter.addAction( new BoundingBox( 0, 260, 500, 340 ) );
            emitter.addAction(new RandomDrift(15,15));
        /*     var flintRenderer:DisplayObjectRenderer = new DisplayObjectRenderer();
            addChild(flintRenderer);
            flintRenderer.addEmitter(emitter); */
           var flintRenderer:BitmapRenderer = new BitmapRenderer( new Rectangle( 0, 250, 500, 350 ) );
            flintRenderer.addFilter( new BlurFilter( 2, 2, 1 ) );
            flintRenderer.addEmitter( emitter );
            addChild( flintRenderer );
            emitter.start();
        }

你可能感兴趣的:(Flex,velocity)