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 41 42 43 44 45 46 47 48
| var Speed_ciel=10;
import flash.display.BitmapData;
this.createEmptyMovieClip("holder0_mc", this.getNextHighestDepth());
loader0 = new MovieClipLoader();
loader0.addListener(this);
loader0.loadClip("image310.jpg", holder0_mc);
function onLoadInit()
{
myBitmap0 = new BitmapData(320, 240, true, 0x00FFFFFF);
myBitmap0.draw(holder0_mc);
holder0_mc.removeMovieClip();
beginBitmapFill(myBitmap0);
lineTo(-320, 0);
lineTo(-320, 240);
lineTo(0, 240);
endFill();
this.onEnterFrame = function()
{
if(Key.isDown(Key.LEFT)) this._x += Speed_ciel;
if(Key.isDown(Key.RIGHT)) this._x -= Speed_ciel;
if(this._x<=-320) this._x = 320;
if(this._x>320) this._x = -320+Speed_ciel;
}
}
////////////////////
this.createEmptyMovieClip("holder1_mc", this.getNextHighestDepth());
loader1 = new MovieClipLoader();
loader1.addListener(this);
loader1.loadClip("image311.jpg", holder1_mc);
function onLoadInit()
{
myBitmap1 = new BitmapData(320, 240, true, 0x00FFFFFF);
myBitmap1.draw(holder1_mc);
holder1_mc.removeMovieClip();
beginBitmapFill(myBitmap1);
lineTo(320+320, 0);
lineTo(320+320, 240);
lineTo(0, 240);
endFill();
this.onEnterFrame = function()
{
if(Key.isDown(Key.LEFT)) this._x += Speed_ciel;
if(Key.isDown(Key.RIGHT)) this._x -= Speed_ciel;
if(this._x<=-320) this._x = 320;
if(this._x>320) this._x = -320+Speed_ciel;
}
} |
Partager