Massmedian

この度は沢山のご応募ありがとうございました。皆様から応募いただいた作品、担当者として非常に楽しませていただきました。
今回は、継続する楽しさ、つまりおもしろく飽きないクリエイティブを、私も本当に楽しませてもらいました。
今回のイベントを機に、思った以上にFlash、action scriptが、アイディア次第で、今までにない楽しいクリエイティブを産むことを実感しました。
クリエイターの転職を行っているマスメディアンとしては、改めて皆様のキャリアアップの可能性を認識させて頂きました。

At first, we would like to say thank you to all participants. We enjoyed watching your work so much.
Especially, we learned that these kind of creation never make us feel tired to look at. This event made me think Flash and ActionScript can be more creative than I have ever imagined.
Since Massmedian supporst creators' career, we realize the possibility of career development as a creator.

  1. Queen
    nemu90kWw
    presentブレーン年間購読+宣伝会議書籍より1冊+副賞1万円
    "BRAIN" one year subscription + a book published from SENDENKAIGI + ¥10,000
  2. Bishop
    mtok
    presentブレーン年間購読+宣伝会議書籍より1冊
    "BRAIN" one year subscription + a book published from SENDENKAIGI
  3. Knight
    9re
    presentブレーン年間購読
    "BRAIN" one year subscription

View All Other Challengers

