sketch_08121801
[SWF(width="465", height="465", backgroundColor="0x000000", frameRate="30")]
package{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.Shape;
import flash.events.Event;
import flash.text.TextField;
//[SWF(width="465", height="465", backgroundColor="0x000000", frameRate="30")]
public class Main extends MovieClip{
private var _base:Sprite;
private var _tf:TextField;
private var _tfBox:Sprite;
public function Main(){
_tf = new TextField();
_tf.text = "はろー\nはろー\nわんだふる";
_tfBox = new Sprite();
_tfBox.addChild(_tf);
_base = new Sprite();
_base.x = 465 / 2;
_base.y = 465 / 2;
for(var i:int = 0; i < 64; i++){
var s:Shape = new Shape();
s.graphics.beginFill(0x000000, 1);
s.graphics.drawRect(-2, -2, 4, 4);
s.graphics.endFill();
s.x = -200 + ((i % 8) * (400 / 7));
s.y = -200 + Math.floor(i / 8) * (400 / 7);
_base.addChild(s);
}
_base.rotationX = 90;
_base.y += 130;
addChild(_base);
_tf.x = -(_tf.textWidth / 2);
_tfBox.x = 465 / 2;
_tfBox.y = 465 / 2 - 180;
_tfBox.scaleX = _tfBox.scaleY = 8;
addChild(_tfBox);
addEventListener(Event.ENTER_FRAME, update);
}
private function update(e:Event = null):void{
_base.rotationY += 2;
_tfBox.rotationY += 2;
}
}
}