PDA

View Full Version : problem with dynamic text fields



IkimashoZ
April 16th, 2008, 01:58 PM
Okay, basically, I want to make a drop down menu. I want to build the menu up over the top of the screen at the beginning, and then run it down out of its header when the user clicks a certain button.

And so...
I have a layer with an object called "itemsPanel". And on that layer there's a mask. I made a movieclip called "itemsPanelItem" and saved it into the library. Then I linked it to AS3. Then, I used the following code:


for(var x=0; x<char_items.length; x++) {

add_y -= 17;
var itemListItem:itemsPanelItem = new itemsPanelItem();
itemListItem.y = add_y;
itemListItem.button_on.visible = false;
itemListItem.item_name.text = char_items[x];
itemListItem.num_of_item.text = char_item_nums[x];
items_panel.addChild(itemListItem);

}item_name and num_of_item are dynamic text fields on the itemsPanelItem. When I run the flash, the text fields are empty. I tried setting them to something other than the variable, like "test" or something like that, but as long as the text field is dynamic, it's invisible.

Any help would be appreciated.

LordMoyne
April 16th, 2008, 02:08 PM
Okay, basically, I want to make a drop down menu. I want to build the menu up over the top of the screen at the beginning, and then run it down out of its header when the user clicks a certain button.

And so...
I have a layer with an object called "itemsPanel". And on that layer there's a mask. I made a movieclip called "itemsPanelItem" and saved it into the library. Then I linked it to AS3. Then, I used the following code:


for(var x=0; x<char_items.length; x++) {

add_y -= 17;
var itemListItem:itemsPanelItem = new itemsPanelItem();
itemListItem.y = add_y;
itemListItem.button_on.visible = false;
itemListItem.item_name.text = char_items[x];
itemListItem.num_of_item.text = char_item_nums[x];
items_panel.addChild(itemListItem);

}item_name and num_of_item are dynamic text fields on the itemsPanelItem. When I run the flash, the text fields are empty. I tried setting them to something other than the variable, like "test" or something like that, but as long as the text field is dynamic, it's invisible.

Any help would be appreciated.


Are you embedding fonts properly?

IkimashoZ
April 16th, 2008, 02:31 PM
Are you embedding fonts properly?

I don't know what embedding fonts is or how to do that.

LordMoyne
April 16th, 2008, 02:42 PM
I don't know what embedding fonts is or how to do that.

I assume your text field is in the library, and that it's set to dynamic text with an ID specified. Click the text field, click the embed button in its properties, and select "basic latin." Done.

IkimashoZ
April 16th, 2008, 08:18 PM
I assume your text field is in the library, and that it's set to dynamic text with an ID specified. Click the text field, click the embed button in its properties, and select "basic latin." Done.

Fonts embedded. Result is the same as before. No text.

IkimashoZ
April 17th, 2008, 01:26 PM
Uh... help, please??