※現在、「wonderfl build flash online」求人コンテンツ制作に関してのアンケートを実施中です!みなさまのお力添えを頂いて、続々とアンケート結果が集まっていますが、まだまだ募集しております。ご協力のほど、どうぞよろしくお願いいたします!

wonderfl運営事務局
→アンケートページ(※ログインしてからお答えいただけるようになっています。)

 notice: Flash editor updated! Join the development! Thanks to MiniBuilder


forked from : flastar's flash on 2009-2-5 [diff(65)]

FORKED
  1. // forked from flastar's forked from: flash on 2009-2-5
  2. package  
  3. {
  4.     import flash.display.Bitmap;
  5.     import flash.display.BitmapData;
  6.     import flash.display.Sprite;
  7.     import flash.display.StageAlign;
  8.     import flash.display.StageScaleMode;
  9.     import flash.events.Event;
  10.     import flash.filters.BlurFilter;
  11.     import flash.filters.ColorMatrixFilter;
  12.     import flash.geom.Point;
  13.     
  14.     /**
  15.      * ...
  16.      * @author Sergey Gonchar
  17.      */
  18.     [SWF(width=800, height=600, backgroundColor=0xffffff, frameRate=24)]
  19.     public class FlashTest extends Sprite
  20.     {
  21.         
  22.         public function FlashTest() 
  23.         {
  24.             this.addEventListener(Event.ADDED_TO_STAGE, _init);
  25.         }
  26.         private function _init(e:Event):void
  27.         {
  28.             this.removeEventListener(Event.ADDED_TO_STAGE, _init);
  29.             
  30.             stage.align = StageAlign.TOP_LEFT;
  31.             stage.scaleMode = StageScaleMode.NO_SCALE;
  32.             var bmd:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight);
  33.             addChild(new Bitmap(bmd));
  34.             var cont:Sprite = new Sprite();  
  35.             addChild(cont);
  36.             cont.x=stage.stageWidth/2;
  37.             cont.y=stage.stageHeight/2;
  38.             for (var i:int = 1; i < 5; i++)
  39.                 for (var j:int = 1; j < 5; j++)
  40.                     for (var ij:int = 1; ij < 5; ij++) 
  41.                     {
  42.                         var obj:Sprite=new Sprite(); 
  43.                         obj.x=250 *(i/5 - .5);
  44.                         obj.y=250 * (j / 5 - .5);
  45.                         obj.z=250 * (ij / 5 - .5);
  46.                         obj.graphics.beginFill(0x444444,1); 
  47.                         obj.graphics.drawCircle(005); 
  48.                         cont.addChild(obj);             
  49.                     }
  50.             addEventListener(Event.ENTER_FRAME, function loop(e:Event):void{
  51.                 for(var h:int=0; h<cont.numChildren; h++)
  52.                 {
  53.                     var rz1:Number = (cont.getChildAt(h).y*Math.sin(cont.mouseY/20 * (Math.PI/180)) + cont.getChildAt(h).z*Math.cos(cont.mouseY/20 * (Math.PI/180)));
  54.                     cont.getChildAt(h).y = Number(cont.getChildAt(h).y*Math.cos(cont.mouseY/20 * (Math.PI/180)) - cont.getChildAt(h).z*Math.sin(cont.mouseY/20 * (Math.PI/180)));
  55.                     cont.getChildAt(h).z = Number(-cont.getChildAt(h).x*Math.sin(cont.mouseX/20 * (Math.PI/180)) + rz1*Math.cos(cont.mouseX/20 * (Math.PI/180)));
  56.                     cont.getChildAt(h).x = Number(cont.getChildAt(h).x*Math.cos(cont.mouseX/20 * (Math.PI/180))+rz1*Math.sin(cont.mouseX/20 * (Math.PI/180)));
  57.                     cont.getChildAt(h).scaleX = 300 / (cont.getChildAt(h).z+250);
  58.                     cont.getChildAt(h).scaleY = 300 / (cont.getChildAt(h).z+250);                    
  59.                 }
  60.                 bmd.draw(cont.parent);
  61.                 bmd.applyFilter(bmd, bmd.rect, new Point(00), new BlurFilter());
  62.                 bmd.applyFilter(bmd, bmd.rect, new Point(00), new ColorMatrixFilter([ 00010001000100001000])); 
  63.                 bmd.scroll(10,0);
  64.             });
  65.         }
  66.     }
  67. }
