AdWonder :: Powered by EyeWonder


AdWonder Blog

Built-in Flash Components (like a ComboBox) - Parent and Child SWFs

There are countless articles written about this, but for some reason none of the ones I saw made mention of the solution I needed, so I thought I’d just send out this tidbit to everyone so that it is floating around somewhere in our searchable world.

So let’s say you have created a flash file that has a form in it, and then customized it, etc. It’s pretty, customized, the right size, and most importantly *working*. Then, you decide to load said-file into a parent swf. FLASHING RED FLAG - the comboBox doesn’t work anymore. Perhaps it’s unselectable, maybe it shows but the default value doesn’t show, or maybe there is some other weird thing. Check for the following:

1. The comboBox needs to live in the Library of the _root swf. You can accomplish this by copying and pasting the component into the first frame of the _root swf and then deleting it. Or, just copy it into the library directly.

2. Some forums suggested making sure the movieclip that is storing said component should persist throughout the timeline. While I don’t think that was the problem I ran across, it’s worth mentioning.

3. Lastly, and MOST important. The movieclip containing the comboBox cannot be masked. Don’t even think about masking the movieclip which loads in the movieclip which contains the comboBox. It won’t work if there is masking on the comboBox at any level.

So… hopefully this helps somebody. I know it would have helped me if somebody else had written it all out somewhere. Best of luck! And, creatively speaking, I would suggest just making your form contain input text instead and call the whole thing a day. Deal with authentication in actionscript or server-side and forget the whole thing :)

Leave a Reply

You must be logged in to post a comment.


©2007 EyeWonder, Inc. Unleash the Wonder.