Re: [Flashcoders] Displaying objects

2006-03-29 Thread John Grden
You might have a look at this: http://mirror1.cvsdude.com/trac/osflash/red5/browser/java/server/trunk/swf/DEV_Source/classes/org/red5/samples/games/othello/GameBoard.as?rev=604#L98 resolveSiblings() is the method. Basically, it has some calculations for finding out if a piece is an end or corner

Re: [Flashcoders] Displaying objects

2006-03-29 Thread John Grden
> Hand coding the array would be laborsome and wouldn't allow for extensibility. hehe yeah... I know ;) I'd be doing #1 too, but I guess that's probably what we like and hate about the job we do eh? ___ Flashcoders@chattyfig.figleaf.com To change your s

Re: [Flashcoders] Displaying objects

2006-03-29 Thread Flash Mel
Hehe, all good. Thanks John. I'm sitting here trying to write something mathematically that works. Turns out I am the suck at math, so it's making this complicated. Hand coding the array would be laborsome and wouldn't allow for extensibility. Grrr... fM. On 3/29/06, John Grden <[EMAIL PR

Re: [Flashcoders] Displaying objects

2006-03-29 Thread John Grden
Sorry, code correction - LOL, on code that's not been tested ... for(var i:Number=0;i wrote: > > well, if you're using my code, then it would essentially build all pieces > the way you show it happening in that link. > > to do it diagonaly the way you specify, there's 2 ways: > > 1. come up with

Re: [Flashcoders] Displaying objects

2006-03-29 Thread John Grden
well, if you're using my code, then it would essentially build all pieces the way you show it happening in that link. to do it diagonaly the way you specify, there's 2 ways: 1. come up with an algorithm to calculate that type of movement based on the number of rows/cols you have (ouch) 2. creat

Re: [Flashcoders] Displaying objects

2006-03-29 Thread Flash Mel
Thanks John, This is great! When I trace this, it works. I've applied it to my code, and I think I have added something wrong. What happens is that all the elements just build in a single area. Here is what I had in the previous code: http://www.apt11.com/test/test.html Essentially, I need "0

[Flashcoders] Displaying objects

2006-03-29 Thread Flash Mel
Ok, since my email got through this morning, I'm hoping this one gets through. Here is the question I've emailed four times now. Doesn't show up in the threads. Here we go: Here is what I have so far: import mx.transitions.Tween; import mx.transitions.easing.*; m = 0; numTiles = 112; funct

Re: [Flashcoders] Displaying objects

2006-03-29 Thread John Grden
also, i released this in the red5 repository - it's a GridManager class that you can use to draw a grid (literally or not) and gives you methods like: 1. calcGridLocation() - based on where you mouse is over the grid, you get back a zero based grid number. So if i you have a 3x3 grid, you might

Re: [Flashcoders] Displaying objects

2006-03-29 Thread John Grden
This will give you what you're looking for: var cols:Number = 3; var rows:Number = 3; for(var i:Number=0;i * 50, _y:Math.floor(m / 14) * 50}); > myObj = "tile" + m + "_mc"; > new Tween(_root[myObj], "_alpha", Regular.easeInOut, 0, 100, 35, > false); > _root[myObj].number_t

[Flashcoders] Displaying objects

2006-03-29 Thread Flash Mel
Ok, since my email got through this morning, I'm hoping this one gets through. Here is the question I've emailed four times now. Doesn't show up in the threads. Here we go: Here is what I have so far: import mx.transitions.Tween; import mx.transitions.easing.*; m = 0; numTiles = 112; funct