# Combo box text disappears when loaded into main.swf

**URL:** <https://forum.kirupa.com/t/combo-box-text-disappears-when-loaded-into-main-swf/33666>\
**Category:** Uncategorized\
**Created:** [October 22, 2003, 5:52am UTC](https://forum.kirupa.com/t/combo-box-text-disappears-when-loaded-into-main-swf/33666 "2003-10-22T05:52:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xmiinc](https://avatars.discourse-cdn.com/v4/letter/x/94ad74/32.png) [@xmiinc](https://forum.kirupa.com/u/xmiinc)\
**Post date:** [October 22, 2003, 5:52am UTC](https://forum.kirupa.com/t/combo-box-text-disappears-when-loaded-into-main-swf/33666/1 "2003-10-22T05:52:36Z")

</div>

Is there any known issue with combo boxes that are dynamically created and styled, where they work and style fine when testing in the authoring environment, but just display what appears to be a blank background with no menu text when its an swf loaded into a main movie?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 24, 2003, 3:41pm UTC](https://forum.kirupa.com/t/combo-box-text-disappears-when-loaded-into-main-swf/33666/2 "2003-10-24T15:41:41Z")

</div>

You’re probably having a global targeting problem. What’s the code you’re using to create the combo boxes?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 24, 2003, 4:04pm UTC](https://forum.kirupa.com/t/combo-box-text-disappears-when-loaded-into-main-swf/33666/3 "2003-10-24T16:04:50Z")

</div>

here’s how its created:[AS]this.attachMovie(“FComboBoxSymbol”,“sortBy\_cb”,15,{\_x:203,_y:40});  
// populate cbox  
arrSort=new\_Array(“Name”,“Length”,“Commercials”);  
sortBy\_cb.setDataProvider(arrSort);  
// style cbox  
componentStyle_=\_new\_FStyleFormat({textColor:0x666666,textFont:“Helvetica”,textSize:10,face:0x666600,shadow:0x006600,background:0x99cc66,highlight:0x996600,highlight3D:0x99cc00,darkshadow:0x000000});  
componentStyle.applyChanges();

function\_addComponentStyle()\_{  
componentStyle.addListener(sortBy\_cb)  
}  
// initialize cbox style  
this.onEnterFrame=function(){  
addComponentStyle();// combo-box’s  
delete\_onEnterFrame;

}  
[/AS] There are 2 other combo boxes included in the actual listener code (edited out) that are contained in a MC and accessed via standard dot notation, but all exhibit the same problem behavior. Any thoughts on ‘global targeting’ or any other shortcomings in my code are _much_ appreciated!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 26, 2003, 8:33pm UTC](https://forum.kirupa.com/t/combo-box-text-disappears-when-loaded-into-main-swf/33666/4 "2003-10-26T20:33:03Z")

</div>

this is DEFINITELY going in the Gotcha! file…

[http://www.flashkit.com/board/showthread.php?postid=2646325#post2646325](http://www.flashkit.com/board/showthread.php?postid=2646325#post2646325)
