この度は沢山のご応募ありがとうございました。皆様から応募いただいた作品、担当者として非常に楽しませていただきました。
今回は、継続する楽しさ、つまりおもしろく飽きないクリエイティブを、私も本当に楽しませてもらいました。
今回のイベントを機に、思った以上に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.
nemu90kWw
- // forked from checkmate's massmedian challenge
- /*
- * ゲーム作ってみた。
- * お題の趣旨とは大幅にズレてるけど・・・。
- *
- * ◆ ゲームのルール
- * マウスで文字を拾って「MASSMEDIAN」にしてください。
- * 右2つは白くないとダメです。
- * 完成したらクリアタイムが表示されます。
- */
- package
- {
- import flash.display.Bitmap;
- import flash.display.BitmapData;
- import flash.display.DisplayObject;
- import flash.display.Loader;
- import flash.display.LoaderInfo;
- import flash.display.Shape;
- import flash.display.Sprite;
- import flash.display.StageQuality;
- import flash.events.Event;
- import flash.events.MouseEvent;
- import flash.filters.ColorMatrixFilter;
- import flash.geom.ColorTransform;
- import flash.geom.Matrix;
- import flash.geom.Point;
- import flash.geom.Rectangle;
- import flash.net.URLRequest;
- import flash.system.LoaderContext;
- import flash.text.TextField;
- import flash.text.TextFormat;
- import flash.text.TextFormatAlign;
- import flash.ui.Mouse;
- import flash.utils.getTimer;
- [SWF(width="465", height="465", frameRate="50")]
- public class Begineer extends Sprite
- {
- //-------------------------------//
- // Use properties as follows.
- //-------------------------------//
- private var _sliceList:Array;
- private var grp_char:Array = null;
- private var buffer:BitmapData;
- private var screen:Sprite;
- private var count:int;
- private var action:String;
- private var bgcolor:uint;
- private var bg:Shape;
- private var buffer2:BitmapData;
- private var textfield:TextField;
- private var textfield2:TextField;
- private var massmedian:Array;
- private var massmedian_width:int;
- private var player:Object;
- private var charpool:Array;
- private var particlepool:Array;
- private var time:Number;
- private var mouse_x:Number = 0;
- private var mouse_y:Number = 0;
- private var mouse_down_temp:Boolean = false;
- private var mouse_down:Boolean = false;
- private var mouse_press:Boolean = false;
- private var mouse_release:Boolean = false;
- private var Player:Function = function():void
- {
- var count:int = -1;
- this.x = 0;
- this.y = 0;
- this.action = "act_title";
- this.deleteflag = false;
- this.formation = new Array();
- var light:Shape = new Shape();
- var matrix:Matrix = new Matrix();
- matrix.createGradientBox(48, 48, 0, -24, -24);
- light.graphics.beginGradientFill
- (
- "radial",
- [0xFFFFFF, 0xFFFFFF],
- [0.5, 0],
- [0x40, 0xFF],
- matrix
- );
- light.graphics.drawRect(-24, -24, 48, 48);
- light.graphics.endFill();
- this.main = function():void
- {
- count++;
- for(var i:int = 0; i < this.formation.length; i++)
- {
- if(this.formation[i].action != "act_player"
- || this.formation[i].deleteflag == true)
- {
- this.formation.splice(i, 1);
- i--;
- }
- }
- this[this.action]();
- return;
- };
- this.draw = function(buffer:BitmapData):void
- {
- matrix.identity();
- matrix.translate(mouse_x, mouse_y);
- buffer.draw(light, matrix);
- return;
- };
- this.getWidth = function():int
- {
- var result:int = 0;
- for(var i:int = 0; i < this.formation.length; i++)
- {
- result += this.formation[i].getWidth();
- }
- return result;
- };
- this.changeAction = function(name:String):void
- {
- this.action = name;
- count = -1;
- return;
- };
- var logo_size:Number;
- this.act_title = function():void
- {
- var i:int;
- if(count == 0)
- {
- this.x = 465/2;
- this.y = 210;
- logo_size = 450;
- }
- if(count >= 70 && count < 80)
- {
- this.y -= 4;
- }
- var temp_x:int = this.x - this.getWidth() / 2;
- for(i = 0; i < this.formation.length; i++)
- {
- if(i == 0)
- {
- temp_x += this.formation[i].getWidth()/2;
- }
- this.formation[i].x = (this.formation[i].x + (temp_x + Math.cos(count/10-i/2+7)*(logo_size+5))) / 2;
- this.formation[i].y = (this.formation[i].y + (this.y + Math.sin(count/10-i/2+7)*(logo_size+5))) / 2;
- logo_size /= 1.0075;
- if(i < this.formation.length - 1)
- {
- temp_x += this.formation[i].getWidth()/2 + this.formation[i+1].getWidth()/2;
- }
- }
- return;
- };
- this.act_main = function():void
- {
- this.x = mouse_x;
- this.y = mouse_y;
- var temp:int = this.x - this.getWidth() / 2;
- for(var i:int = 0; i < this.formation.length; i++)
- {
- if(i == 0)
- {
- temp += this.formation[i].getWidth()/2;
- }
- this.formation[i].x = (this.formation[i].x + temp) / 2;
- this.formation[i].y = (this.formation[i].y + this.y) / 2;
- if(i < this.formation.length - 1)
- {
- temp += this.formation[i].getWidth()/2 + this.formation[i+1].getWidth()/2;
- }
- }
- return;
- };
- this.act_complete = function():void
- {
- this.x = 465/2;
- this.y = 200;
- var temp:int = this.x - this.getWidth() / 2;
- for(var i:int = 0; i < this.formation.length; i++)
- {
- if(i == 0)
- {
- temp += this.formation[i].getWidth()/2;
- }
- this.formation[i].x = (this.formation[i].x + temp) / 2;
- this.formation[i].y = (this.formation[i].y + this.y) / 2;
- if(i < this.formation.length - 1)
- {
- temp += this.formation[i].getWidth()/2 + this.formation[i+1].getWidth()/2;
- }
- }
- return;
- };
- };
- public var Character:Function = function(x:Number = 0, y:Number = 0, type:int = 0, action:String = "act_player"):void
- {
- var count:int = -1;
- this.deleteflag = false;
- this.x = x;
- this.y = y;
- this.type = type;
- this.action = action;
- this.visible = true;
- var vx:Number = 0;
- var vy:Number = 0;
- var div:Number = 0;
- this.main = function():void
- {
- count++;
- this[this.action]();
- return;
- };
- this.changeAction = function(name:String):void
- {
- this.action = name;
- count = -1;
- return;
- };
- this.draw = function(buffer:BitmapData):void
- {
- buffer.copyPixels
- (
- grp_char[this.type],
- grp_char[this.type].rect,
- new Point(this.x-grp_char[this.type].width/2, this.y-grp_char[this.type].height/2),
- null,
- null,
- true
- );
- return;
- };
- this.getWidth = function():int
- {
- return grp_char[this.type].width;
- };
- this.getHeight = function():int
- {
- return grp_char[this.type].height;
- };
- this.isOutside = function():Boolean
- {
- if(this.x < -64)
- {
- return true;
- }
- else if(this.y < -64)
- {
- return true;
- }
- else if(this.x > 465+64)
- {
- return true;
- }
- else if(this.y > 465+64)
- {
- return true;
- }
- else
- {
- return false;
- }
- };
- this.vanish = function():void
- {
- this.deleteflag = true;
- return;
- };
- this.act_player = function():void
- {
- return;
- };
- this.act_item = function():void
- {
- if(count == 0)
- {
- vy = 1.8;
- div = 7+Math.random()*2;
- }
- this.x += Math.cos(count/(div*2)+Math.PI/2);
- this.y += Math.sin(count/div);
- if(this.y > 465-10)
- {
- vy = -1.8;
- }
- this.y += vy;
- if(this.isOutside() == true)
- {
- this.vanish();
- }
- return;
- };
- this.act_futtobi = function():void
- {
- if(count == 0)
- {
- vx = -4 + Math.random()*8;
- vy = -6 - Math.random()*4;
- }
- this.x += vx;
- this.y += vy;
- vy += 0.3;
- this.visible = !this.visible;
- if(this.isOutside() == true)
- {
- this.vanish();
- }
- return;
- };
- };
- private var Particle:Function = function(x:int, y:int, dir:Number, speed:Number):void
- {
- this.deleteflag = false;
- this.x = x;
- this.y = y;
- var dir:Number = dir;
- var speed:Number = speed;
- var size:Number = 16;
- this.main = function():void
- {
- this.x += Math.cos(Math.PI/128*dir)*speed;
- this.y += Math.sin(Math.PI/128*dir)*speed;
- speed /= 1.1;
- size -= 0.5;
- if(size <= 1) {this.vanish();}
- return;
- };
- this.draw = function(buffer:BitmapData):void
- {
- buffer.fillRect(new Rectangle(this.x-size/2, this.y-size/2, size, size), 0xFFFFFF);
- return;
- };
- this.vanish = function():void
- {
- this.deleteflag = true;
- return;
- };
- };
- //-------------------------------//
- // Change functions as follows.
- //-------------------------------//
- public function updateEnterFrame( e:Event ):void
- {
- if(grp_char == null)
- {
- init();
- }
- if(mouse_down_temp == true)
- {
- if(mouse_down == false)
- {
- mouse_press = true;
- }
- else
- {
- mouse_press = false;
- }
- mouse_down = true;
- mouse_release = false;
- }
- else
- {
- if(mouse_down == true)
- {
- mouse_release = true;
- }
- else
- {
- mouse_release = false;
- }
- mouse_down = false;
- mouse_press = false;
- }
- count++;
- buffer.lock();
- buffer2.lock();
- main();
- draw();
- buffer.unlock();
- buffer2.unlock();
- return;
- }
- private function init():void
- {
- Wonderfl.capture_delay(5);
- stage.quality = StageQuality.BEST;
- var temp:BitmapData = new BitmapData(262, 34, true);
- temp.draw(this, new Matrix(0.5, 0, 0, 0.5, 0, 0));
- bgcolor = temp.getPixel(0, 0);
- temp.applyFilter
- (
- temp,
- new Rectangle(0, 0, 200, 34),
- new Point(0, 0),
- new ColorMatrixFilter
- ([
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0,
- -1, 0, 0, 0, 230
- ])
- );
- temp.applyFilter
- (
- temp,
- new Rectangle(200, 0, 62, 34),
- new Point(200, 0),
- new ColorMatrixFilter
- ([
- 0, 0, 0, 0, 255,
- 0, 0, 0, 0, 255,
- 0, 0, 0, 0, 255,
- 0, 1, 0, 0, 0
- ])
- );
- for each(var o:DisplayObject in _sliceList)
- {
- removeChild(o);
- }
- bg = new Shape();
- bg.graphics.beginFill(bgcolor, 0.2);
- bg.graphics.drawRect(0, 0, 465, 465);
- bg.graphics.endFill();
- grp_char = new Array();
- var cell:BitmapData;
- cell = new BitmapData(33, 29);
- cell.copyPixels(temp, new Rectangle(4, 3, 33, 29), new Point(0, 0));
- grp_char.push(cell);
- cell = new BitmapData(28, 29);
- cell.copyPixels(temp, new Rectangle(37, 3, 28, 29), new Point(0, 0));
- grp_char.push(cell);
- cell = new BitmapData(21, 29);
- cell.copyPixels(temp, new Rectangle(87, 3, 21, 29), new Point(0, 0));
- grp_char.push(cell);
- cell = new BitmapData(20, 29);
- cell.copyPixels(temp, new Rectangle(143, 3, 20, 29), new Point(0, 0));
- grp_char.push(cell);
- cell = new BitmapData(25, 29);
- cell.copyPixels(temp, new Rectangle(163, 3, 25, 29), new Point(0, 0));
- grp_char.push(cell);
- cell = new BitmapData(11, 29);
- cell.copyPixels(temp, new Rectangle(189, 3, 11, 29), new Point(0, 0));
- grp_char.push(cell);
- cell = new BitmapData(28, 29);
- cell.copyPixels(temp, new Rectangle(200, 3, 28, 29), new Point(0, 0));
- grp_char.push(cell);
- cell = new BitmapData(28, 29);
- cell.copyPixels(temp, new Rectangle(229, 3, 28, 29), new Point(0, 0));
- grp_char.push(cell);
- massmedian = [0, 1, 2, 2, 0, 3, 4, 5, 6, 7];
- for(var i:int = 0; i < massmedian.length; i++)
- {
- massmedian_width += grp_char[massmedian[i]].width;
- }
- player = new Player();
- charpool = new Array();
- particlepool = new Array();
- buffer = new BitmapData(465, 465, false, bgcolor);
- buffer2 = new BitmapData(465, 465, false, bgcolor);
- screen = new Sprite();
- screen.graphics.beginBitmapFill(buffer);
- screen.graphics.drawRect(0, 0, buffer.width, buffer.height);
- addChild(screen);
- screen.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
- screen.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
- stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
- count = -1;
- stage.quality = StageQuality.LOW;
- changeScene("act_title");
- return;
- }
- private function onMouseMove(event:Event):void
- {
- mouse_x = event.target.mouseX;
- mouse_y = event.target.mouseY;
- flash.ui.Mouse.hide();
- return;
- }
- private function onMouseDown(event:Event):void
- {
- mouse_down_temp = true;
- return;
- }
- private function onMouseUp(event:Event):void
- {
- mouse_down_temp = false;
- return;
- }
- private function main():void
- {
- var i:int;
- this[action]();
- player.main();
- for(i = 0; i < charpool.length; i++)
- {
- charpool[i].main();
- if(charpool[i].deleteflag == true)
- {
- charpool.splice(i, 1);
- i--;
- }
- }
- for(i = 0; i < particlepool.length; i++)
- {
- particlepool[i].main();
- if(particlepool[i].deleteflag == true)
- {
- particlepool.splice(i, 1);
- i--;
- }
- }
- return;
- }
- private function draw():void
- {
- var i:int;
- buffer2.colorTransform(buffer2.rect, new ColorTransform(-1, -1, -1, 1, 255, 255, 255, 0));
- for(i = 0; i < charpool.length; i++)
- {
- if(charpool[i].visible == false)
- {
- continue;
- }
- charpool[i].draw(buffer2);
- }
- buffer2.colorTransform(buffer2.rect, new ColorTransform(-1, -1, -1, 1, 255, 255, 255, 0));
- buffer2.scroll(0, 1);
- buffer2.draw(bg);
- buffer.fillRect(buffer.rect, bgcolor);
- buffer.copyPixels(buffer2, buffer2.rect, new Point(0, 0));
- player.draw(buffer);
- for(i = 0; i < charpool.length; i++)
- {
- if(charpool[i].visible == false)
- {
- continue;
- }
- charpool[i].draw(buffer);
- }
- for(i = 0; i < particlepool.length; i++)
- {
- particlepool[i].draw(buffer);
- }
- return;
- }
- private function changeScene(name:String):void
- {
- action = name;
- count = -1;
- return;
- }
- private function addCharacter(char:Object):Object
- {
- charpool.push(char);
- return char;
- }
- private function addItem(x:int, y:int, type:int):Object
- {
- var char:Object = new Character(x, y, type, "act_item");
- return addCharacter(char);
- }
- private function addParticle(x:int, y:int, dir:Number, speed:Number):Object
- {
- var particle:Object = new Particle(x, y, dir, speed);
- particlepool.push(particle);
- return particle;
- }
- private function act_title():void
- {
- if(count == 0)
- {
- var x:int = 50;
- for(var i:int = 0; i < massmedian.length; i++)
- {
- player.formation.push(addCharacter(new Character(x, 100, massmedian[i])));
- }
- }
- var format:TextFormat;
- if(count == 70)
- {
- format = new TextFormat();
- format.font = "_等幅";
- format.bold = true;
- format.size = 28;
- format.color = 0xFFFFFF;
- format.align = TextFormatAlign.CENTER;
- textfield2 = new TextField();
- textfield2.defaultTextFormat = format;
- textfield2.text = "合体ゲーム";
- textfield2.x = 0;
- textfield2.y = 200;
- textfield2.width = 465;
- textfield2.selectable = false;
- textfield2.mouseEnabled = false;
- addChild(textfield2);
- }
- if(count == 80)
- {
- format = new TextFormat();
- format.font = "_sans";
- format.bold = true;
- format.size = 24;
- format.color = 0xFFFF00;
- format.align = TextFormatAlign.CENTER;
- textfield = new TextField();
- textfield.defaultTextFormat = format;
- textfield.text = "CLICK TO START";
- textfield.x = 0;
- textfield.y = 300;
- textfield.width = 465;
- textfield.selectable = false;
- textfield.mouseEnabled = false;
- addChild(textfield);
- }
- if(count >= 80)
- {
- if(count % 80 == 0)
- {
- textfield.visible = true;
- }
- if(count % 80 == 60)
- {
- textfield.visible = false;
- }
- if(mouse_press == true)
- {
- for each(var o:Object in charpool)
- {
- if(o.type != 6)
- {
- o.changeAction("act_futtobi");
- }
- }
- removeChild(textfield);
- removeChild(textfield2);
- player.changeAction("act_main");
- changeScene("act_game");
- return;
- }
- }
- return;
- }
- private function act_game():void
- {
- if(count == 0)
- {
- time = getTimer();
- }
- if(count % 50 == 0)
- {
- addItem(20+Math.random()*425, -16-Math.random()*40, Math.floor(Math.random()*8));
- }
- collision_item();
- if(player.formation.length == massmedian.length)
- {
- for(var i:int = 0; i < player.formation.length; i++)
- {
- if(player.formation[i].type != massmedian[i])
- {
- return;
- }
- }
- for(var j:int = 0; j < charpool.length; j++)
- {
- if(charpool[j].action != "act_player")
- {
- charpool[j].changeAction("act_futtobi");
- }
- }
- time = (getTimer() - time)/1000;
- player.changeAction("act_complete");
- changeScene("act_complete");
- return;
- }
- return;
- }
- private function collision_item():void
- {
- for(var i:int = 0; i < player.formation.length; i++)
- {
- for(var j:int = 0; j < charpool.length; j++)
- {
- if(charpool[j].action == "act_item")
- {
- if((player.formation[i].x-player.formation[i].getWidth()/2 < charpool[j].x)
- && (player.formation[i].y-player.formation[i].getHeight()/2 < charpool[j].y)
- && (player.formation[i].x+player.formation[i].getWidth()/2 > charpool[j].x)
- && (player.formation[i].y+player.formation[i].getHeight()/2 > charpool[j].y))
- {
- for(var k:int = 0; k < 8; k++)
- {
- addParticle(player.formation[i].x, player.formation[i].y, k*32, 6);
- }
- if(player.formation.length < massmedian.length)
- {
- if(player.formation[i].x > charpool[j].x)
- {
- player.formation.splice(i, 0, charpool[j]);
- }
- else
- {
- player.formation.splice(i+1, 0, charpool[j]);
- }
- }
- else
- {
- player.formation[i].changeAction("act_futtobi");
- player.formation.splice(i, 1, charpool[j]);
- }
- charpool[j].changeAction("act_player");
- return;
- }
- }
- }
- }
- return;
- }
- private function act_complete():void
- {
- if(count == 0)
- {
- var format:TextFormat = new TextFormat();
- format.font = "_明朝";
- format.bold = true;
- format.size = 60;
- format.color = 0xFFFFFF;
- format.align = TextFormatAlign.CENTER;
- textfield = new TextField();
- textfield.defaultTextFormat = format;
- textfield.text = "完成";
- textfield.x = 0;
- textfield.y = 280;
- textfield.width = 465;
- textfield.selectable = false;
- textfield.mouseEnabled = false;
- format = new TextFormat();
- format.font = "_等幅";
- format.bold = true;
- format.size = 24;
- format.color = 0xFFFFFF;
- format.align = TextFormatAlign.CENTER;
- textfield2 = new TextField();
- textfield2.defaultTextFormat = format;
- textfield2.text = "Time : "+time+"秒";
- textfield2.x = 0;
- textfield2.y = 360;
- textfield2.width = 465;
- textfield2.selectable = false;
- textfield2.mouseEnabled = false;
- addChild(textfield);
- addChild(textfield2);
- }
- if(count >= 120)
- {
- if(mouse_press == true)
- {
- for(var i:int = 0; i < player.formation.length; i++)
- {
- player.formation[i].vanish();
- }
- removeChild(textfield);
- removeChild(textfield2);
- player.changeAction("act_title");
- changeScene("act_title");
- return;
- }
- }
- return;
- }
- //-------------------------------//
- // Do not change following codes.
- //-------------------------------//
- public function Begineer(){
- var ctxt :LoaderContext = new LoaderContext(true);
- var loader:Loader = new Loader();
- loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onLoadComplete );
- loader.load( new URLRequest("http://swf.wonderfl.net/static/assets/massmedian.png"), ctxt );
- }
- public function onLoadComplete(e:Event):void {
- var loader:Loader = LoaderInfo( e.target ).loader;
- loader.contentLoaderInfo.removeEventListener( Event.COMPLETE, onLoadComplete );
- var bitmapdata:BitmapData = new BitmapData( loader.width, loader.height, true, 0xFF0000 );
- bitmapdata.draw( loader );
- _sliceList = sliceBanner( bitmapdata, bitmapdata.width );
- addEventListener( Event.ENTER_FRAME, updateEnterFrame );
- }
- private function sliceBanner( banner:BitmapData, length:int = 100 ):Array{
- var sliceList:Array = [];
- var w:int = Math.floor( banner.width/length );
- var h:int = Math.floor( banner.height );
- var t:int = Math.ceil( banner.width - w*length );
- var mat:Matrix = new Matrix();
- for( var i:int = 0; i<length; i++ ) {
- var bmpd :BitmapData = new BitmapData( w, h, true, 0xFFFF00 );
- mat.tx = -w*i;
- bmpd.draw( banner, mat );
- var part:DisplayObject = addChild( new Bitmap( bmpd ) );
- part.x = w*i;
- sliceList.push( part );
- }
- return sliceList;
- }
- }
- }
- 出題者からのコメント
- 動きの中に「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.
mtok
- // forked from checkmate's massmedian challenge
- package {
- import com.flashdynamix.motion.TweensyTimeline;
- import flash.display.*;
- import flash.events.*;
- import flash.geom.*;
- import flash.net.*;
- import flash.system.LoaderContext;
- import fl.motion.easing.*;
- import com.flashdynamix.motion.Tweensy;
- //メモ
- /*
- * 画像のサイズは525x70
- *
- */
- public class Massmedian extends Sprite{
- //-------------------------------//
- // Use properties as follows.
- //-------------------------------//
- private var _sliceList:Array;
- private var _timeLines:Array;
- private var _imgWidth:int = 525;
- private var _imgHeight:int = 70;
- private var _sliceHolder:Sprite;
- private var _shadow:Bitmap;
- private var _flag:Boolean = true;
- private var hart:Array = [
- 172, 197, 163, 206, 157, 212, 151, 217, 147, 221, 143, 225, 140, 229, 137, 232, 134, 235, 131, 238, 128, 240, 126, 243, 123, 245, 121, 247, 119, 250, 117, 252, 115, 254, 113, 256, 111, 258, 109, 259, 107, 261, 106, 263, 104, 265, 102, 266, 101, 268, 99, 269, 98, 271, 96, 272, 95, 274, 93, 275, 92, 276, 91, 278, 89, 279, 88, 280, 87, 282, 86, 283, 84, 284, 83, 285, 82, 286, 81, 287, 80, 288, 79, 290, 78, 291, 77, 292, 76, 293, 75, 294, 74, 295, 73, 296, 72, 297, 71, 297, 70, 298, 69, 299, 68, 300, 67, 301, 66, 302, 66, 303, 65, 304, 64, 305, 63, 306, 62, 307, 62, 308, 61, 309, 60, 310, 59, 311, 59, 312, 58, 313, 57, 314, 56, 315, 56, 316, 55, 317, 54, 318, 54, 319, 53, 320, 53, 321, 52, 322, 51, 323, 51, 324, 50, 325, 50, 326, 49, 327, 49, 328, 48, 329, 47, 330, 47, 331, 46, 332, 46, 333, 45, 334, 45, 335, 44, 336, 44, 337, 43, 338, 43, 339, 43, 340, 42, 341, 42, 342, 41, 343, 41, 344, 41, 345, 40, 346, 40, 347, 39, 348, 39, 349, 39, 350, 38, 351, 38, 352, 38, 353, 37, 354, 37, 355, 37, 356, 36, 357, 36, 358, 36, 359, 35, 360, 35, 361, 35, 362, 35, 363, 34, 364, 34, 365, 34, 366, 34, 367, 33, 368, 33, 369, 33, 370, 33, 371, 33, 372, 32, 373, 32, 374, 32, 375, 32, 376, 32, 377, 31, 378, 31, 379, 31, 380, 31, 381, 31, 382, 31, 383, 31, 384, 31, 385, 30, 386, 30, 387, 30, 388, 30, 389, 30, 390, 30, 391, 30, 392, 30, 393, 30, 394, 30, 395, 30, 396, 30, 397, 30, 398, 30, 399, 30, 400, 30, 401, 30, 402, 30, 403, 30, 404, 30, 405, 30, 406, 30, 407, 30, 408, 30, 409, 30, 410, 30, 411, 30, 412, 30, 413, 30, 414, 30, 415, 30, 416, 30, 417, 30, 418, 30, 419, 31, 420, 31, 421, 31, 422, 31, 423, 31, 424, 31, 425, 31, 426, 32, 427, 32, 428, 32, 429, 32, 430, 32, 431, 32, 432, 33, 433, 33, 434, 33, 435, 33, 436, 34, 437, 34, 438, 34, 439, 34, 440, 34, 441, 35, 442, 35, 443, 35, 444, 36, 445, 36, 446, 36, 447, 36, 448, 37, 449, 37, 450, 37, 451, 38, 452, 38, 453, 38, 454, 39, 455, 39, 456, 40, 457, 40, 458, 40, 459, 41, 460, 41, 461, 42, 462, 42, 463, 42, 464, 43, 465, 43, 466, 44, 467, 44, 468, 45, 469, 45, 470, 46, 471, 46, 472, 47, 473, 47, 474, 48, 475, 48, 476, 49, 477, 49, 478, 50, 479, 51, 480, 51, 481, 52, 482, 52, 483, 53, 484, 54, 485, 54, 486, 55, 487, 56, 488, 56, 489, 57, 490, 58, 491, 58, 492, 59, 493, 60, 494, 61, 495, 61, 496, 62, 497, 63, 498, 64, 499, 64, 500, 65, 501, 66, 502, 67, 503, 68, 504, 69, 505, 70, 506, 71, 507, 71, 508, 72, 509, 73, 510, 72, 509, 71, 508, 70, 507, 69, 506, 68, 505, 68, 504, 67, 503, 66, 502, 65, 501, 64, 500, 63, 499, 63, 498, 62, 497, 61, 496, 60, 495, 59, 494, 59, 493, 58, 492, 57, 491, 57, 490, 56, 489, 55, 488, 55, 487, 54, 486, 53, 485, 53, 484, 52, 483, 51, 482, 51, 481, 50, 480, 50, 479, 49, 478, 48, 477, 48, 476, 47, 475, 47, 474, 46, 473, 46, 472, 45, 471, 45, 470, 44, 469, 44, 468, 43, 467, 43, 466, 42, 465, 42, 464, 42, 463, 41, 462, 41, 461, 40, 460, 40, 459, 40, 458, 39, 457, 39, 456, 38, 455, 38, 454, 38, 453, 37, 452, 37, 451, 37, 450, 36, 449, 36, 448, 36, 447, 35, 446, 35, 445, 35, 444, 35, 443, 34, 442, 34, 441, 34, 440, 34, 439, 33, 438, 33, 437, 33, 436, 33, 435, 32, 434, 32, 433, 32, 432, 32, 431, 32, 430, 31, 429, 31, 428, 31, 427, 31, 426, 31, 425, 31, 424, 30, 423, 30, 422, 30, 421, 30, 420, 30, 419, 30, 418, 30, 417, 30, 416, 30, 415, 29, 414, 29, 413, 29, 412, 29, 411, 29, 410, 29, 409, 29, 408, 29, 407, 29, 406, 29, 405, 29, 404, 29, 403, 29, 402, 29, 401, 29, 400, 29, 399, 29, 398, 29, 397, 29, 396, 29, 395, 29, 394, 29, 393, 29, 392, 29, 391, 29, 390, 30, 389, 30, 388, 30, 387, 30, 386, 30, 385, 30, 384, 30, 383, 30, 382, 30, 381, 31, 380, 31, 379, 31, 378, 31, 377, 31, 376, 31, 375, 32, 374, 32, 373, 32, 372, 32, 371, 32, 370, 33, 369, 33, 368, 33, 367, 33, 366, 33, 365, 34, 364, 34, 363, 34, 362, 34, 361, 35, 360, 35, 359, 35, 358, 36, 357, 36, 356, 36, 355, 37, 354, 37, 353, 37, 352, 38, 351, 38, 350, 38, 349, 39, 348, 39, 347, 39, 346, 40, 345, 40, 344, 41, 343, 41, 342, 41, 341, 42, 340, 42, 339, 43, 338, 43, 337, 44, 336, 44, 335, 45, 334, 45, 333, 46, 332, 46, 331, 47, 330, 47, 329, 48, 328, 48, 327, 49, 326, 49, 325, 50, 324, 51, 323, 51, 322, 52, 321, 52, 320, 53, 319, 54, 318, 54, 317, 55, 316, 56, 315, 56, 314, 57, 313, 58, 312, 59, 311, 59, 310, 60, 309, 61, 308, 62, 307, 62, 306, 63, 305, 64, 304, 65, 303, 66, 302, 66, 301, 67, 300, 68, 299, 69, 298, 70, 297, 71, 296, 72, 295, 73, 294, 74, 293, 75, 292, 76, 291, 77, 290, 78, 289, 79, 288, 80, 287, 81, 285, 82, 284, 84, 283, 85, 282, 86, 281, 87, 279, 89, 278, 90, 277, 91, 276, 93, 274, 94, 273, 95, 271, 97, 270, 98, 268, 100, 267, 101, 265, 103, 264, 105, 262, 106, 260, 108, 259, 110, 257, 112, 255, 114, 253, 116, 251, 118, 249, 120, 247, 122, 244, 125, 242, 127, 239, 130, 237, 133, 234, 136, 231, 139, 228, 142, 224, 146, 220, 151, 216, 156, 211, 162, 205, 171, 196,
- ];
- private var fish:Array = [
- 271, 274, 268, 276, 266, 278, 263, 280, 261, 281, 259, 283, 257, 285, 255, 286, 253, 288, 252, 289, 250, 291, 248, 292, 247, 293, 245, 295, 244, 296, 243, 297, 241, 298, 240, 300, 239, 301, 237, 302, 236, 303, 235, 304, 234, 305, 233, 306, 231, 307, 230, 308, 229, 309, 228, 310, 227, 311, 226, 312, 225, 313, 224, 314, 223, 315, 222, 316, 221, 317, 220, 317, 219, 318, 218, 319, 217, 320, 217, 321, 216, 321, 215, 322, 214, 323, 213, 324, 212, 324, 212, 325, 211, 326, 210, 327, 209, 327, 208, 328, 208, 329, 207, 329, 206, 330, 205, 331, 205, 331, 204, 332, 203, 333, 202, 333, 202, 334, 201, 334, 200, 335, 200, 336, 199, 336, 198, 337, 198, 337, 197, 338, 196, 338, 196, 339, 195, 340, 195, 340, 194, 341, 193, 341, 193, 342, 192, 342, 192, 343, 191, 343, 190, 344, 190, 344, 189, 345, 189, 345, 188, 346, 188, 346, 187, 347, 187, 347, 186, 347, 185, 348, 185, 348, 184, 349, 184, 349, 183, 350, 183, 350, 182, 351, 182, 351, 182, 351, 181, 352, 181, 352, 180, 353, 180, 353, 179, 353, 179, 354, 178, 354, 178, 354, 177, 355, 177, 355, 177, 356, 176, 356, 176, 356, 175, 357, 175, 357, 175, 357, 174, 358, 174, 358, 174, 358, 173, 359, 173, 359, 172, 359, 172, 360, 172, 360, 171, 360, 171, 360, 171, 361, 170, 361, 170, 361, 170, 362, 169, 362, 169, 362, 169, 363, 168, 363, 168, 363, 168, 363, 168, 364, 167, 364, 167, 364, 167, 364, 166, 365, 166, 365, 166, 365, 166, 365, 165, 366, 165, 366, 165, 366, 165, 366, 164, 366, 164, 367, 164, 367, 164, 367, 164, 367, 163, 368, 163, 368, 163, 368, 163, 368, 163, 368, 162, 369, 162, 369, 162, 369, 162, 369, 162, 369, 162, 369, 161, 370, 161, 370, 161, 370, 161, 370, 161, 370, 161, 370, 161, 371, 160, 371, 160, 371, 160, 371, 160, 371, 160, 371, 160, 371, 160, 372, 160, 372, 160, 372, 160, 372, 159, 372, 159, 372, 159, 372, 159, 372, 159, 372, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 373, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 159, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 374, 160, 373, 160, 373, 160, 373, 160, 373, 160, 373, 160, 373, 161, 373, 161, 373, 161, 373, 161, 373, 161, 373, 161, 373, 161, 373, 161, 373, 161, 372, 161, 372, 161, 372, 162, 372, 162, 372, 162, 372, 162, 372, 162, 372, 162, 372, 162, 371, 162, 371, 162, 371, 162, 371, 163, 371, 163, 371, 163, 371, 163, 370, 163, 370, 163, 370, 163, 370, 163, 370, 164, 370, 164, 370, 164, 369, 164, 369, 164, 369, 164, 369, 164, 369, 165, 368, 165, 368, 165, 368, 165, 368, 165, 368, 165, 368, 166, 367, 166, 367, 166, 367, 166, 367, 166, 367, 167, 366, 167, 366, 167, 366, 167, 366, 167, 365, 168, 365, 168, 365, 168, 365, 168, 364, 168, 364, 169, 364, 169, 364, 169, 363, 169, 363, 169, 363, 170, 363, 170, 362, 170, 362, 170, 362, 171, 362, 171, 361, 171, 361, 171, 361, 172, 360, 172, 360, 172, 360, 172, 360, 173, 359, 173, 359, 173, 359, 174, 358, 174, 358, 174, 358, 175, 357, 175, 357, 175, 357, 175, 357, 176, 356, 176, 356, 176, 355, 177, 355, 177, 355, 177, 354, 178, 354, 178, 354, 178, 353, 179, 353, 179, 353, 179, 352, 180, 352, 180, 352, 181, 351, 181, 351, 181, 350, 182, 350, 182, 350, 183, 349, 183, 349, 183, 348, 184, 348, 184, 348, 185, 347, 185, 347, 185, 346, 186, 346, 186, 346, 187, 345, 187, 345, 188, 344, 188, 344, 189, 343, 189, 343, 190, 343, 190, 342, 191, 342, 191, 341, 192, 341, 192, 340, 193, 340, 193, 339, 194, 339, 194, 338, 195, 338, 195, 337, 196, 337, 196, 336, 197, 336, 198, 335, 198, 335, 199, 334, 199, 334, 200, 333, 201, 333, 201, 332, 202, 332, 202, 331, 203, 331, 204, 330, 204, 330, 205, 329, 206, 328, 206, 328, 207, 327, 208, 327, 208, 326, 209, 326, 210, 325, 210, 324, 211, 324, 212, 323, 212, 323, 213, 322, 214, 322, 215, 321, 215, 320, 216, 320, 217, 319, 218, 318, 218, 318, 219, 317, 220, 316, 221, 316, 222, 315, 223, 315, 223, 314, 224, 313, 225, 313, 226, 312, 227, 311, 228, 310, 228, 310, 229, 309, 230, 308, 231, 308, 232, 307, 233, 306, 234, 305, 235, 305, 236, 304, 237, 303, 238, 302, 239, 302, 240, 301, 241, 300, 242, 299, 243, 298, 243, 298, 242, 299, 241, 300, 240, 301, 239, 301, 238, 302, 238, 303, 237, 304, 236, 305, 235, 305, 234, 306, 233, 307, 232, 308, 232, 308, 231, 309, 230, 310, 229, 311, 228, 311, 227, 312, 227, 313, 226, 314, 225, 315, 224, 315, 223, 316, 222, 317, 221, 318, 221, 318, 220, 319, 219, 320, 218, 321, 217, 321, 216, 322, 215, 323, 215, 324, 214, 324, 213, 325, 212, 326, 211, 327, 210, 328, 209, 328, 209, 329, 208, 330, 207, 331, 206, 331, 205, 332, 204, 333, 203, 334, 203, 334, 202, 335, 201, 336, 200, 337, 199, 338, 198, 338, 197, 339, 196, 340, 196, 341, 195, 341, 194, 342, 193, 343, 192, 344, 191, 344, 190, 345, 190, 346, 189, 347, 188, 348, 187, 348, 186, 349, 185, 350, 184, 351, 184, 351, 183, 352, 182, 353, 181, 354, 180, 354, 179, 355, 178, 356, 177, 357, 177, 357, 176, 358, 175, 359, 174, 360, 173, 361, 172, 361, 171, 362, 171, 363, 170, 364, 169, 364, 168, 365, 167, 366, 166, 367, 165, 367, 164, 368, 164, 369, 163, 370, 162, 371, 161, 371, 160, 372, 159, 373, 158, 374,
- ];
- private var circle:Array = [
- 247, 280, 235, 292, 227, 300, 221, 306, 215, 312, 210, 317, 205, 322, 201, 326, 197, 330, 193, 334, 190, 337, 186, 341, 183, 344, 180, 347, 177, 350, 174, 353, 172, 355, 169, 358, 167, 360, 164, 363, 162, 365, 159, 368, 157, 370, 155, 372, 153, 374, 151, 376, 148, 379, 146, 381, 144, 383, 143, 384, 141, 386, 139, 388, 137, 390, 135, 392, 133, 394, 132, 395, 130, 397, 128, 399, 127, 400, 125, 402, 123, 404, 122, 405, 120, 407, 119, 408, 117, 410, 116, 411, 114, 413, 113, 414, 111, 416, 110, 417, 109, 418, 107, 420, 106, 421, 105, 422, 103, 424, 102, 425, 101, 426, 100, 427, 98, 429, 97, 430, 96, 431, 95, 432, 93, 434, 92, 435, 91, 436, 90, 437, 89, 438, 88, 439, 87, 440, 86, 441, 85, 442, 83, 444, 82, 445, 81, 446, 80, 447, 79, 448, 78, 449, 77, 450, 76, 451, 75, 452, 74, 453, 73, 454, 72, 455, 72, 455, 71, 456, 70, 457, 69, 458, 68, 459, 67, 460, 66, 461, 65, 462, 64, 463, 63, 464, 63, 464, 62, 465, 61, 466, 60, 467, 59, 468, 59, 468, 58, 469, 57, 470, 56, 471, 55, 472, 55, 472, 54, 473, 53, 474, 52, 475, 52, 475, 51, 476, 50, 477, 49, 478, 49, 478, 48, 479, 47, 480, 47, 480, 46, 481, 45, 482, 45, 482, 44, 483, 43, 484, 43, 484, 42, 485, 41, 486, 41, 486, 40, 487, 40, 487, 39, 488, 38, 489, 38, 489, 37, 490, 37, 490, 36, 491, 35, 492, 35, 492, 34, 493, 34, 493, 33, 494, 33, 494, 32, 495, 32, 495, 31, 496, 31, 496, 30, 497, 29, 498, 29, 498, 28, 499, 28, 499, 27, 500, 27, 500, 27, 500, 26, 501, 26, 501, 25, 502, 25, 502, 24, 503, 24, 503, 23, 504, 23, 504, 22, 505, 22, 505, 22, 505, 21, 506, 21, 506, 20, 507, 20, 507, 20, 507, 19, 508, 19, 508, 18, 509, 18, 509, 18, 509, 17, 510, 17, 510, 16, 511, 16, 511, 16, 511, 15, 512, 15, 512, 15, 512, 14, 513, 14, 513, 14, 513, 13, 514, 13, 514, 13, 514, 12, 515, 12, 515, 12, 515, 12, 515, 11, 516, 11, 516, 11, 516, 10, 517, 10, 517, 10, 517, 10, 517, 9, 518, 9, 518, 9, 518, 9, 518, 8, 519, 8, 519, 8, 519, 8, 519, 7, 520, 7, 520, 7, 520, 7, 520, 7, 520, 6, 521, 6, 521, 6, 521, 6, 521, 6, 521, 5, 522, 5, 522, 5, 522, 5, 522, 5, 522, 5, 522, 4, 523, 4, 523, 4, 523, 4, 523, 4, 523, 4, 523, 3, 524, 3, 524, 3, 524, 3, 524, 3, 524, 3, 524, 3, 524, 3, 524, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 1, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 2, 525, 3, 524, 3, 524, 3, 524, 3, 524, 3, 524, 3, 524, 3, 524, 3, 524, 4, 523, 4, 523, 4, 523, 4, 523, 4, 523, 4, 523, 5, 522, 5, 522, 5, 522, 5, 522, 5, 522, 5, 522, 6, 521, 6, 521, 6, 521, 6, 521, 6, 521, 7, 520, 7, 520, 7, 520, 7, 520, 7, 520, 8, 519, 8, 519, 8, 519, 8, 519, 9, 518, 9, 518, 9, 518, 9, 518, 10, 517, 10, 517, 10, 517, 10, 517, 11, 516, 11, 516, 11, 516, 12, 515, 12, 515, 12, 515, 12, 515, 13, 514, 13, 514, 13, 514, 14, 513, 14, 513, 14, 513, 15, 512, 15, 512, 15, 512, 16, 511, 16, 511, 16, 511, 17, 510, 17, 510, 18, 509, 18, 509, 18, 509, 19, 508, 19, 508, 20, 507, 20, 507, 20, 507, 21, 506, 21, 506, 22, 505, 22, 505, 22, 505, 23, 504, 23, 504, 24, 503, 24, 503, 25, 502, 25, 502, 26, 501, 26, 501, 27, 500, 27, 500, 27, 500, 28, 499, 28, 499, 29, 498, 29, 498, 30, 497, 31, 496, 31, 496, 32, 495, 32, 495, 33, 494, 33, 494, 34, 493, 34, 493, 35, 492, 35, 492, 36, 491, 37, 490, 37, 490, 38, 489, 38, 489, 39, 488, 40, 487, 40, 487, 41, 486, 41, 486, 42, 485, 43, 484, 43, 484, 44, 483, 45, 482, 45, 482, 46, 481, 47, 480, 47, 480, 48, 479, 49, 478, 49, 478, 50, 477, 51, 476, 52, 475, 52, 475, 53, 474, 54, 473, 55, 472, 55, 472, 56, 471, 57, 470, 58, 469, 59, 468, 59, 468, 60, 467, 61, 466, 62, 465, 63, 464, 63, 464, 64, 463, 65, 462, 66, 461, 67, 460, 68, 459, 69, 458, 70, 457, 71, 456, 72, 455, 72, 455, 73, 454, 74, 453, 75, 452, 76, 451, 77, 450, 78, 449, 79, 448, 80, 447, 81, 446, 82, 445, 83, 444, 85, 442, 86, 441, 87, 440, 88, 439, 89, 438, 90, 437, 91, 436, 92, 435, 93, 434, 95, 432, 96, 431, 97, 430, 98, 429, 100, 427, 101, 426, 102, 425, 103, 424, 105, 422, 106, 421, 107, 420, 109, 418, 110, 417, 111, 416, 113, 414, 114, 413, 116, 411, 117, 410, 119, 408, 120, 407, 122, 405, 123, 404, 125, 402, 127, 400, 128, 399, 130, 397, 132, 395, 133, 394, 135, 392, 137, 390, 139, 388, 141, 386, 143, 384, 144, 383, 146, 381, 148, 379, 151, 376, 153, 374, 155, 372, 157, 370, 159, 368, 162, 365, 164, 363, 167, 360, 169, 358, 172, 355, 174, 353, 177, 350, 180, 347, 183, 344, 186, 341, 190, 337, 193, 334, 197, 330, 201, 326, 205, 322, 210, 317, 215, 312, 221, 306, 227, 300, 235, 292, 247, 280,
- ];
- //-------------------------------//
- // Change functions as follows.
- //-------------------------------//
- public function updateEnterFrame( e:Event ):void{
- removeEventListener(e.type, arguments.callee);
- transform.matrix
- initialize();
- }
- private function updateEnterFrame2(e:Event = null):void {
- //_sliceHolder.rotationY += 1;
- }
- private function hideAllSlices():void {
- var bmp:Bitmap;
- var i:int;
- var len:int = _sliceList.length;
- for (i = 0; i < len; i++) {
- bmp = _sliceList[i] as Bitmap;
- bmp.visible = false;
- }
- }
- private function initialize():void {
- addEventListener(Event.ENTER_FRAME, updateEnterFrame2);
- var pv:PerspectiveProjection = new PerspectiveProjection();
- pv.projectionCenter.x = stage.stageWidth * 0.5;
- pv.projectionCenter.y = stage.stageHeight * 0.5;
- pv.focalLength = 500 * 2;
- transform.perspectiveProjection = pv;
- var len:int;
- var bmp:Bitmap;
- var i:int;
- addChild(_sliceHolder = new Sprite());
- _sliceHolder.x = stage.stageWidth * 0.5;
- _sliceHolder.y = stage.stageHeight * 0.5;
- _sliceHolder.z = stage.stageWidth * 0.5;
- len = _sliceList.length;
- for (i = 0; i < len; i++) {
- bmp = _sliceList[i] as Bitmap;
- _sliceHolder.addChild(bmp);
- bmp.x = -(len * 0.5) + i;
- bmp.y = - bmp.height * 0.5;
- }
- stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
- }
- private function mouseDownHandler(event:MouseEvent):void
- {
- var num:int = int(Math.random() * 3 + 1);
- _flag ? this["pump"+num]() : shrivel();
- _flag = !_flag;
- }
- private function pump2():void {
- var i:int;
- var len:int = _sliceList.length;
- var s:int;
- var e:int;
- var bmp:Bitmap;
- var tl:TweensyTimeline;
- for (i = 0; i < len; i++) {
- s = hart[2*i];
- e = hart[2*i + 1];
- bmp = _sliceList[i] as Bitmap;
- Tweensy.to(bmp, { y:s - 250, height:e-s }, 1 + 0.002*i, Elastic.easeOut, 0.0001*i );
- }
- }
- private function pump3():void {
- var i:int;
- var len:int = _sliceList.length;
- var s:int;
- var e:int;
- var bmp:Bitmap;
- var tl:TweensyTimeline;
- for (i = 0; i < len; i++) {
- s = fish[2*i];
- e = fish[2*i + 1];
- bmp = _sliceList[i] as Bitmap;
- Tweensy.to(bmp, { y:s - 250, height:e-s }, 1 + 0.002*i, Elastic.easeOut, 0.0001*i );
- }
- }
- private function pump1():void {
- var i:int;
- var len:int = _sliceList.length;
- var s:int;
- var e:int;
- var bmp:Bitmap;
- var tl:TweensyTimeline;
- for (i = 0; i < len; i++) {
- s = circle[2*i];
- e = circle[2*i + 1];
- bmp = _sliceList[i] as Bitmap;
- Tweensy.to(bmp, { y:s - 250, height:e-s }, 1 + 0.002*i, Elastic.easeOut, 0.0001*i );
- }
- }
- private function shrivel():void {
- var i:int;
- var len:int = _sliceList.length;
- var s:int;
- var e:int;
- var bmp:Bitmap;
- var tl:TweensyTimeline;
- for (i = 0; i < len; i++) {
- bmp = _sliceList[i] as Bitmap;
- Tweensy.to(bmp, {y:-35, height:70}, 2 + 0.002*i, Bounce.easeOut, 0.001*i);
- }
- }
- //-------------------------------//
- // Do not change following codes.
- //-------------------------------//
- public function Massmedian(){
- var ctxt :LoaderContext = new LoaderContext(true);
- var loader:Loader = new Loader();
- loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onLoadComplete );
- loader.load( new URLRequest("http://swf.wonderfl.net/static/assets/massmedian.png"), ctxt );
- }
- public function onLoadComplete(e:Event):void {
- var loader:Loader = LoaderInfo( e.target ).loader;
- loader.contentLoaderInfo.removeEventListener( Event.COMPLETE, onLoadComplete );
- var bitmapdata:BitmapData = new BitmapData( loader.width, loader.height, true, 0xFF0000 );
- bitmapdata.draw( loader );
- _sliceList = sliceBanner( bitmapdata, bitmapdata.width );
- addEventListener( Event.ENTER_FRAME, updateEnterFrame );
- }
- private function sliceBanner( banner:BitmapData, length:int = 100 ):Array{
- var sliceList:Array = [];
- var w:int = Math.floor( banner.width/length );
- var h:int = Math.floor( banner.height );
- var t:int = Math.ceil( banner.width - w*length );
- var mat:Matrix = new Matrix();
- for( var i:int = 0; i<length; i++ ) {
- var bmpd :BitmapData = new BitmapData( w, h, true, 0xFFFF00 );
- mat.tx = -w*i;
- bmpd.draw( banner, mat );
- var part:DisplayObject = addChild( new Bitmap( bmpd ) );
- part.x = w*i;
- sliceList.push( part );
- }
- return sliceList;
- }
- }
- }
- 出題者からのコメント
- 動きがダイナミックに変わるのがとても楽しいです。くだけたカタチと「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.
9re
- // forked from checkmate's massmedian challenge
- package {
- import flash.display.*;
- import flash.events.*;
- import flash.geom.*;
- import flash.net.*;
- import flash.system.LoaderContext;
- public class Begineer extends Sprite{
- //-------------------------------//
- // Use properties as follows.
- //-------------------------------//
- private var _sliceList:Array;
- private var _v:Number = 8;
- private var _x:Number = 0;
- private var _c:Number = 0.004;
- private var _vs:Number = 0.08;
- private var _xs:Number = 0;
- private var _cs:Number = 0.001;
- //-------------------------------//
- // Change functions as follows.
- //-------------------------------//
- public function updateEnterFrame( e:Event ):void{
- _v -= _x * _c;
- _x += _v;
- _vs -= _xs * _cs;
- _xs += _vs;
- var slice:DisplayObject = _sliceList[0];
- var part:DisplayObject;
- slice.y = _x - mouseY * 0.3 + 300;
- slice.scaleY = _xs;
- var len:int = _sliceList.length;
- for each (part in _sliceList) {
- part.y += (slice.y - part.y) * 0.9;
- part.scaleY += (slice.scaleY - part.scaleY) * 0.8;
- slice = part;
- }
- }
- //-------------------------------//
- // Do not change following codes.
- //-------------------------------//
- public function Begineer(){
- var ctxt :LoaderContext = new LoaderContext(true);
- var loader:Loader = new Loader();
- loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onLoadComplete );
- loader.load( new URLRequest("http://swf.wonderfl.net/static/assets/massmedian.png"), ctxt );
- }
- public function onLoadComplete(e:Event):void {
- var loader:Loader = LoaderInfo( e.target ).loader;
- loader.contentLoaderInfo.removeEventListener( Event.COMPLETE, onLoadComplete );
- var bitmapdata:BitmapData = new BitmapData( loader.width, loader.height, true, 0xFF0000 );
- bitmapdata.draw( loader );
- _sliceList = sliceBanner( bitmapdata, bitmapdata.width );
- addEventListener( Event.ENTER_FRAME, updateEnterFrame );
- }
- private function sliceBanner( banner:BitmapData, length:int = 100 ):Array{
- var sliceList:Array = [];
- var w:int = Math.floor( banner.width/length );
- var h:int = Math.floor( banner.height );
- var t:int = Math.ceil( banner.width - w*length );
- var mat:Matrix = new Matrix();
- for( var i:int = 0; i<length; i++ ) {
- var bmpd :BitmapData = new BitmapData( w, h, true, 0xFFFF00 );
- mat.tx = -w*i;
- bmpd.draw( banner, mat );
- var part:DisplayObject = addChild( new Bitmap( bmpd ) );
- part.x = w*i;
- sliceList.push( part );
- }
- return sliceList;
- }
- }
- }
- 出題者からのコメント
- 流れるような動きと「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.





