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


embed

FORKED
  1. // forked from mtok's Tweetcoding 向けのテンプレート
  2. /*
  3. *TweetCoding site
  4. http://tweetcoding.machine501.com/
  5. *Description
  6. http://gskinner.com/playpen/tweetcoding.html
  7. *Rules
  8. you cannot modify the "gimme" code.
  9. your entry must be submittable as a single 140 character tweet.
  10. no additional assets.
  11. AS3 strict mode should be off, targeting player 10.
  12. anyone should be able to compile your entry with just your tweet, Flash CS4, and these 
  13. ルール
  14. 1.gimmeコードは変更できません
  15. 2.twitterで送信可能な140文字以内でコードを書くこと。
  16. 3.strictモードはオフ プレーヤのターゲットは10とする。
  17. ※注wonderflはstrictモードをオフできないので
  18. strictモードをオフする必要がある場合はコピペしてローカルで使ってね。
  19. というか、ほとんどそうだろうけど。
  20. http://www.kelvinluck.com/assets/tweetcoding/
  21. */
  22. package 
  23. {
  24.     import flash.display.Graphics;
  25.     import flash.display.Sprite;
  26.     import flash.events.Event;
  27.     public class Main extends Sprite 
  28.     {
  29.         
  30.         public function Main():void 
  31.         {
  32.             addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
  33.             
  34.         }
  35.         
  36.         private function addedToStageHandler(e:Event):void 
  37.         {
  38.             var g:Graphics = graphics;
  39.             var mt:Function = g.moveTo;
  40.             var lt:Function = g.lineTo;
  41.             var ls:Function = g.lineStyle;
  42.             var m:Class = Math;
  43.             var r:Function = Math.random;
  44.             var s:Function = Math.sin;
  45.             var i:int = 0;            //frame counter
  46.             var o:* = { };            //store persistent data
  47.             addEventListener(Event.ENTER_FRAME, function():void { 
  48.                 //Put your own code 
  49.             } );
  50.         }
  51.     }
  52.     
  53. }
noswf
Get Adobe Flash Player