Queennemu90kWw

  1. // forked from checkmate's massmedian challenge
  2. /*
  3.  * ゲーム作ってみた。
  4.  * お題の趣旨とは大幅にズレてるけど・・・。
  5.  * 
  6.  * ◆ ゲームのルール
  7.  * マウスで文字を拾って「MASSMEDIAN」にしてください。
  8.  * 右2つは白くないとダメです。
  9.  * 完成したらクリアタイムが表示されます。
  10.  */
  11. package
  12. {
  13.     import flash.display.Bitmap;
  14.     import flash.display.BitmapData;
  15.     import flash.display.DisplayObject;
  16.     import flash.display.Loader;
  17.     import flash.display.LoaderInfo;
  18.     import flash.display.Shape;
  19.     import flash.display.Sprite;
  20.     import flash.display.StageQuality;
  21.     import flash.events.Event;
  22.     import flash.events.MouseEvent;
  23.     import flash.filters.ColorMatrixFilter;
  24.     import flash.geom.ColorTransform;
  25.     import flash.geom.Matrix;
  26.     import flash.geom.Point;
  27.     import flash.geom.Rectangle;
  28.     import flash.net.URLRequest;
  29.     import flash.system.LoaderContext;
  30.     import flash.text.TextField;
  31.     import flash.text.TextFormat;
  32.     import flash.text.TextFormatAlign;
  33.     import flash.ui.Mouse;
  34.     import flash.utils.getTimer;
  35.     
  36.     [SWF(width="465", height="465", frameRate="50")]
  37.     public class Begineer extends Sprite
  38.     {
  39.         //-------------------------------//
  40.         // Use properties as follows.
  41.         //-------------------------------//
  42.         private var _sliceList:Array;
  43.         private var grp_char:Array = null;
  44.         
  45.         private var buffer:BitmapData;
  46.         private var screen:Sprite;
  47.         
  48.         private var count:int;
  49.         private var action:String;
  50.         private var bgcolor:uint;
  51.         private var bg:Shape;
  52.         private var buffer2:BitmapData;
  53.         
  54.         private var textfield:TextField;
  55.         private var textfield2:TextField;
  56.         
  57.         private var massmedian:Array;
  58.         private var massmedian_width:int;
  59.         
  60.         private var player:Object;
  61.         private var charpool:Array;
  62.         private var particlepool:Array;
  63.         
  64.         private var time:Number;
  65.         
  66.         private var mouse_x:Number = 0;
  67.         private var mouse_y:Number = 0;
  68.         private var mouse_down_temp:Boolean = false;
  69.         private var mouse_down:Boolean = false;
  70.         private var mouse_press:Boolean = false;
  71.         private var mouse_release:Boolean = false;
  72.         
  73.         private var Player:Function = function():void
  74.         {
  75.             var count:int = -1;
  76.             
  77.             this.x = 0;
  78.             this.y = 0;
  79.             this.action = "act_title";
  80.             this.deleteflag = false;
  81.             
  82.             this.formation = new Array();
  83.             
  84.             var light:Shape = new Shape();
  85.             var matrix:Matrix = new Matrix();
  86.             matrix.createGradientBox(48480, -24, -24);
  87.             light.graphics.beginGradientFill
  88.             (
  89.                 "radial",
  90.                 [0xFFFFFF, 0xFFFFFF],
  91.                 [0.50],
  92.                 [0x40, 0xFF],
  93.                 matrix
  94.             );
  95.             light.graphics.drawRect(-24, -244848);
  96.             light.graphics.endFill();
  97.             
  98.             this.main = function():void
  99.             {
  100.                 count++;
  101.                 for(var i:int = 0; i < this.formation.length; i++)
  102.                 {
  103.                     if(this.formation[i].action != "act_player"
  104.                         || this.formation[i].deleteflag == true)
  105.                     {
  106.                         this.formation.splice(i, 1);
  107.                         i--;
  108.                     }
  109.                 }
  110.                 
  111.                 this[this.action]();
  112.                 return;
  113.             };
  114.             
  115.             this.draw = function(buffer:BitmapData):void
  116.             {
  117.                 matrix.identity();
  118.                 matrix.translate(mouse_x, mouse_y);
  119.                 buffer.draw(light, matrix);
  120.                 return;
  121.             };
  122.             
  123.             this.getWidth = function():int
  124.             {
  125.                 var result:int = 0;
  126.                 for(var i:int = 0; i < this.formation.length; i++)
  127.                 {
  128.                     result += this.formation[i].getWidth();
  129.                 }
  130.                 return result;
  131.             };
  132.             
  133.             this.changeAction = function(name:String):void
  134.             {
  135.                 this.action = name;
  136.                 
  137.                 count = -1;
  138.                 return;
  139.             };
  140.             
  141.             var logo_size:Number;
  142.             this.act_title = function():void
  143.             {
  144.                 var i:int;
  145.                 
  146.                 if(count == 0)
  147.                 {
  148.                     this.x = 465/2;
  149.                     this.y = 210;
  150.                     
  151.                     logo_size = 450;
  152.                 }
  153.                 
  154.                 if(count >= 70 && count < 80)
  155.                 {
  156.                     this.y -= 4;
  157.                 }
  158.                 
  159.                 var temp_x:int = this.x - this.getWidth() / 2;
  160.                 for(i = 0; i < this.formation.length; i++)
  161.                 {
  162.                     if(i == 0)
  163.                     {
  164.                         temp_x += this.formation[i].getWidth()/2;
  165.                     }
  166.                     
  167.                     this.formation[i].x = (this.formation[i].x + (temp_x + Math.cos(count/10-i/2+7)*(logo_size+5))) / 2;
  168.                     this.formation[i].y = (this.formation[i].y + (this.y + Math.sin(count/10-i/2+7)*(logo_size+5))) / 2;
  169.                     
  170.                     logo_size /= 1.0075;
  171.                     
  172.                     if(i < this.formation.length - 1)
  173.                     {
  174.                         temp_x += this.formation[i].getWidth()/2 + this.formation[i+1].getWidth()/2;
  175.                     }
  176.                 }
  177.                 return;
  178.             };
  179.             
  180.             this.act_main = function():void
  181.             {
  182.                 this.x = mouse_x;
  183.                 this.y = mouse_y;
  184.                 
  185.                 var temp:int = this.x - this.getWidth() / 2;
  186.                 for(var i:int = 0; i < this.formation.length; i++)
  187.                 {
  188.                     if(i == 0)
  189.                     {
  190.                         temp += this.formation[i].getWidth()/2;
  191.                     }
  192.                     
  193.                     this.formation[i].x = (this.formation[i].x + temp) / 2;
  194.                     this.formation[i].y = (this.formation[i].y + this.y) / 2;
  195.                     
  196.                     if(i < this.formation.length - 1)
  197.                     {
  198.                         temp += this.formation[i].getWidth()/2 + this.formation[i+1].getWidth()/2;
  199.                     }
  200.                 }
  201.                 return;
  202.             };
  203.             
  204.             this.act_complete = function():void
  205.             {
  206.                 this.x = 465/2;
  207.                 this.y = 200;
  208.                 
  209.                 var temp:int = this.x - this.getWidth() / 2;
  210.                 for(var i:int = 0; i < this.formation.length; i++)
  211.                 {
  212.                     if(i == 0)
  213.                     {
  214.                         temp += this.formation[i].getWidth()/2;
  215.                     }
  216.                     
  217.                     this.formation[i].x = (this.formation[i].x + temp) / 2;
  218.                     this.formation[i].y = (this.formation[i].y + this.y) / 2;
  219.                     
  220.                     if(i < this.formation.length - 1)
  221.                     {
  222.                         temp += this.formation[i].getWidth()/2 + this.formation[i+1].getWidth()/2;
  223.                     }
  224.                 }
  225.                 return;
  226.             };
  227.         };
  228.         
  229.         public var Character:Function = function(x:Number = 0, y:Number = 0, type:int = 0, action:String = "act_player"):void
  230.         {
  231.             var count:int = -1;
  232.             this.deleteflag = false;
  233.             
  234.             this.x = x;
  235.             this.y = y;
  236.             this.type = type;
  237.             this.action = action;
  238.             this.visible = true;
  239.             
  240.             var vx:Number = 0;
  241.             var vy:Number = 0;
  242.             var div:Number = 0;
  243.             
  244.             this.main = function():void
  245.             {
  246.                 count++;
  247.                 
  248.                 this[this.action]();
  249.                 return;
  250.             };
  251.             
  252.             this.changeAction = function(name:String):void
  253.             {
  254.                 this.action = name;
  255.                 
  256.                 count = -1;
  257.                 return;
  258.             };
  259.             
  260.             this.draw = function(buffer:BitmapData):void
  261.             {
  262.                 buffer.copyPixels
  263.                 (
  264.                     grp_char[this.type],
  265.                     grp_char[this.type].rect,
  266.                     new Point(this.x-grp_char[this.type].width/2this.y-grp_char[this.type].height/2),
  267.                     null,
  268.                     null,
  269.                     true
  270.                 );
  271.                 return;
  272.             };
  273.             
  274.             this.getWidth = function():int
  275.             {
  276.                 return grp_char[this.type].width;
  277.             };
  278.             
  279.             this.getHeight = function():int
  280.             {
  281.                 return grp_char[this.type].height;
  282.             };
  283.             
  284.             this.isOutside = function():Boolean
  285.             {
  286.                 if(this.x < -64)
  287.                 {
  288.                     return true;
  289.                 }
  290.                 else if(this.y < -64)
  291.                 {
  292.                     return true;
  293.                 }
  294.                 else if(this.x > 465+64)
  295.                 {
  296.                     return true;
  297.                 }
  298.                 else if(this.y > 465+64)
  299.                 {
  300.                     return true;
  301.                 }
  302.                 else
  303.                 {
  304.                     return false;
  305.                 }
  306.             };
  307.             
  308.             this.vanish = function():void
  309.             {
  310.                 this.deleteflag = true;
  311.                 return;
  312.             };
  313.             
  314.             this.act_player = function():void
  315.             {
  316.                 return;
  317.             };
  318.             
  319.             this.act_item = function():void
  320.             {
  321.                 if(count == 0)
  322.                 {
  323.                     vy = 1.8;
  324.                     div = 7+Math.random()*2;
  325.                 }
  326.                 
  327.                 this.x += Math.cos(count/(div*2)+Math.PI/2);
  328.                 this.y += Math.sin(count/div);
  329.                 
  330.                 if(this.y > 465-10)
  331.                 {
  332.                     vy = -1.8;
  333.                 }
  334.                 
  335.                 this.y += vy;
  336.                 
  337.                 if(this.isOutside() == true)
  338.                 {
  339.                     this.vanish();
  340.                 }
  341.                 return;
  342.             };
  343.             
  344.             this.act_futtobi = function():void
  345.             {
  346.                 if(count == 0)
  347.                 {
  348.                     vx = -4 + Math.random()*8;
  349.                     vy = -6 - Math.random()*4;
  350.                 }
  351.                 
  352.                 this.x += vx;
  353.                 this.y += vy;
  354.                 
  355.                 vy += 0.3;
  356.                 
  357.                 this.visible = !this.visible;
  358.                 
  359.                 if(this.isOutside() == true)
  360.                 {
  361.                     this.vanish();
  362.                 }
  363.                 return;
  364.             };
  365.         };
  366.         
  367.         private var Particle:Function = function(x:int, y:int, dir:Number, speed:Number):void
  368.         {
  369.             this.deleteflag = false;
  370.             
  371.             this.x = x;
  372.             this.y = y;
  373.             var dir:Number = dir;
  374.             var speed:Number = speed;
  375.             var size:Number = 16;
  376.             
  377.             this.main = function():void
  378.             {
  379.                 this.x += Math.cos(Math.PI/128*dir)*speed;
  380.                 this.y += Math.sin(Math.PI/128*dir)*speed;
  381.                 
  382.                 speed /= 1.1;
  383.                 size -= 0.5;
  384.                 if(size <= 1) {this.vanish();}
  385.                 return;
  386.             };
  387.             
  388.             this.draw = function(buffer:BitmapData):void
  389.             {
  390.                 buffer.fillRect(new Rectangle(this.x-size/2this.y-size/2, size, size), 0xFFFFFF);
  391.                 return;
  392.             };
  393.             
  394.             this.vanish = function():void
  395.             {
  396.                 this.deleteflag = true;
  397.                 return;
  398.             };
  399.         };
  400.         
  401.         //-------------------------------//
  402.         // Change functions as follows.
  403.         //-------------------------------//
  404.         public function updateEnterFrame( e:Event ):void
  405.         {
  406.             if(grp_char == null)
  407.             {
  408.                 init();
  409.             }
  410.             
  411.             if(mouse_down_temp == true)
  412.             {
  413.                 if(mouse_down == false)
  414.                 {
  415.                     mouse_press = true;
  416.                 }
  417.                 else
  418.                 {
  419.                     mouse_press = false;
  420.                 }
  421.                 
  422.                 mouse_down = true;
  423.                 mouse_release = false;
  424.             }
  425.             else
  426.             {
  427.                 if(mouse_down == true)
  428.                 {
  429.                     mouse_release = true;
  430.                 }
  431.                 else
  432.                 {
  433.                     mouse_release = false;
  434.                 }
  435.                 
  436.                 mouse_down = false;
  437.                 mouse_press = false;
  438.             }
  439.             
  440.             count++;
  441.             
  442.             buffer.lock();
  443.             buffer2.lock();
  444.             main();
  445.             draw();
  446.             buffer.unlock();
  447.             buffer2.unlock();
  448.             
  449.             return;
  450.         }
  451.         
  452.         private function init():void
  453.         {
  454.             Wonderfl.capture_delay(5);
  455.             stage.quality = StageQuality.BEST;
  456.             
  457.             var temp:BitmapData = new BitmapData(26234true);
  458.             temp.draw(thisnew Matrix(0.5000.500));
  459.             bgcolor = temp.getPixel(00);
  460.             
  461.             temp.applyFilter
  462.             (
  463.                 temp,
  464.                 new Rectangle(0020034),
  465.                 new Point(00),
  466.                 new ColorMatrixFilter
  467.                 ([
  468.                     00000,
  469.                     00000,
  470.                     00000,
  471.                     -1000230
  472.                 ])
  473.             );
  474.             temp.applyFilter
  475.             (
  476.                 temp,
  477.                 new Rectangle(20006234),
  478.                 new Point(2000),
  479.                 new ColorMatrixFilter
  480.                 ([
  481.                     0000255,
  482.                     0000255,
  483.                     0000255,
  484.                     01000
  485.                 ])
  486.             );
  487.             
  488.             for each(var o:DisplayObject in _sliceList)
  489.             {
  490.                 removeChild(o);
  491.             }
  492.             
  493.             bg = new Shape();
  494.             bg.graphics.beginFill(bgcolor, 0.2);
  495.             bg.graphics.drawRect(00465465);
  496.             bg.graphics.endFill();
  497.             
  498.             grp_char = new Array();
  499.             var cell:BitmapData;
  500.             
  501.             cell = new BitmapData(3329);
  502.             cell.copyPixels(temp, new Rectangle(433329), new Point(00));
  503.             grp_char.push(cell);
  504.             cell = new BitmapData(2829);
  505.             cell.copyPixels(temp, new Rectangle(3732829), new Point(00));
  506.             grp_char.push(cell);
  507.             cell = new BitmapData(2129);
  508.             cell.copyPixels(temp, new Rectangle(8732129), new Point(00));
  509.             grp_char.push(cell);
  510.             cell = new BitmapData(2029);
  511.             cell.copyPixels(temp, new Rectangle(14332029), new Point(00));
  512.             grp_char.push(cell);
  513.             cell = new BitmapData(2529);
  514.             cell.copyPixels(temp, new Rectangle(16332529), new Point(00));
  515.             grp_char.push(cell);
  516.             cell = new BitmapData(1129);
  517.             cell.copyPixels(temp, new Rectangle(18931129), new Point(00));
  518.             grp_char.push(cell);
  519.             cell = new BitmapData(2829);
  520.             cell.copyPixels(temp, new Rectangle(20032829), new Point(00));
  521.             grp_char.push(cell);
  522.             cell = new BitmapData(2829);
  523.             cell.copyPixels(temp, new Rectangle(22932829), new Point(00));
  524.             grp_char.push(cell);
  525.             
  526.             massmedian = [0122034567];
  527.             for(var i:int = 0; i < massmedian.length; i++)
  528.             {
  529.                 massmedian_width += grp_char[massmedian[i]].width;
  530.             }
  531.             
  532.             player = new Player();
  533.             charpool = new Array();
  534.             particlepool = new Array();
  535.             
  536.             buffer = new BitmapData(465465false, bgcolor);
  537.             buffer2 = new BitmapData(465465false, bgcolor);
  538.             screen = new Sprite();
  539.             screen.graphics.beginBitmapFill(buffer);
  540.             screen.graphics.drawRect(00, buffer.width, buffer.height);
  541.             
  542.             addChild(screen);
  543.             
  544.             screen.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
  545.             screen.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
  546.             stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
  547.             
  548.             count = -1;
  549.             stage.quality = StageQuality.LOW;
  550.             
  551.             changeScene("act_title");
  552.             return;
  553.         }
  554.         
  555.         private function onMouseMove(event:Event):void
  556.         {
  557.             mouse_x = event.target.mouseX;
  558.             mouse_y = event.target.mouseY;
  559.             
  560.             flash.ui.Mouse.hide();
  561.             return;
  562.         }
  563.         
  564.         private function onMouseDown(event:Event):void
  565.         {
  566.             mouse_down_temp = true;
  567.             return;
  568.         }
  569.         
  570.         private function onMouseUp(event:Event):void
  571.         {
  572.             mouse_down_temp = false;
  573.             return;
  574.         }
  575.         
  576.         private function main():void
  577.         {
  578.             var i:int;
  579.             this[action]();
  580.             
  581.             player.main();
  582.             for(i = 0; i < charpool.length; i++)
  583.             {
  584.                 charpool[i].main();
  585.                 if(charpool[i].deleteflag == true)
  586.                 {
  587.                     charpool.splice(i, 1);
  588.                     i--;
  589.                 }
  590.             }
  591.             for(i = 0; i < particlepool.length; i++)
  592.             {
  593.                 particlepool[i].main();
  594.                 if(particlepool[i].deleteflag == true)
  595.                 {
  596.                     particlepool.splice(i, 1);
  597.                     i--;
  598.                 }
  599.             }
  600.             return;
  601.         }
  602.         
  603.         private function draw():void
  604.         {
  605.             var i:int;
  606.             
  607.             buffer2.colorTransform(buffer2.rect, new ColorTransform(-1, -1, -112552552550));
  608.             for(i = 0; i < charpool.length; i++)
  609.             {
  610.                 if(charpool[i].visible == false)
  611.                 {
  612.                     continue;
  613.                 }
  614.                 charpool[i].draw(buffer2);
  615.             }
  616.             buffer2.colorTransform(buffer2.rect, new ColorTransform(-1, -1, -112552552550));
  617.             buffer2.scroll(01);
  618.             buffer2.draw(bg);
  619.             
  620.             buffer.fillRect(buffer.rect, bgcolor);
  621.             buffer.copyPixels(buffer2, buffer2.rect, new Point(00));
  622.             
  623.             player.draw(buffer);
  624.             for(i = 0; i < charpool.length; i++)
  625.             {
  626.                 if(charpool[i].visible == false)
  627.                 {
  628.                     continue;
  629.                 }
  630.                 charpool[i].draw(buffer);
  631.             }
  632.             for(i = 0; i < particlepool.length; i++)
  633.             {
  634.                 particlepool[i].draw(buffer);
  635.             }
  636.             return;
  637.         }
  638.         
  639.         private function changeScene(name:String):void
  640.         {
  641.             action = name;
  642.             count = -1;
  643.             return;
  644.         }
  645.         
  646.         private function addCharacter(char:Object):Object
  647.         {
  648.             charpool.push(char);
  649.             return char;
  650.         }
  651.         
  652.         private function addItem(x:int, y:int, type:int):Object
  653.         {
  654.             var char:Object = new Character(x, y, type, "act_item");
  655.             return addCharacter(char);
  656.         }
  657.         
  658.         private function addParticle(x:int, y:int, dir:Number, speed:Number):Object
  659.         {
  660.             var particle:Object = new Particle(x, y, dir, speed);
  661.             particlepool.push(particle);
  662.             return particle;
  663.         }
  664.         
  665.         private function act_title():void
  666.         {
  667.             if(count == 0)
  668.             {
  669.                 var x:int = 50;
  670.                 for(var i:int = 0; i < massmedian.length; i++)
  671.                 {
  672.                     player.formation.push(addCharacter(new Character(x, 100, massmedian[i])));
  673.                 }
  674.             }
  675.             
  676.             var format:TextFormat;
  677.             if(count == 70)
  678.             {
  679.                 format = new TextFormat();
  680.                 format.font = "_等幅";
  681.                 format.bold = true;
  682.                 format.size = 28;
  683.                 format.color = 0xFFFFFF;
  684.                 format.align = TextFormatAlign.CENTER;
  685.                 
  686.                 textfield2 = new TextField();
  687.                 textfield2.defaultTextFormat = format;
  688.                 textfield2.text = "合体ゲーム";
  689.                 textfield2.x = 0;
  690.                 textfield2.y = 200;
  691.                 textfield2.width = 465;
  692.                 textfield2.selectable = false;
  693.                 textfield2.mouseEnabled = false;
  694.                 
  695.                 addChild(textfield2);
  696.             }
  697.             
  698.             if(count == 80)
  699.             {
  700.                 format = new TextFormat();
  701.                 format.font = "_sans";
  702.                 format.bold = true;
  703.                 format.size = 24;
  704.                 format.color = 0xFFFF00;
  705.                 format.align = TextFormatAlign.CENTER;
  706.                 
  707.                 textfield = new TextField();
  708.                 textfield.defaultTextFormat = format;
  709.                 textfield.text = "CLICK TO START";
  710.                 textfield.x = 0;
  711.                 textfield.y = 300;
  712.                 textfield.width = 465;
  713.                 textfield.selectable = false;
  714.                 textfield.mouseEnabled = false;
  715.                 
  716.                 addChild(textfield);
  717.             }
  718.             
  719.             if(count >= 80)
  720.             {
  721.                 if(count % 80 == 0)
  722.                 {
  723.                     textfield.visible = true;
  724.                 }
  725.                 if(count % 80 == 60)
  726.                 {
  727.                     textfield.visible = false;
  728.                 }
  729.                 
  730.                 if(mouse_press == true)
  731.                 {
  732.                     for each(var o:Object in charpool)
  733.                     {
  734.                         if(o.type != 6)
  735.                         {
  736.                             o.changeAction("act_futtobi");
  737.                         }
  738.                     }
  739.                     removeChild(textfield);
  740.                     removeChild(textfield2);
  741.                     player.changeAction("act_main");
  742.                     changeScene("act_game");
  743.                     return;
  744.                 }
  745.             }
  746.             return;
  747.         }
  748.         
  749.         private function act_game():void
  750.         {
  751.             if(count == 0)
  752.             {
  753.                 time = getTimer();
  754.             }
  755.             
  756.             if(count % 50 == 0)
  757.             {
  758.                 addItem(20+Math.random()*425, -16-Math.random()*40, Math.floor(Math.random()*8));
  759.             }
  760.             
  761.             collision_item();
  762.             
  763.             if(player.formation.length == massmedian.length)
  764.             {
  765.                 for(var i:int = 0; i < player.formation.length; i++)
  766.                 {
  767.                     if(player.formation[i].type != massmedian[i])
  768.                     {
  769.                         return;
  770.                     }
  771.                 }
  772.                 
  773.                 for(var j:int = 0; j < charpool.length; j++)
  774.                 {
  775.                     if(charpool[j].action != "act_player")
  776.                     {
  777.                         charpool[j].changeAction("act_futtobi");
  778.                     }
  779.                 }
  780.                 time = (getTimer() - time)/1000;
  781.                 
  782.                 player.changeAction("act_complete");
  783.                 changeScene("act_complete");
  784.                 return;
  785.             }
  786.             return;
  787.         }
  788.         
  789.         private function collision_item():void
  790.         {
  791.             for(var i:int = 0; i < player.formation.length; i++)
  792.             {
  793.                 for(var j:int = 0; j < charpool.length; j++)
  794.                 {
  795.                     if(charpool[j].action == "act_item")
  796.                     {
  797.                         if((player.formation[i].x-player.formation[i].getWidth()/2 < charpool[j].x)
  798.                          && (player.formation[i].y-player.formation[i].getHeight()/2 < charpool[j].y)
  799.                          && (player.formation[i].x+player.formation[i].getWidth()/2 > charpool[j].x)
  800.                          && (player.formation[i].y+player.formation[i].getHeight()/2 > charpool[j].y))
  801.                         {
  802.                             for(var k:int = 0; k < 8; k++)
  803.                             {
  804.                                 addParticle(player.formation[i].x, player.formation[i].y, k*326);
  805.                             }
  806.                             if(player.formation.length < massmedian.length)
  807.                             {
  808.                                 if(player.formation[i].x > charpool[j].x)
  809.                                 {
  810.                                     player.formation.splice(i, 0, charpool[j]);
  811.                                 }
  812.                                 else
  813.                                 {
  814.                                     player.formation.splice(i+10, charpool[j]);
  815.                                 }
  816.                             }
  817.                             else
  818.                             {
  819.                                 player.formation[i].changeAction("act_futtobi");
  820.                                 player.formation.splice(i, 1, charpool[j]);
  821.                             }
  822.                             charpool[j].changeAction("act_player");
  823.                             return;
  824.                         }
  825.                     }
  826.                 }
  827.             }
  828.             return;
  829.         }
  830.         
  831.         private function act_complete():void
  832.         {
  833.             if(count == 0)
  834.             {
  835.                 var format:TextFormat = new TextFormat();
  836.                 format.font = "_明朝";
  837.                 format.bold = true;
  838.                 format.size = 60;
  839.                 format.color = 0xFFFFFF;
  840.                 format.align = TextFormatAlign.CENTER;
  841.                 
  842.                 textfield = new TextField();
  843.                 textfield.defaultTextFormat = format;
  844.                 textfield.text = "完成";
  845.                 textfield.x = 0;
  846.                 textfield.y = 280;
  847.                 textfield.width = 465;
  848.                 textfield.selectable = false;
  849.                 textfield.mouseEnabled = false;
  850.                 
  851.                 format = new TextFormat();
  852.                 format.font = "_等幅";
  853.                 format.bold = true;
  854.                 format.size = 24;
  855.                 format.color = 0xFFFFFF;
  856.                 format.align = TextFormatAlign.CENTER;
  857.                 
  858.                 textfield2 = new TextField();
  859.                 textfield2.defaultTextFormat = format;
  860.                 textfield2.text = "Time : "+time+"秒";
  861.                 textfield2.x = 0;
  862.                 textfield2.y = 360;
  863.                 textfield2.width = 465;
  864.                 textfield2.selectable = false;
  865.                 textfield2.mouseEnabled = false;
  866.                 
  867.                 addChild(textfield);
  868.                 addChild(textfield2);
  869.             }
  870.             
  871.             if(count >= 120)
  872.             {
  873.                 if(mouse_press == true)
  874.                 {
  875.                     for(var i:int = 0; i < player.formation.length; i++)
  876.                     {
  877.                         player.formation[i].vanish();
  878.                     }
  879.                     removeChild(textfield);
  880.                     removeChild(textfield2);
  881.                     player.changeAction("act_title");
  882.                     changeScene("act_title");
  883.                     return;
  884.                 }
  885.             }
  886.             return;
  887.         }
  888.         
  889.         //-------------------------------//
  890.         // Do not change following codes.
  891.         //-------------------------------//
  892.         public function Begineer(){
  893.             var ctxt  :LoaderContext = new LoaderContext(true);
  894.             var loader:Loader = new Loader();
  895.             loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onLoadComplete );
  896.             loader.load( new URLRequest("http://swf.wonderfl.net/static/assets/massmedian.png"), ctxt );
  897.         }
  898.         
  899.         public function onLoadComplete(e:Event):void {
  900.             var loader:Loader = LoaderInfo( e.target ).loader;
  901.             loader.contentLoaderInfo.removeEventListener( Event.COMPLETE, onLoadComplete );
  902.             
  903.             var bitmapdata:BitmapData = new BitmapData( loader.width, loader.height, true, 0xFF0000 );
  904.             bitmapdata.draw( loader );
  905.             
  906.             _sliceList = sliceBanner( bitmapdata, bitmapdata.width );
  907.             
  908.             addEventListener( Event.ENTER_FRAME, updateEnterFrame );
  909.         }
  910.         
  911.         
  912.         private function sliceBanner( banner:BitmapData, length:int = 100 ):Array{
  913.             var sliceList:Array = [];
  914.             var w:int = Math.floor( banner.width/length );
  915.             var h:int = Math.floor( banner.height );
  916.             
  917.             var t:int = Math.ceil( banner.width - w*length );
  918.             var mat:Matrix = new Matrix();
  919.                 
  920.             forvar i:int = 0; i<length; i++ ) {
  921.                 var bmpd :BitmapData = new BitmapData( w, h, true, 0xFFFF00 );
  922.                 mat.tx = -w*i;
  923.                 bmpd.draw( banner, mat );
  924.                 var part:DisplayObject = addChild( new Bitmap( bmpd ) );
  925.                 part.x = w*i;
  926.                 sliceList.push( part );
  927.             }
  928.             return sliceList;
  929.         }
  930.         
  931.     }
  932. }
