
Initally the display list seem to be easy, but now I’m stuck.
How would I access the "BlackTorn1" if I have the following structure:
===================================
[object ChessGame] root1
[object MovieClip] instance1
[object ChessBoardPiece] a8
[object MovieClip] square
[object Shape] instance3
[object TextField] gridNum
[object Torn] BlackTorn1
[object Shape] instance131
===================================
I can access the "a8" by following:
gameBoardContainer.getChildByName("a8").y += 10;
but if I try
gameBoardContainer.getChildByName("a8").getChildBy Name("BlackTorn1").x += 25;
it doesn’t work. Or if I try
gameBoardContainer.a8.getChildByName("BlackTorn1") .x += 25;
I get this error.
TypeError: Error #1010: A term is undefined and has no properties.
at ChessGame/setupPieces()
at ChessGame/addPieces()
at ChessGame()
What am I doing wrong?
Thanks for any enlightening answers.
/Michael
If you would like to make a comment, please fill out the form below.
Recent Comments