block6
/**
* Copyright Maeda_addevent ( http://wonderfl.net/user/Maeda_addevent )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/9E2u
*/
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.geom.Point;
[SWF(width=465,height=465,backgroundColor=0xFFFFFF,frameRate=60)]
public class FB00009 extends Sprite {
public var sw:Number=stage.stageWidth;
public var sh:Number=stage.stageHeight;
public var r:Number=30;
public var _mySprite:mySprite;
public var num:uint=0;
public var speed:Number=0;
public var chk:Boolean=false;
public var _myArray = new Array();
public var intX:Number=sw/2;//中央
public var intY:Number=150;
public function FB00009() {
//1段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2;
_mySprite.y=0+intY;
addChild(_mySprite);
//2段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5;
_mySprite.y=r/2+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5;
_mySprite.y=r/2+intY;
addChild(_mySprite);
//3段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5*2;
_mySprite.y=r+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2;
_mySprite.y=r+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5*2;
_mySprite.y=r+intY;
addChild(_mySprite);
//4段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5*3;
_mySprite.y=r*1.5+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5;
_mySprite.y=r*1.5+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5;
_mySprite.y=r*1.5+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5*3;
_mySprite.y=r*1.5+intY;
addChild(_mySprite);
//5段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5*4;
_mySprite.y=r*2+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5*2;
_mySprite.y=r*2+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2;
_mySprite.y=r*2+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5*2;
_mySprite.y=r*2+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5*4;
_mySprite.y=r*2+intY;
addChild(_mySprite);
//6段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5*3;
_mySprite.y=r*2.5+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5;
_mySprite.y=r*2.5+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5;
_mySprite.y=r*2.5+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5*3;
_mySprite.y=r*2.5+intY;
addChild(_mySprite);
//7段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5*2;
_mySprite.y=r*3+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2;
_mySprite.y=r*3+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5*2;
_mySprite.y=r*3+intY;
addChild(_mySprite);
//8段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2-26.5;
_mySprite.y=r*3.5+intY;
addChild(_mySprite);
_mySprite=new mySprite(r);
_mySprite.x=sw/2+26.5;
_mySprite.y=r*3.5+intY;
addChild(_mySprite);
//9段目
_mySprite=new mySprite(r);
_mySprite.x=sw/2;
_mySprite.y=r*4+intY;
addChild(_mySprite);
//stage.addEventListener(MouseEvent.MOUSE_DOWN,xDown);
}
//public function xDown(e:MouseEvent):void {
//r=30;
//_mySprite=new mySprite(r);
//_mySprite.x=sw/2;
//_mySprite.y=-10;
//addChild(_mySprite);
//num++;
//_mySprite.addEventListener(Event.ENTER_FRAME,xEnter);
//}
//public function xEnter(e:Event):void {
//speed+=0.2;
//if (speed>=8) {
//speed=8;
//}
//e.target.y+=speed;
//if (e.target.y>=sh-(e.target.height/3)*num) {
////e.target.y=sh-e.target.height;
//speed=0;
//e.target.removeEventListener(Event.ENTER_FRAME,xEnter);
//
//}
//}
}
}
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
class mySprite extends Sprite {
public var color:Number=0xFFFFFF;
public var speed:Number=0;
public function mySprite(r:Number) {
var g=this.graphics;
g.lineStyle(0.5,0x000000,1,false,"none");
g.beginFill(color,1);
g.moveTo(0,0);
g.lineTo(r*0.865,r/2);
g.lineTo(0,r);
g.lineTo(-r*0.865,r/2);
g.lineTo(0,0);
g.endFill();
g.lineStyle(0.5,0x000000,1,false,"none");
g.beginFill(color,1);
g.moveTo(-r*0.865,r/2);
g.lineTo(0,r);
g.lineTo(0,r*2);
g.lineTo(-r*0.865,r*1.505);
g.lineTo(-r*0.865,r/2);
g.endFill();
g.lineStyle(0.5,0x000000,1,false,"none");
g.beginFill(color,1);
g.moveTo(0,r);
g.lineTo(r*0.865,r/2);
g.lineTo(r*0.865,r*1.505);
g.lineTo(0,r*2);
g.lineTo(0,r);
g.endFill();
}
}