Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package {
- import flash.display.*;
- import flash.events.*;
- public class Floor extends Sprite {
- var floorMC:Sprite = new Sprite();
- var floorList = new Array();
- public function Floor() {
- floorMC = new floorImage();
- drawFloor(10, 10, 100);
- }
- public function drawFloor(fX:Number, fY:Number, fW:Number):void {
- for(var i = 0; i < fW; i++) {
- floorList.push(floorMC);
- stage.addChild(floorList[i]);
- floorList[i].x = fX + i;
- floorList[i].y = fY;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement