In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

particle

パーティクルイベント
Get Adobe Flash player
by _perfect 10 Oct 2010
    Embed
/*flash:_perfect*/
package {
    import com.adobe.viewsource.ViewSource;
    //import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import org.papervision3d.materials.special.ParticleMaterial;
    import org.papervision3d.objects.special.ParticleField;
    import org.papervision3d.view.BasicView;
    import flash.filters.GlowFilter;
    [SWF(width = 640, height=480,backgroundColor=0x000000,frameRate=60)]
    public class Particle extends BasicView{
        public function Particle(){
            var particleMat:ParticleMaterial = new ParticleMaterial(0x00ffff, 1);//パーティクル設定(色とアルファ値)
            var particles:ParticleField = new ParticleField(particleMat, 1500, 4, 2000, 2000, 2000);//大きさ2000の立方体の中に大きさ4のパーティクルを1000個生成
            var filter:GlowFilter = new GlowFilter(0x44ffff, 1.0, 12, 12, 6, 10);//グローフィルタ
            filters = [filter];
            scene.addChild(particles);
            startRendering();
            addEventListener(Event.ENTER_FRAME, function():void{
                if(stage.mouseX > stage.stageWidth/2){
                    particles.rotationX -= (stage.mouseY - stage.stageHeight/2)/100;
                }else{
                    particles.rotationX += (stage.mouseY - stage.stageHeight/2)/100;
                }
                particles.rotationY -= (stage.mouseX - stage.stageWidth/2)/100;
            });
        }
    }
}