RE: [Flashcoders] byteArray x/y

2008-04-20 Thread I Go Geo
: Thursday, April 17, 2008 4:41 AM To: Flash Coders List Subject: Re: [Flashcoders] byteArray x/y Terry, // in randomize( ) in TileMap.as we have // a value sometimes more than 12... setTile(j, i, (i * numCols) + j); // here ^ // But the original has a value never more than 12

Re: [Flashcoders] byteArray x/y

2008-04-19 Thread John McCormack
Terry, I had spacetiles.gif in line 26 of SpaceMap.as but have now changed it to tiles.gif // change spacetiles.gif to tiles.gif. This code gives each row with the same tile numbers, like this 0123456700 0123456700 public function randomize (numTiles:int):void { var numRows:int

Re: [Flashcoders] byteArray x/y

2008-04-18 Thread John McCormack
Terry, I think I know what might be going wrong for you. You might be expecting something different. Try this... Instead of setTile(j, i, (i * numCols) + j); Let's use tile 1 or tile 9... Change that line to setTile(j, i, 1) or setTile(j, i, 9) You see a 16x16 pattern repeated. The 12 tiles

RE: [Flashcoders] byteArray x/y

2008-04-18 Thread I Go Geo
] Behalf Of John McCormack Sent: Friday, April 18, 2008 10:17 AM To: Flash Coders List Subject: Re: [Flashcoders] byteArray x/y Terry, I think I know what might be going wrong for you. You might be expecting something different. Try this... Instead of setTile(j, i, (i * numCols) + j); Let's use tile

Re: [Flashcoders] byteArray x/y

2008-04-17 Thread John McCormack
Terry, // in randomize( ) in TileMap.as we have // a value sometimes more than 12... setTile(j, i, (i * numCols) + j); // here ^ // But the original has a value never more than 12 setTile(j, i, Math.floor(Math.random()*numTiles)); // here ^^^ //

RE: [Flashcoders] byteArray x/y

2008-04-17 Thread I Go Geo
should read //Line 28 in TileSet.as? Thanks, Terry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John McCormack Sent: Thursday, April 17, 2008 4:41 AM To: Flash Coders List Subject: Re: [Flashcoders] byteArray x/y Terry, // in randomize( ) in TileMap.as

Re: [Flashcoders] byteArray x/y

2008-04-16 Thread Glen Pike
Hi, The TileSet class will split up a bitmap into square tiles for you - look at the convertBitmapTiles function. It also has a loadTiles function which does all this for you. Have a look at the SpaceMap demo - which uses the TileMap, TileSet the dragging stuff. TileMap