Why do components in Flash CS3 fail so hard when loaded with a Loader
The ComboBox shows up fine when I run a SWF by itself. The rowCount property set in the property inspector works just fine; the da开发者_开发问答taProvider property populates the box just fine; everything works fine.
HOWEVER, when I load that SWF into a parent SWF with the Loader class, everything goes to hell. The ComboBox shows up empty. All the settings in the component inspector are ignored. When I set the dataProvider manually, it's ignored.
Items will show up if I call addItem, so I can get items into the list... but that just makes it clear that rowCount is being ignored, because only 5 of th 8 items are visible (I have to scroll through the rest), even though rowCount is set to 8 or the length property of the comboxbox.
Buttons and basically all CS3 components are BROKE when loaded in an external SWF with the Loader class.
Does anyone know how to fix this?
Drag and drop combobox component in library of the parent fla. It will work, unfortunately memory size of parent.swf will increased.
精彩评论