noswf
  1. // forked from flastar's forked from: flash on 2009-2-5
  2. package  
  3. {
  4.     import flash.display.Bitmap;
  5.     import flash.display.BitmapData;
  6.     import flash.display.Sprite;
  7.     import flash.display.StageAlign;
  8.     import flash.display.StageScaleMode;
  9.     import flash.events.Event;
  10.     import flash.filters.BlurFilter;
  11.     import flash.filters.ColorMatrixFilter;
  12.     import flash.geom.Point;
  13.     
  14.     /**
  15.      * ...
  16.      * @author Sergey Gonchar
  17.      */
  18.     [SWF(width=800, height=600, backgroundColor=0xffffff, frameRate=24)]
  19.     public class FlashTest extends Sprite
  20.     {
  21.         
  22.         public function FlashTest() 
  23.         {
  24.             this.addEventListener(Event.ADDED_TO_STAGE, _init);
  25.         }
  26.         private function _init(e:Event):void
  27.         {
  28.             this.removeEventListener(Event.ADDED_TO_STAGE, _init);
  29.             
  30.             stage.align = StageAlign.TOP_LEFT;
  31.             stage.scaleMode = StageScaleMode.NO_SCALE;
  32.             var bmd:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight);
  33.             addChild(new Bitmap(bmd));
  34.             var cont:Sprite = new Sprite();  
  35.             addChild(cont);
  36.             cont.x=stage.stageWidth/2;
  37.             cont.y=stage.stageHeight/2;
  38.             for (var i:int = 1; i < 5; i++)
  39.                 for (var j:int = 1; j < 5; j++)
  40.                     for (var ij:int = 1; ij < 5; ij++) 
  41.                     {
  42.                         var obj:Sprite=new Sprite(); 
  43.                         obj.x=250 *(i/5 - .5);
  44.                         obj.y=250 * (j / 5 - .5);
  45.                         obj.z=250 * (ij / 5 - .5);
  46.                         obj.graphics.beginFill(0x444444,1); 
  47.                         obj.graphics.drawCircle(005); 
  48.                         cont.addChild(obj);             
  49.                     }
  50.             addEventListener(Event.ENTER_FRAME, function loop(e:Event):void{
  51.                 for(var h:int=0; h<cont.numChildren; h++)
  52.                 {
  53.                     var rz1:Number = (cont.getChildAt(h).y*Math.sin(cont.mouseY/20 * (Math.PI/180)) + cont.getChildAt(h).z*Math.cos(cont.mouseY/20 * (Math.PI/180)));
  54.                     cont.getChildAt(h).y = Number(cont.getChildAt(h).y*Math.cos(cont.mouseY/20 * (Math.PI/180)) - cont.getChildAt(h).z*Math.sin(cont.mouseY/20 * (Math.PI/180)));
  55.                     cont.getChildAt(h).z = Number(-cont.getChildAt(h).x*Math.sin(cont.mouseX/20 * (Math.PI/180)) + rz1*Math.cos(cont.mouseX/20 * (Math.PI/180)));
  56.                     cont.getChildAt(h).x = Number(cont.getChildAt(h).x*Math.cos(cont.mouseX/20 * (Math.PI/180))+rz1*Math.sin(cont.mouseX/20 * (Math.PI/180)));
  57.                     cont.getChildAt(h).scaleX = 300 / (cont.getChildAt(h).z+250);
  58.                     cont.getChildAt(h).scaleY = 300 / (cont.getChildAt(h).z+250);                    
  59.                 }
  60.                 bmd.draw(cont.parent);
  61.                 bmd.applyFilter(bmd, bmd.rect, new Point(00), new BlurFilter());
  62.                 bmd.applyFilter(bmd, bmd.rect, new Point(00), new ColorMatrixFilter([ 00010001000100001000])); 
  63.                 bmd.scroll(10,0);
  64.             });
  65.         }
  66.     }
  67. }