flash swf thumbnail play
出題者からのコメント
動きの中に「MASSMEDIAN」という言葉をしっかりユーザに認識させる機能をもち、なによりゲームという楽しさがあります。意見を聞いた社員全員が、ゲームにはまってしまい、その日は仕事になりませんでした。
Comments from Sponsor
Beauty of this work is that user must recognize word "MASSMEDIAN" with fun, as a game. All my collegues that challenged this game got hooked with it and they could not return to their jobs that day.

Bishopmtok

  1. // forked from checkmate's massmedian challenge
  2. package {
  3.     
  4.     import com.flashdynamix.motion.TweensyTimeline;
  5.     import flash.display.*;
  6.     import flash.events.*;
  7.     import flash.geom.*;
  8.     import flash.net.*;
  9.     import flash.system.LoaderContext;
  10.     import fl.motion.easing.*;
  11.     import com.flashdynamix.motion.Tweensy;
  12.     //メモ
  13.     /*
  14.      * 画像のサイズは525x70
  15.      * 
  16.      */
  17.     public class Massmedian extends Sprite{
  18.         
  19.         
  20.         //-------------------------------//
  21.         // Use properties as follows.
  22.         //-------------------------------//
  23.         private var _sliceList:Array;
  24.         private var _timeLines:Array;
  25.         private var _imgWidth:int = 525;
  26.         private var _imgHeight:int = 70;
  27.         private var _sliceHolder:Sprite;
  28.         private var _shadow:Bitmap;
  29.         private var _flag:Boolean = true;
  30.         
  31.         private var hart:Array = [
  32.             17219716320615721215121714722114322514022913723213423513123812824012624312324512124711925011725211525411325611125810925910726110626310426510226610126899269982719627295274932759227691278892798828087282862838428483285822868128780288792907829177292762937529474295732967229771297702986929968300673016630266303653046430563306623076230861309603105931159312583135731456315563165531754318543195332053321523225132351324503255032649327493284832947330473314633246333453344533544336443374333843339433404234142342413434134441345403464034739348393493935038351383523835337354373553735636357363583635935360353613536235363343643436534366343673336833369333703337133372323733237432375323763237731378313793138031381313823138331384313853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041931420314213142231423314243142531426324273242832429324303243132432334333343433435334363443734438344393444034441354423544335444364453644636447364483744937450374513845238453384543945539456404574045840459414604146142462424634246443465434664446744468454694547046471464724747347474484754847649477494785047951480514815248252483534845448554486554875648856489574905849158492594936049461495614966249763498644996450065501665026750368504695057050671507715087250973510725097150870507695066850568504675036650265501645006349963498624976149660495594945949358492574915749056489554885548754486534855348452483514825148150480504794947848477484764747547474464734647245471454704446944468434674346642465424644246341462414614046040459404583945739456384553845438453374523745137450364493644836447354463544535444354433444234441344403443933438334373343633435324343243332432324313243031429314283142731426314253142430423304223042130420304193041830417304163041529414294132941229411294102940929408294072940629405294042940329402294012940029399293982939729396293952939429393293922939129390303893038830387303863038530384303833038230381313803137931378313773137631375323743237332372323713237033369333683336733366333653436434363343623436135360353593535836357363563635537354373533735238351383503834939348393473934640345403444134341342413414234042339433384333744336443354533445333463324633147330473294832848327493264932550324513235132252321523205331954318543175531656315563145731358312593115931060309613086230762306633056430465303663026630167300682996929870297712967229573294742937529276291772907828979288802878128582284842838528286281872798927890277912769327494273952719727098268100267101265103264105262106260108259110257112255114253116251118249120247122244125242127239130237133234136231139228142224146220151216156211162205171196,
  33.         ];
  34.         
  35.         private var fish:Array = [
  36.             271274268276266278263280261281259283257285255286253288252289250291248292247293245295244296243297241298240300239301237302236303235304234305233306231307230308229309228310227311226312225313224314223315222316221317220317219318218319217320217321216321215322214323213324212324212325211326210327209327208328208329207329206330205331205331204332203333202333202334201334200335200336199336198337198337197338196338196339195340195340194341193341193342192342192343191343190344190344189345189345188346188346187347187347186347185348185348184349184349183350183350182351182351182351181352181352180353180353179353179354178354178354177355177355177356176356176356175357175357175357174358174358174358173359173359172359172360172360171360171360171361170361170361170362169362169362169363168363168363168363168364167364167364167364166365166365166365166365165366165366165366165366164366164367164367164367164367163368163368163368163368163368162369162369162369162369162369162369161370161370161370161370161370161370161371160371160371160371160371160371160371160372160372160372160372159372159372159372159372159372159373159373159373159373159373159373159373159373159373159373159373159373159373159374159374159374159374159374159374159374159374159374159374159374159374159374159374159374159374159374159374159374159374159374160374160374160374160374160374160374160374160374160374160374160374160374160374160373160373160373160373160373160373161373161373161373161373161373161373161373161373161372161372161372162372162372162372162372162372162372162371162371162371162371163371163371163371163370163370163370163370163370164370164370164369164369164369164369164369165368165368165368165368165368165368166367166367166367166367166367167366167366167366167366167365168365168365168365168364168364169364169364169363169363169363170363170362170362170362171362171361171361171361172360172360172360172360173359173359173359174358174358174358175357175357175357175357176356176356176355177355177355177354178354178354178353179353179353179352180352180352181351181351181350182350182350183349183349183348184348184348185347185347185346186346186346187345187345188344188344189343189343190343190342191342191341192341192340193340193339194339194338195338195337196337196336197336198335198335199334199334200333201333201332202332202331203331204330204330205329206328206328207327208327208326209326210325210324211324212323212323213322214322215321215320216320217319218318218318219317220316221316222315223315223314224313225313226312227311228310228310229309230308231308232307233306234305235305236304237303238302239302240301241300242299243298243298242299241300240301239301238302238303237304236305235305234306233307232308232308231309230310229311228311227312227313226314225315224315223316222317221318221318220319219320218321217321216322215323215324214324213325212326211327210328209328209329208330207331206331205332204333203334203334202335201336200337199338198338197339196340196341195341194342193343192344191344190345190346189347188348187348186349185350184351184351183352182353181354180354179355178356177357177357176358175359174360173361172361171362171363170364169364168365167366166367165367164368164369163370162371161371160372159373158374,
  37.         ];
  38.         
  39.         private var circle:Array = [
  40.             2472802352922273002213062153122103172053222013261973301933341903371863411833441803471773501743531723551693581673601643631623651593681573701553721533741513761483791463811443831433841413861393881373901353921333941323951303971283991274001254021234041224051204071194081174101164111144131134141114161104171094181074201064211054221034241024251014261004279842997430964319543293434924359143690437894388843987440864418544283444824458144680447794487844977450764517545274453734547245572455714567045769458684596746066461654626446363464634646246561466604675946859468584695747056471554725547254473534745247552475514765047749478494784847947480474804648145482454824448343484434844248541486414864048740487394883848938489374903749036491354923549234493344933349433494324953249531496314963049729498294982849928499275002750027500265012650125502255022450324503235042350422505225052250521506215062050720507205071950819508185091850918509175101751016511165111651115512155121551214513145131451313514135141351412515125151251512515115161151611516105171051710517105179518951895189518851985198519851975207520752075207520652165216521652165215522552255225522552255224523452345234523452345233524352435243524352435243524352425252525252525252525252525252525252525252525252515251525152515251525152515251525152515251525152515251525152515251525152515251525152515251525152515251525152515251525152515251525152525252525252525252525252525252525252525252525252535243524352435243524352435243524452345234523452345234523552255225522552255225522652165216521652165217520752075207520752085198519851985199518951895189518105171051710517105171151611516115161251512515125151251513514135141351414513145131451315512155121551216511165111651117510175101850918509185091950819508205072050720507215062150622505225052250523504235042450324503255022550226501265012750027500275002849928499294982949830497314963149632495324953349433494344933449335492354923649137490374903848938489394884048740487414864148642485434844348444483454824548246481474804748048479494784947850477514765247552475534745447355472554725647157470584695946859468604676146662465634646346464463654626646167460684596945870457714567245572455734547445375452764517745078449794488044781446824458344485442864418744088439894389043791436924359343495432964319743098429100427101426102425103424105422106421107420109418110417111416113414114413116411117410119408120407122405123404125402127400128399130397132395133394135392137390139388141386143384144383146381148379151376153374155372157370159368162365164363167360169358172355174353177350180347183344186341190337193334197330201326205322210317215312221306227300235292247280,
  41.         ];
  42.         //-------------------------------//
  43.         // Change functions as follows.
  44.         //-------------------------------//
  45.         public function updateEnterFrame( e:Event ):void{
  46.             removeEventListener(e.type, arguments.callee);
  47.             
  48.             transform.matrix
  49.             initialize();
  50.         }
  51.         private function updateEnterFrame2(e:Event = null):void {
  52.             //_sliceHolder.rotationY += 1;
  53.         }
  54.         private function hideAllSlices():void {
  55.             var bmp:Bitmap;
  56.             var i:int;
  57.             var len:int = _sliceList.length;
  58.             for (i = 0; i < len; i++) {
  59.                 bmp = _sliceList[i] as Bitmap;
  60.                 bmp.visible = false;
  61.             }
  62.         }
  63.         private function initialize():void {
  64.             addEventListener(Event.ENTER_FRAME, updateEnterFrame2);
  65.             
  66.             var pv:PerspectiveProjection = new PerspectiveProjection();
  67.             pv.projectionCenter.x = stage.stageWidth * 0.5;
  68.             pv.projectionCenter.y = stage.stageHeight * 0.5;
  69.             pv.focalLength = 500 * 2;
  70.             transform.perspectiveProjection = pv;
  71.             
  72.             var len:int;
  73.             var bmp:Bitmap;
  74.             var i:int;
  75.             
  76.             addChild(_sliceHolder = new Sprite());
  77.             _sliceHolder.x = stage.stageWidth * 0.5;
  78.             _sliceHolder.y = stage.stageHeight * 0.5;
  79.             _sliceHolder.z = stage.stageWidth * 0.5;
  80.             
  81.             len = _sliceList.length;
  82.             for (i = 0; i < len; i++) {
  83.                 bmp = _sliceList[i] as Bitmap;
  84.                 _sliceHolder.addChild(bmp);
  85.                 bmp.x = -(len * 0.5) + i;
  86.                 bmp.y = - bmp.height * 0.5;
  87.             }
  88.             
  89.             stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
  90.         }
  91.         
  92.         private function mouseDownHandler(event:MouseEvent):void 
  93.         {
  94.             var num:int = int(Math.random() * 3 + 1);
  95.             _flag ? this["pump"+num]() : shrivel();
  96.             _flag = !_flag;
  97.         }
  98.         
  99.         private function pump2():void {
  100.             var i:int;
  101.             var len:int = _sliceList.length;
  102.             var s:int;
  103.             var e:int;
  104.             var bmp:Bitmap;
  105.             var tl:TweensyTimeline;
  106.             for (i = 0; i < len; i++) {
  107.                 s = hart[2*i];
  108.                 e = hart[2*i + 1];
  109.                 bmp = _sliceList[i] as Bitmap;
  110.                 
  111.                 Tweensy.to(bmp, { y:s - 250, height:e-s }, 1 + 0.002*i, Elastic.easeOut, 0.0001*i );
  112.             }
  113.         }
  114.         private function pump3():void {
  115.             var i:int;
  116.             var len:int = _sliceList.length;
  117.             var s:int;
  118.             var e:int;
  119.             var bmp:Bitmap;
  120.             var tl:TweensyTimeline;
  121.             for (i = 0; i < len; i++) {
  122.                 s = fish[2*i];
  123.                 e = fish[2*i + 1];
  124.                 bmp = _sliceList[i] as Bitmap;
  125.                 
  126.                 Tweensy.to(bmp, { y:s - 250, height:e-s }, 1 + 0.002*i, Elastic.easeOut, 0.0001*i );
  127.             }
  128.         }
  129.         private function pump1():void {
  130.             var i:int;
  131.             var len:int = _sliceList.length;
  132.             var s:int;
  133.             var e:int;
  134.             var bmp:Bitmap;
  135.             var tl:TweensyTimeline;
  136.             for (i = 0; i < len; i++) {
  137.                 s = circle[2*i];
  138.                 e = circle[2*i + 1];
  139.                 bmp = _sliceList[i] as Bitmap;
  140.                 
  141.                 Tweensy.to(bmp, { y:s - 250, height:e-s }, 1 + 0.002*i, Elastic.easeOut, 0.0001*i );
  142.             }
  143.         }
  144.         
  145.         private function shrivel():void {
  146.             var i:int;
  147.             var len:int = _sliceList.length;
  148.             var s:int;
  149.             var e:int;
  150.             var bmp:Bitmap;
  151.             var tl:TweensyTimeline;
  152.             for (i = 0; i < len; i++) {
  153.                 bmp = _sliceList[i] as Bitmap;
  154.                 Tweensy.to(bmp, {y:-35, height:70}, 2 + 0.002*i, Bounce.easeOut, 0.001*i);
  155.             }
  156.         }
  157.         
  158.         
  159.         
  160.         
  161.         
  162.         
  163.         
  164.         
  165.         
  166.         
  167.         
  168.         
  169.         
  170.         
  171.         
  172.         //-------------------------------//
  173.         // Do not change following codes.
  174.         //-------------------------------//
  175.         public function Massmedian(){
  176.             var ctxt  :LoaderContext = new LoaderContext(true);
  177.             var loader:Loader = new Loader();
  178.             loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onLoadComplete );
  179.             loader.load( new URLRequest("http://swf.wonderfl.net/static/assets/massmedian.png"), ctxt );
  180.         }
  181.         
  182.         public function onLoadComplete(e:Event):void {
  183.             var loader:Loader = LoaderInfo( e.target ).loader;
  184.             loader.contentLoaderInfo.removeEventListener( Event.COMPLETE, onLoadComplete );
  185.             
  186.             var bitmapdata:BitmapData = new BitmapData( loader.width, loader.height, true, 0xFF0000 );
  187.             bitmapdata.draw( loader );
  188.             
  189.             _sliceList = sliceBanner( bitmapdata, bitmapdata.width );
  190.             
  191.             addEventListener( Event.ENTER_FRAME, updateEnterFrame );
  192.         }
  193.         
  194.         
  195.         private function sliceBanner( banner:BitmapData, length:int = 100 ):Array{
  196.             var sliceList:Array = [];
  197.             var w:int = Math.floor( banner.width/length );
  198.             var h:int = Math.floor( banner.height );
  199.             
  200.             var t:int = Math.ceil( banner.width - w*length );
  201.             var mat:Matrix = new Matrix();
  202.                 
  203.             forvar i:int = 0; i<length; i++ ) {
  204.                 var bmpd :BitmapData = new BitmapData( w, h, true, 0xFFFF00 );
  205.                 mat.tx = -w*i;
  206.                 bmpd.draw( banner, mat );
  207.                 var part:DisplayObject = addChild( new Bitmap( bmpd ) );
  208.                 part.x = w*i;
  209.                 sliceList.push( part );
  210.             }
  211.             return sliceList;
  212.         }
  213.         
  214.     }
  215. }
