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

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

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


FAVORITE BY
:
Stars
FORKED
  1. // forked from butr0s's Star Field
  2. // Just a star field!
  3. package {
  4.     import flash.display.Sprite;
  5.     [SWF(width="465", height="465", backgroundColor="0x000000", frameRate="30")]
  6.     public class StarField extends Sprite {
  7.         public function StarField():void { main = this; initialize(); }
  8.     }
  9. }
  10. import flash.display.*;
  11. //import flash.geom.*;
  12. import flash.events.Event;
  13. var SCREEN_WIDTH:int = 465, SCREEN_HEIGHT:int = 465;
  14. var main:Sprite, g:Graphics;
  15. //var stars:Vector.<Star> = new Vector.<Star>;
  16. var stars:Array = new Array(1000);
  17. function initialize():void {
  18.     g = main.graphics;
  19.     main.addEventListener(Event.ENTER_FRAME, update);
  20.     for(var i:int = 0; i < 500; i++) stars[i] = new Star();
  21. }
  22. function update(e:Event):void {
  23.     g.clear();
  24.     for each(var s:Star in stars) s.update();
  25. }
  26. class Star extends Sprite {
  27.     public var position:Object = new Object();
  28.     public var velocity:Object = new Object();
  29.     
  30.     public function Star():void {
  31.         position.x = Math.random() * SCREEN_WIDTH;
  32.         position.y = Math.random() * SCREEN_HEIGHT;
  33.         position.z = Math.random() * 8;
  34.         
  35.         velocity.x = position.z * -1/4;    // 5 being an arbitrary "speed up" number
  36.         velocity.y = velocity.z = 0;
  37.     }
  38.     
  39.     public function update():void {
  40.         //position.incrementBy(velocity);
  41.         position.x += velocity.x;
  42.         if(position.x < 0) position.x = SCREEN_WIDTH;
  43.         alpha = position.x;
  44.         g.lineStyle(position.z, 0xffffff, 0.8);
  45.         g.moveTo(position.x, position.y);
  46.         g.lineTo(position.x + 1, position.y);
  47.     }
  48. }
noswf
  1. // forked from butr0s's Star Field
  2. // Just a star field!
  3. package {
  4.     import flash.display.Sprite;
  5.     [SWF(width="465", height="465", backgroundColor="0x000000", frameRate="30")]
  6.     public class StarField extends Sprite {
  7.         public function StarField():void { main = this; initialize(); }
  8.     }
  9. }
  10. import flash.display.*;
  11. //import flash.geom.*;
  12. import flash.events.Event;
  13. var SCREEN_WIDTH:int = 465, SCREEN_HEIGHT:int = 465;
  14. var main:Sprite, g:Graphics;
  15. //var stars:Vector.<Star> = new Vector.<Star>;
  16. var stars:Array = new Array(1000);
  17. function initialize():void {
  18.     g = main.graphics;
  19.     main.addEventListener(Event.ENTER_FRAME, update);
  20.     for(var i:int = 0; i < 500; i++) stars[i] = new Star();
  21. }
  22. function update(e:Event):void {
  23.     g.clear();
  24.     for each(var s:Star in stars) s.update();
  25. }
  26. class Star extends Sprite {
  27.     public var position:Object = new Object();
  28.     public var velocity:Object = new Object();
  29.     
  30.     public function Star():void {
  31.         position.x = Math.random() * SCREEN_WIDTH;
  32.         position.y = Math.random() * SCREEN_HEIGHT;
  33.         position.z = Math.random() * 8;
  34.         velocity.z = 1;//Math.random() * 100;
  35.         velocity.x = position.z * -1/4;    // 5 being an arbitrary "speed up" number
  36.         velocity.y = velocity.z = 0;
  37.     }
  38.     
  39.     public function update():void {
  40.         //position.incrementBy(velocity);
  41.                 move();
  42.         position.x += velocity.x;
  43.                 position.y += velocity.y;
  44.                 position.z += 1;
  45.         if(position.x < 0) {position.x = SCREEN_WIDTH;position.z = 0;}
  46.         
  47.         g.lineStyle(position.z, 0xffcc00, 0.8);
  48.         g.moveTo(position.x, position.y);
  49.                 g.lineTo(position.x + 1, position.y);
  50.     }
  51.         public function move():void{
  52.              velocity.x = position.z * -14;
  53.         }
  54. }
noswf
  1. // forked from butr0s's Star Field
  2. // Just a star field!
  3. package {
  4.     import flash.display.Sprite;
  5.     [SWF(width="465", height="465", backgroundColor="0x000000", frameRate="30")]
  6.     public class StarField extends Sprite {
  7.         public function StarField():void { main = this; initialize(); }
  8.     }
  9. }
  10. import flash.display.*;
  11. //import flash.geom.*;
  12. import flash.events.Event;
  13. var SCREEN_WIDTH:int = 465, SCREEN_HEIGHT:int = 465;
  14. var main:Sprite, g:Graphics;
  15. //var stars:Vector.<Star> = new Vector.<Star>;
  16. var stars:Array = new Array(1000);
  17. function initialize():void {
  18.     g = main.graphics;
  19.     main.addEventListener(Event.ENTER_FRAME, update);
  20.     for(var i:int = 0; i < 500; i++) stars[i] = new Star();
  21. }
  22. function update(e:Event):void {
  23.     g.clear();
  24.     for each(var s:Star in stars) s.update();
  25. }
  26. class Star extends Sprite {
  27.     public var position:Object = new Object();
  28.     public var velocity:Object = new Object();
  29.     
  30.     public function Star():void {
  31.         position.x = Math.random() * SCREEN_WIDTH;
  32.         position.y = Math.random() * SCREEN_HEIGHT;
  33.         position.z = Math.random() * 8;
  34.         
  35.         velocity.x = position.z * -1/4;    // 5 being an arbitrary "speed up" number
  36.         velocity.y = velocity.z = 0;
  37.     }
  38.     
  39.     public function update():void {
  40.         //position.incrementBy(velocity);
  41.         position.x += velocity.x;
  42.         if(position.x < 0) position.x = SCREEN_WIDTH;
  43.         
  44.         g.lineStyle(position.z, 0xffffff, 0.8);
  45.         g.moveTo(position.x, position.y);
  46.         g.lineTo(position.x + 1, position.y);
  47.     }
  48. }
noswf
Get Adobe Flash Player