Massmedian

今回は、カヤックさんとのコラボ企画でしたので、楽しみにしておりました。
できれば、もう少し期間が長いとよかったのでは、と感じる次第です。
先日「FITC TOKYO 2009」に参加し、Flashで活躍できるステージはたくさんあると感じました。
マスメディアンでも、様々なセミナーを開いていきたいと思いますので、今後とも、マスメディアンをよろしくお願いいたします。

This time, collaboration with KAYAC Inc. is what I'm looking forward to. I wished the opening period should be a little longer. The other day, we participated "FITC TOKYO 2009" and realized we can do more with Flash. We are planning to held various seminor, so please feel free to join us.

  1. Queen
    該当者なし Not corresponding
  2. Bishop
    該当者なし Not corresponding
  3. Knight
    k3lab, _ueueueueue
    presentブレーン年間購読
    "BRAIN" one year subscription

View All Other Challengers

Knightk3lab

  1. // forked from checkmate's Checkmate vol.5 Sponser
  2. /** 
  3.  * 長押しでwancoをいっぱいしちゃいます。
  4.  *  
  5.  *  
  6.  * -参考- 
  7.  * 
  8.  * sample 7 
  9.  * http://wonderfl.net/code/34efee1f82818e7f1022705a17f6ae19296bb7d4
  10.  * 
  11.  */ 
  12. package 
  13. {
  14.     import flash.display.Loader;
  15.     import flash.display.MovieClip;
  16.     import flash.display.Sprite;
  17.     import flash.events.Event;
  18.     import flash.events.MouseEvent;
  19.     import flash.net.URLRequest;
  20.     import flash.display.StageScaleMode;
  21.     import flash.display.StageAlign;
  22.     import flash.system.ApplicationDomain;
  23.     
  24.     import jp.progression.commands.*;
  25.     import jp.progression.commands.lists.*;
  26.     import jp.progression.commands.display.*;
  27.     import jp.progression.commands.net.*;
  28.     import jp.progression.commands.tweens.*;
  29.     import jp.progression.events.*;
  30.     import jp.progression.data.*;
  31.     
  32.     import caurina.transitions.Tweener;
  33.     import caurina.transitions.properties.DisplayShortcuts;
  34.     import caurina.transitions.properties.CurveModifiers;
  35.     
  36.     import org.libspark.betweenas3.BetweenAS3;
  37.     import org.libspark.betweenas3.easing.*;
  38.     import org.libspark.betweenas3.tweens.ITween;
  39.     
  40.     public class Main extends Sprite 
  41.     {
  42.         public static var GRAPHICS_URL:String = "http://swf.wonderfl.net/static/assets/checkmate05/humanSponser.swf";
  43.         public static var GRAPHICS2_URL:String = "http://swf.wonderfl.net/static/assets/checkmate05/wancoAmateur.swf";
  44.         
  45.         public var birthMotion:MovieClip
  46.         
  47.         public var stayMotion:MovieClip; 
  48.         public var jumpMotion:MovieClip; 
  49.         public var highJumpMotion:MovieClip; 
  50.         public var walkMotion:MovieClip; 
  51.         public var runMotion:MovieClip; 
  52.         public var squatMotion:MovieClip; 
  53.         public var questionMotion:MovieClip; 
  54.         public var exclamationMotion:MovieClip; 
  55.         public var heartMotion:MovieClip; 
  56.         public var poutMotion:MovieClip; 
  57.         public var starMotion:MovieClip; 
  58.         public var singMotion:MovieClip; 
  59.         public var sleepMotion:MovieClip; 
  60.         public var wakeMotion:MovieClip; 
  61.         private var isDownFlg:Boolean;
  62.         private var isDownFlg2:Boolean;
  63.         
  64.         private var motionList:Array;
  65.         private var cnt:int;
  66.         
  67.         private var _arrow:Sprite;
  68.         public function Main():void 
  69.         {
  70.             DisplayShortcuts.init();
  71.             CurveModifiers.init();
  72.             if (stage) init();
  73.             else addEventListener(Event.ADDED_TO_STAGE, init);
  74.         }
  75.         private function init(e:Event = null):void 
  76.         {
  77.             removeEventListener(Event.ADDED_TO_STAGE, init);
  78.             stage.scaleMode = StageScaleMode.NO_SCALE; 
  79.             stage.align = StageAlign.TOP_LEFT;
  80.             var com:SerialList = new SerialList( null,
  81.                 new LoaderList( null,
  82.                     new LoadSWF( new URLRequest( GRAPHICS_URL ) ),
  83.                     new LoadSWF( new URLRequest( GRAPHICS2_URL ) )
  84.                 ),
  85.                 function():void {
  86.                     var loader:Loader = Loader(getResourceById(GRAPHICS_URL).data);
  87.                     var domain:ApplicationDomain = loader.contentLoaderInfo.applicationDomain;
  88.                     birthMotion = new ( domain.getDefinition( "BirthMotion" ) as Class )
  89.                     
  90.                     var loader2:Loader = Loader( getResourceById(GRAPHICS2_URL).data ); 
  91.                     var domain2:ApplicationDomain = loader2.contentLoaderInfo.applicationDomain; 
  92.                     stayMotion = new ( domain2.getDefinition( "StayMotion" ) as Class ); 
  93.                     jumpMotion = new ( domain2.getDefinition( "JumpMotion" ) as Class ); 
  94.                     highJumpMotion = new ( domain2.getDefinition( "HighJumpMotion" ) as Class ); 
  95.                     walkMotion = new ( domain2.getDefinition( "WalkMotion" ) as Class ); 
  96.                     runMotion = new ( domain2.getDefinition( "RunMotion" ) as Class ); 
  97.                     squatMotion = new ( domain2.getDefinition( "SquatMotion" ) as Class ); 
  98.                     questionMotion = new ( domain2.getDefinition( "QuestionMotion" ) as Class ); 
  99.                     exclamationMotion = new ( domain2.getDefinition( "ExclamationMotion" ) as Class ); 
  100.                     heartMotion = new ( domain2.getDefinition( "HeartMotion" ) as Class ); 
  101.                     poutMotion = new ( domain2.getDefinition( "PoutMotion" ) as Class ); 
  102.                     starMotion = new ( domain2.getDefinition( "StarMotion" ) as Class ); 
  103.                     singMotion = new ( domain2.getDefinition( "SingMotion" ) as Class ); 
  104.                     sleepMotion = new ( domain2.getDefinition( "SleepMotion" ) as Class ); 
  105.                 }
  106.             );
  107.             com.addEventListener(ExecuteEvent.EXECUTE_COMPLETE,onLoadSWF);
  108.             com.execute();
  109.         }
  110.         private function onLoadSWF(e:Event):void {
  111.             var s:ITween = BetweenAS3.tween(this, { scaleX:2.5, scaleY:2.5 }, null3.5, Linear.easeNone)
  112.             var base:ITween = BetweenAS3.serial(s, BetweenAS3.reverse(s));
  113.             base.stopOnComplete = false;
  114.             base.play();
  115.             
  116.             _arrow = addChild(new Arrow(103120)) as Sprite;
  117.             _arrow.rotation = 110;
  118.             var t:ITween = BetweenAS3.tween(_arrow, { x:98, y:129 }, null0.4,Exponential.easeInOut);
  119.             t.stopOnComplete = false;
  120.             t.play();
  121.             
  122.             addChild(birthMotion);
  123.             birthMotion.x = 90;
  124.             birthMotion.y = 150;
  125.             birthMotion.gotoAndStop(1);
  126.             birthMotion.addEventListener( MouseEvent.MOUSE_DOWN, down );
  127.             birthMotion.buttonMode = birthMotion.useHandCursor = true;
  128.             birthMotion.scaleX = birthMotion.scaleY = 0.5;
  129.             
  130.             motionList = [stayMotion, jumpMotion, highJumpMotion, walkMotion, runMotion, squatMotion, questionMotion, exclamationMotion, heartMotion, poutMotion, starMotion, singMotion, sleepMotion ];
  131.             stage.addEventListener(Event.ENTER_FRAME, enterFrameHandler); 
  132.             stage.addEventListener( MouseEvent.MOUSE_UP, up );
  133.         }
  134.         private function enterFrameHandler(evt:Event):void { 
  135.             if (!isDownFlg2) return
  136.             cnt++;
  137.             var wancoClass:Class = motionList[cnt%motionList.length].constructor;
  138.             var copyWanco:* = new wancoClass();
  139.             copyWanco.gotoAndStop(1)
  140.             copyWanco.x = 90
  141.             copyWanco.y = 65;
  142.             copyWanco.scaleX = copyWanco.scaleY = 0;
  143.             addChild(copyWanco);
  144.             
  145.             var endX:Number = Math.random() * stage.stageWidth + stage.stageWidth / 2
  146.             var ctlX:Number = mouseX + (endX - mouseX) / 2
  147.             Tweener.addTween(copyWanco, { 
  148.                 x: endX, 
  149.                 y: stage.stageHeight + 50,
  150.                 _bezier: [ { x: ctlX, y: 0 } ],
  151.                 _scale:1,
  152.                 time: 1
  153.                 delay:0.2,
  154.                 transition: "linear"
  155.                 onComplete: onTweenComplete, 
  156.                 onCompleteParams: [copyWanco] 
  157.             });
  158.             setChildIndex(birthMotion, numChildren - 1);
  159.         }
  160.          private function onTweenComplete(c:*):void 
  161.         { 
  162.             removeChild(c); 
  163.         } 
  164.         private function down(e:MouseEvent):void {
  165.             isDownFlg = true;
  166.             isDownFlg2 = true;
  167.             _arrow.visible = false;
  168.             var motion:MovieClip = e.target as MovieClip;
  169.             birthMotion.y = 150;
  170.             Tweener.addTween(motion, { _frame:32, time:0.5,transition:"linear",onComplete:loop,onCompleteParams:[motion] } );
  171.         }
  172.         private function loop(mc:MovieClip):void {
  173.             Tweener.addTween(mc, { _frame:21, time:0.3,transition:"linear",onComplete:loop2,onCompleteParams:[mc] } );
  174.         }
  175.         private function loop2(mc:MovieClip):void {
  176.             Tweener.addTween(mc, { _frame:32, time:0.3,transition:"linear",onComplete:loop,onCompleteParams:[mc] } );
  177.         }
  178.         private function up(e:Event):void {
  179.             isDownFlg2 = false;
  180.             if (!isDownFlg) return;
  181.             if (birthMotion.currentFrame > 20) {
  182.                 Tweener.addTween(birthMotion, { x:130, _frame:55, time:0.8, transition:"linear", onComplete:destroy } );
  183.             }else {
  184.                 Tweener.addTween(birthMotion, { x:130, _frame:55, time:1.4, transition:"linear", onComplete:destroy } );
  185.             }
  186.             function destroy():void {
  187.                 birthMotion.gotoAndStop(1);
  188.                 birthMotion.x = 90;
  189.                 isDownFlg = false;
  190.                 _arrow.visible = true;
  191.             }
  192.         }
  193.     }
  194.     
  195. }
  196. import flash.display.*; 
  197. class Arrow extends Sprite { 
  198.     function Arrow( x:Number, y:Number) { 
  199.         this.x = x; 
  200.         this.y = y; 
  201.         graphics.beginFill(0xFFFFFF, 1); 
  202.         graphics.lineStyle(1, 0x0); 
  203.         graphics.moveTo(24); 
  204.         graphics.lineTo(84); 
  205.         graphics.lineTo(80); 
  206.         graphics.lineTo(207); 
  207.         graphics.lineTo(814); 
  208.         graphics.lineTo(810); 
  209.         graphics.lineTo(210); 
  210.         graphics.lineTo(24); 
  211.     } 
flash swf thumbnail play
出題者からのコメント
ひとつひとつの動きにストーリーがうまれてきそうな感じで、これからの展開がたのしみです。
Comments from Sponsor
Every action would bring up the story. I'm looking forward to seeing further development after that.

Knight_ueueueueue

  1. // forked from checkmate's Checkmate vol.5 Sponser
  2. //コードがひどいのは気にしないです
  3. //タイトル画面等入れる前に力尽きました
  4. package {
  5.     import flash.display.*;
  6.     import flash.events.*;
  7.     import flash.media.Sound;
  8.     import flash.text.*;
  9.     import flash.utils.*;
  10.     import flash.net.*;
  11.     import flash.system.*;
  12.     import jp.progression.commands.*;
  13.     import jp.progression.commands.lists.*;
  14.     import jp.progression.commands.display.*;
  15.     import jp.progression.commands.net.*;
  16.     import jp.progression.commands.tweens.*;
  17.     import jp.progression.events.*;
  18.     import org.si.sion.*;
  19.     import org.si.sion.events.*;
  20.     import caurina.transitions.*;
  21.     
  22.     [SWF(backgroundColor=0x0)]
  23.     
  24.     public class Sponser extends Sprite {
  25.         public static var GRAPHICS_URL:String = "http://swf.wonderfl.net/static/assets/checkmate05/humanSponser.swf";
  26.         
  27.         private var flyJumpMotion:MovieClip;
  28.         private var gameStage:GameStage = new GameStage();
  29.         private var d:SiONDriver = new SiONDriver();
  30.         private var openingMelody:SiONData;
  31.         private var endMelody:SiONData;
  32.         private    var startFrame:int = 11;
  33.         private    var finalFrame:int = 32;
  34.         
  35.         public function Sponser() {
  36.             stage.scaleMode = StageScaleMode.NO_SCALE;
  37.             stage.align = StageAlign.TOP_LEFT;
  38.             
  39.             this.addChild(gameStage);
  40.             
  41.             var mml1:String = "t60;v4[r1e16^32>b32<e32r32a16&a8&a32 d16a16b16<f8&f32&f16>e32d32b16^32e32b16^32<e32r32e8&e8]1;v2[r1>e16^32>b32<e32r32a16&a8&a32 d16a16b16<f8&f32&f16>e32d32b16^32e32b16^32<e32r32e8&e8]1;";
  42.             var mml2:String = "t180;v4[r8d8&d8>a16r32<d16r8g8&g4&g8d8>a8<d8d2]1;v2[r8>d8&d8>a16r32<d16r8g8&g4&g8d8>a8<d8d2]1;";
  43.             openingMelody = d.compile(mml1);
  44.             endMelody = d.compile(mml2);
  45.             opening();
  46.             
  47.             var com:SerialList = new SerialList();
  48.             com.addCommand(
  49.                 new LoadSWF( new URLRequest( GRAPHICS_URL ) ),
  50.                 function():void {
  51.                     var loader:Loader = Loader( this.latestData );
  52.                     var domain:ApplicationDomain = loader.contentLoaderInfo.applicationDomain;
  53.                     flyJumpMotion = new ( domain.getDefinition( "FlyMotion" ) as Class );
  54.                 }
  55.             );
  56.             com.addEventListener(ExecuteEvent.EXECUTE_COMPLETE,onLoadSWF);
  57.             com.execute();
  58.         }
  59.         private function onLoadSWF(e:Event):void {
  60.             setMotion();
  61.         }
  62.         private function setMotion():void {
  63.             flyJumpMotion.stop();
  64.             flyJumpMotion.x = 50;
  65.             flyJumpMotion.y = -200;
  66.             flyJumpMotion.scaleX = -0.25;
  67.             flyJumpMotion.scaleY = 0.25;
  68.             flyJumpMotion.gotoAndStop(startFrame);
  69.             addChild(flyJumpMotion);
  70.             var m:Sprite = new Sprite();
  71.             m.graphics.beginFill(0xffffff);
  72.             m.graphics.drawRect(1545435365);
  73.             addChild(m);
  74.             flyJumpMotion.mask = m;
  75.             flyJumpMotion.addEventListener(Event.ENTER_FRAME, motionPlay);
  76.         }
  77.         private function motionPlay(e:Event):void {
  78.             flyJumpMotion.play();
  79.             flyJumpMotion.y += 2.0;
  80.             if (flyJumpMotion.y >= 545) {
  81.                 flyJumpMotion.removeEventListener(Event.ENTER_FRAME, motionPlay);
  82.                 removeChild(flyJumpMotion);
  83.                 gameOver();
  84.             }
  85.             if (flyJumpMotion.currentFrame == finalFrame) {
  86.                 flyJumpMotion.gotoAndPlay(startFrame);
  87.             }
  88.         }
  89.         private function clickHandler(e:Event):void {
  90.             var motion:MovieClip = e.currentTarget as MovieClip;
  91.             motion.gotoAndPlay(1);
  92.         }
  93.         private function delayRemove():void {
  94.             var t:Timer = new Timer(27001);
  95.             t.start();
  96.             t.addEventListener(TimerEvent.TIMER, function(e:Event):void { removeChild(gameStage); addText() } );
  97.         }
  98.         private function addText():void {
  99.             var fmt:TextFormat = new TextFormat();
  100.             fmt.color = 0xffffff;
  101.             var tf:TextField = new TextField();
  102.             tf.defaultTextFormat = fmt;
  103.             tf.x = (stage.stageWidth-tf.width) / 2;
  104.             tf.y = stage.stageHeight / 2;
  105.             tf.autoSize = TextFieldAutoSize.LEFT;
  106.             tf.text = "THE END";
  107.             this.addChild(tf);
  108.         }
  109.         private function opening():void {
  110.             d.play(openingMelody);
  111.         }
  112.         private function gameOver():void {
  113.             d.play(endMelody);
  114.             delayRemove();
  115.         }
  116.     }
  117. }
  118. import flash.display.*;
  119. class GameStage extends Sprite {
  120.     private var container:Sprite;
  121.     
  122.     private static const STAGE_WIDTH:int = 465;
  123.     private static const STAGE_HEIGHT:int = 465;
  124.     
  125.     function GameStage() {
  126.         container = new Sprite();
  127.         addChild(container);
  128.         drawBg();
  129.         drawLocationGauge();
  130.         drawIcon();
  131.         drawSky();
  132.         drawSea();
  133.         drawGround();
  134.         drawWall(0xffffff,2);
  135.         drawWall(0x0,0);
  136.     }
  137.     private function drawBg():void {
  138.         var bg:Shape = new Shape();
  139.         bg.graphics.beginFill(0x0, 1.0);
  140.         bg.graphics.drawRect(00, STAGE_WIDTH, STAGE_HEIGHT);
  141.         bg.graphics.beginFill(0x3CBAFA, 1.0);
  142.         bg.graphics.drawRect(1545, STAGE_WIDTH - 30, STAGE_HEIGHT - 60);
  143.         container.addChild(bg);
  144.     }
  145.     private function drawSky():void {
  146.         var sky:Shape = new Shape();
  147.         sky.graphics.beginFill(0xffffff);
  148.         sky.graphics.drawRect(154543517);
  149.         sky.graphics.drawRect(156443514);
  150.         sky.graphics.drawRect(158143511);
  151.         sky.graphics.drawRect(15974359);
  152.         sky.graphics.drawRect(151124357);
  153.         sky.graphics.drawRect(151264355);
  154.         sky.graphics.drawRect(151394353);
  155.         sky.graphics.drawRect(151514351);
  156.         container.addChild(sky);
  157.     }
  158.     private function drawLocationGauge():void {
  159.         var location:Shape = new Shape();
  160.         location.graphics.lineStyle(0, 0xC53467);
  161.         location.graphics.beginFill(0xffffff);
  162.         location.graphics.drawRect(1510, STAGE_WIDTH - 3010);
  163.         location.graphics.endFill();
  164.         container.addChild(location);
  165.     }
  166.     private function drawIcon():void {
  167.         var icon:Shape = new Shape();
  168.         icon.graphics.beginFill(0x0DB1666);
  169.         icon.graphics.drawRect(001414);
  170.         icon.graphics.beginFill(0xffffff);
  171.         icon.graphics.drawRect(3388);
  172.         icon.graphics.beginFill(0x740C35);
  173.         icon.graphics.drawRect(5544);
  174.         icon.graphics.endFill();
  175.         icon.x = (STAGE_WIDTH + icon.width) / 2;
  176.         icon.y = 8;
  177.         container.addChild(icon);
  178.     }
  179.     private function drawSea():void {
  180.         var sea:Shape = new Shape();
  181.         sea.graphics.beginFill(0x2009A0);
  182.         sea.graphics.drawRect(15350, STAGE_WIDTH - 30100);
  183.         sea.graphics.endFill();
  184.         container.addChild(sea);
  185.     }
  186.     private function drawWall(color:uint, offset:Number = 0):void {
  187.         var wall:Shape = new Shape();
  188.         wall.graphics.beginFill(color);
  189.         wall.graphics.drawRect(130282320 - offset, 83);
  190.         wall.graphics.drawRect(135254728);
  191.         wall.graphics.drawRect(255254728);
  192.         wall.graphics.drawRect(375254728);
  193.         wall.graphics.drawRect(13026557);
  194.         wall.graphics.drawRect(1422651137);
  195.         wall.graphics.drawRect(2622651137);
  196.         wall.graphics.drawRect(38226568-offset, 7);
  197.         wall.x = offset;
  198.         wall.y = -offset;
  199.         container.addChild(wall);
  200.     }
  201.     private function drawGround():void {
  202.         var shadow:Shape = new Shape();
  203.         shadow.graphics.beginFill(0x0);
  204.         shadow.graphics.moveTo(100375);
  205.         shadow.graphics.lineTo(95425);
  206.         shadow.graphics.lineTo(80425);
  207.         shadow.graphics.lineTo(75450);
  208.         shadow.graphics.lineTo(140450);
  209.         shadow.graphics.lineTo(140375);
  210.         container.addChild(shadow);
  211.         var ground:Shape = new Shape();
  212.         ground.graphics.beginFill(0x857503);
  213.         ground.graphics.moveTo(130365);
  214.         ground.graphics.curveTo(104368100375);
  215.         ground.graphics.curveTo(95385130395);
  216.         ground.graphics.curveTo(10041095412);
  217.         ground.graphics.curveTo(7842280425);
  218.         ground.graphics.curveTo(90445130450);
  219.         ground.graphics.lineTo(450450);
  220.         ground.graphics.lineTo(450365);
  221.         ground.graphics.lineTo(130365);
  222.         ground.graphics.endFill();
  223.         container.addChild(ground);
  224.     }
  225. }
flash swf thumbnail play
出題者からのコメント
素材の活用を、こうアレンジするとは夢にも思わず、背景と、音楽にもこだわりをもっている感じが、非常に素敵だと思いました。
Comments from Sponsor
The usage of material turned out to an adorable work. I thought it's extreamely wonderful with all feeling together with scenery and music.

ad