-
Spidey wants his icon back!
My buttons wont' populate and I have no clue why
My buttons won't populate.. I'm obtaining the variables thru XML data, everything else in the damn thing works fine, so I know the data is loading correctly, but my buttons won't populate.. I'm wondering if anyone sees something wrong in my code cause I don't see it.. thanks
PHP Code:
function buildMenu(){
tiles = new Array();
for (i=0; i < menuItems.length; i++) {
duplicateMovieClip(master, "tile" + i, 1000 + i);
tiles[i] = this["tile" +i];
//set the master tile position with XML data
tiles[i]._x = Number(menu.attributes.x);
tiles[i]._y = Number(menu.attributes.y) + (i * master._height);
tiles[i].title = "<P ALIGN=\"CENTER\"><FONT FACE=\"" + menuItems[i].fontFace + "\" SIZE=\"" + menuItems[i].fontSize + "\" COLOR=\"#" + menuItems[i].textColor + "\">" + menuItems[i].Artist + "</FONT></P>"
tiles[i]._name = menuItems[i].title.substr(0, 4);
//sets the index value to i so it will work with our internal Array and XML
//sets an i to id so it can be called from our XML playlist Array
tiles[i].index = i;
tiles[i].id = i;
}
loadTrack(index);
playlistmenu.setScrollContent("menu");
}
Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?
-
Spidey wants his icon back!
nvm I fixed it.
my menu.attribute.x and y coordinates were pionting out in space lol...
Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?
-
Try changing tile to tiles:
tiles[i] = this["tile" +i];
to
tiles[i] = this["tiles" +i];
-
Spidey wants his icon back!
oh, tiles and tile are two different things
tiles is the new name for the button
tile is the new instance name for the button, they cannot be the same.
The script above makes a series of buttons called
tiles with instance names of tile
so if i had 4 buttons they would be
tiles1 with instance name of tile1
tiles2 with instance name of tile2
tiles3 with instance name of tile3
tiles4 with instance name of tile4
they can't be the same because I'm assigning the buttons to a scrollpane also.
Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?
-
FK's Giant
But the name of the duplicated movie clip is "tile" plus i. "tiles" is the array name.
-edit-
But I see you already answered....
The other day, I bought a box of animal crackers. On the side, it said "Do Not Eat if Seal is Broken". I opened the box and sure enough...
-
maybe try removing the quotes from tile...?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|