PDA

View Full Version : Why isn't this attachMovie line working?


worldspawn
04-28-2010, 03:58 AM
Grrrrrr I keep running into simple problems. I have two small arrays defined as follows:

riverTilesArray = new Array();
riverTilesArray = ["r01","r01","r01"];

Now these arrays are being used to attach little tiles, "r01" being little river tiles. The for loop I'm using to do this is:

riverTileDepth = 0;

for (r = 0; r < 3; r++) {
riverTileID = "riverTile" + riverTileDepth;
var tempMovie = this.attachMovie(riverTilesArray[r], riverTileID, riverTileDepth);
riverTileDepth++;
}

I've tried this with the var tempMovie = part and without but it still doesn't place any tiles. Using trace I've determined all of the variables and arrays contain what I want them to, but when using trace on properties of the tile that's SUPPOSED to be placed it's undefined, so nothing is even getting placed. What's aggravating is this is nearly identical to another part of my program that does the same thing only with a different tileArray, and that works. What could I be missing?