flash swf thumbnail play
出題者からのコメント
動きがダイナミックに変わるのがとても楽しいです。くだけたカタチと「MASSMEDIAN」の文字との相性が新鮮でした。これからも色々と模索できそうです。
Comments from Sponsor
We enjoyed its dynamic movement.The "MASSMEDIAN" letters in amorphous shape were really modern.After looking at it, we thought "what kind of better shape can we think of?"Beauty of this piece is that user must recognize word "MASSMEDIAN" with fun, as a game. All my collogues that challenged this game got hooked with this game and they could not proceed their job on the day.

Knight9re

  1. // forked from checkmate's massmedian challenge
  2. package {
  3.     import flash.display.*;
  4.     import flash.events.*;
  5.     import flash.geom.*;
  6.     import flash.net.*;
  7.     import flash.system.LoaderContext;
  8.     
  9.     public class Begineer extends Sprite{
  10.         
  11.         
  12.         //-------------------------------//
  13.         // Use properties as follows.
  14.         //-------------------------------//
  15.         private var _sliceList:Array;
  16.                 private var _v:Number = 8;
  17.                 private var _x:Number = 0;
  18.                 private var _c:Number = 0.004;
  19.                 private var _vs:Number = 0.08;
  20.                 private var _xs:Number = 0;
  21.                 private var _cs:Number = 0.001;
  22.         
  23.         
  24.         //-------------------------------//
  25.         // Change functions as follows.
  26.         //-------------------------------//
  27.         public function updateEnterFrame( e:Event ):void{
  28.                     _v -= _x * _c;
  29.                     _x += _v;
  30.                     
  31.                     _vs -= _xs * _cs;
  32.                     _xs += _vs;
  33.                     
  34.                     var slice:DisplayObject = _sliceList[0];
  35.                     var part:DisplayObject;
  36.                     slice.y = _x - mouseY * 0.3 + 300;
  37.                     slice.scaleY = _xs;
  38.                     var len:int = _sliceList.length;
  39.                     for each (part in _sliceList) {
  40.                         part.y += (slice.y - part.y) * 0.9;
  41.                         part.scaleY += (slice.scaleY - part.scaleY) * 0.8;
  42.                         slice = part;
  43.                     }
  44.         }
  45.         
  46.         
  47.         
  48.         
  49.         
  50.         
  51.         
  52.         
  53.         
  54.         
  55.         
  56.         
  57.         
  58.         
  59.         
  60.         
  61.         //-------------------------------//
  62.         // Do not change following codes.
  63.         //-------------------------------//
  64.         public function Begineer(){
  65.             var ctxt  :LoaderContext = new LoaderContext(true);
  66.             var loader:Loader = new Loader();
  67.             loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onLoadComplete );
  68.             loader.load( new URLRequest("http://swf.wonderfl.net/static/assets/massmedian.png"), ctxt );
  69.         }
  70.         
  71.         public function onLoadComplete(e:Event):void {
  72.             var loader:Loader = LoaderInfo( e.target ).loader;
  73.             loader.contentLoaderInfo.removeEventListener( Event.COMPLETE, onLoadComplete );
  74.             
  75.             var bitmapdata:BitmapData = new BitmapData( loader.width, loader.height, true, 0xFF0000 );
  76.             bitmapdata.draw( loader );
  77.             
  78.             _sliceList = sliceBanner( bitmapdata, bitmapdata.width );
  79.             
  80.             addEventListener( Event.ENTER_FRAME, updateEnterFrame );
  81.         }
  82.         
  83.         
  84.         private function sliceBanner( banner:BitmapData, length:int = 100 ):Array{
  85.             var sliceList:Array = [];
  86.             var w:int = Math.floor( banner.width/length );
  87.             var h:int = Math.floor( banner.height );
  88.             
  89.             var t:int = Math.ceil( banner.width - w*length );
  90.             var mat:Matrix = new Matrix();
  91.                 
  92.             forvar i:int = 0; i<length; i++ ) {
  93.                 var bmpd :BitmapData = new BitmapData( w, h, true, 0xFFFF00 );
  94.                 mat.tx = -w*i;
  95.                 bmpd.draw( banner, mat );
  96.                 var part:DisplayObject = addChild( new Bitmap( bmpd ) );
  97.                 part.x = w*i;
  98.                 sliceList.push( part );
  99.             }
  100.             return sliceList;
  101.         }
  102.         
  103.     }
  104. }
flash swf thumbnail play
出題者からのコメント
流れるような動きと「MASSMEDIAN」が時折みえるのが素敵です。社員からは、スクリーンセーバのようだとのコメントもでました。「N」がしっかり見えると、尚よかったです。
Comments from Sponsor
We loved stream like movement and discontinuously viewable "MASSMEDIAN" logo. Some of our colleague said it's like neat screen saver. If we can see "N"letter clearer, it would be even better.

ad