1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
package
{
import flash.display.MovieClip;
import flash.events.Event;
import flash.display.Bitmap;
import flash.geom.Matrix;
[SWF(frameRate='32',width='800',height='600',backgroundColor='0')]
public class Main extends MovieClip
{
[Embed(source = "../lib/developpez.jpg")]
private var developpez:Class;
private var Fond:Bitmap = new developpez();
private var matrice:Matrix=new Matrix();
public function Main():void
{
Fond.scaleX = 0.4;
Fond.scaleY = 0.4;
matrice.createBox(0.4, 0.4, 0, - Fond.width / 2, - Fond.height / 2);
with (graphics)
{
beginBitmapFill(Fond.bitmapData, matrice);
drawRect( - Fond.width / 2, - Fond.height / 2, Fond.width, Fond.height);
}
x = stage.stageWidth/2;
y = stage.stageHeight / 2 ;
Fond.addEventListener(Event.ENTER_FRAME, doMove);
}
private function doMove(pEvent:Event):void
{
rotationY+=3;
}
}
} |
Partager