noswf
  1. // forked from flastar's forked from: flash on 2009-2-5
  2. package  
  3. {
  4.     import flash.display.Bitmap;
  5.     import flash.display.BitmapData;
  6.     import flash.display.Sprite;
  7.     import flash.display.StageAlign;
  8.     import flash.display.StageScaleMode;
  9.     import flash.events.Event;
  10.     import flash.filters.BlurFilter;
  11.     import flash.filters.ColorMatrixFilter;
  12.     import flash.geom.Point;
  13.     
  14.     /**
  15.      * ...
  16.      * @author Sergey Gonchar
  17.      */
  18.     [SWF(width=300, height=10, backgroundColor=40, frameRate=5)]
  19.     public class FlashTest extends Sprite
  20.     {
  21.         
  22.         public function FlashTest() 
  23.         {
  24.             this.addEventListener(Event.ADDED_TO_STAGE, _init);
  25.         }
  26.         private function _init(e:Event):void
  27.         {
  28.             this.removeEventListener(Event.ADDED_TO_STAGE, _init);
  29.             
  30.             stage.align = StageAlign.TOP_LEFT;
  31.             stage.scaleMode = StageScaleMode.NO_SCALE;
  32.             var bmd:BitmapData = new BitmapData(stage.stageWidth/2, stage.stageHeight);
  33.             addChild(new Bitmap(bmd));
  34.             var cont:Sprite = new Sprite();  
  35.             addChild(cont);
  36.             cont.x=stage.stageWidth/2;
  37.             cont.y=stage.stageHeight/2;
  38.             for (var i:int = 1; i < 5; i++)
  39.                 for (var j:int = 1; j < 5; j++)
  40.                     for (var ij:int = 1; ij < 5; ij++) 
  41.                     {
  42.                         var obj:Sprite=new Sprite(); 
  43.                         obj.x=250 *(i/5 - .5);
  44.                         obj.y=250 * (j / 5 - .5);
  45.                         obj.z=250 * (ij / 5 - .5);
  46.                         obj.graphics.beginFill(0x444444,1); 
  47.                         obj.graphics.drawCircle(005); 
  48.                         cont.addChild(obj);             
  49.                     }
  50.             addEventListener(Event.ENTER_FRAME, function loop(e:Event):void{
  51.                 for(var h:int=0; h<cont.numChildren; h++)
  52.                 {
  53.                     var rz1:Number = (cont.getChildAt(h).y*Math.sin(cont.mouseY/20 * (Math.PI/180)) + cont.getChildAt(h).z*Math.cos(cont.mouseY/20 * (Math.PI/180)));
  54.                     cont.getChildAt(h).y = Number(cont.getChildAt(h).y*Math.cos(cont.mouseY/20 * (Math.PI/180)) - cont.getChildAt(h).z*Math.sin(cont.mouseY/20 * (Math.PI/180)));
  55.                     cont.getChildAt(h).z = Number(-cont.getChildAt(h).x*Math.sin(cont.mouseX/20 * (Math.PI/180)) + rz1*Math.cos(cont.mouseX/20 * (Math.PI/180)));
  56.                     cont.getChildAt(h).x = Number(cont.getChildAt(h).x*Math.cos(cont.mouseX/20 * (Math.PI/180))+rz1*Math.sin(cont.mouseX/20 * (Math.PI/180)));
  57.                     cont.getChildAt(h).scaleX = 300 / (cont.getChildAt(h).z+250);
  58.                     cont.getChildAt(h).scaleY = 300 / (cont.getChildAt(h).z+250);                    
  59.                 }
  60.                 bmd.draw(cont.parent);
  61.                 bmd.applyFilter(bmd, bmd.rect, new Point(00), new BlurFilter());
  62.                 bmd.applyFilter(bmd, bmd.rect, new Point(00), new ColorMatrixFilter([ 00010001000100001000])); 
  63.                 bmd.scroll(10,0);
  64.             });
  65.         }
  66.     }
  67. }
noswf
Get Adobe Flash Player