PDA

View Full Version : comboBox Problem


smokejava
01-02-2007, 02:40 AM
I have a set of comboboxes that are in a MC that is pulled in by Linkage. For some reason the lists of the comboboxes are going behind all the rest of the test.

What is don't understand is that this only happens when the MC is pulled in through attachMovie. If the MC is put directly on the stage everything works fine.

am_i_troubleshooter
01-03-2007, 02:08 AM
Depth issue, I believe so. Check to ensure its depth assigned during the attachMovie of the combobox component is higher than those movieclips behind it.

smokejava
01-03-2007, 03:14 AM
I've done that and even forced a ridiculous depth to make sure and still the same issue. Swapped depths with the other components and trace the depths to make sure it's on top and still the same error

am_i_troubleshooter
01-03-2007, 03:39 AM
Attach your fla, let me see.

smokejava
01-03-2007, 04:17 AM
Here you go.

am_i_troubleshooter
01-03-2007, 04:48 AM
Your didn't attach the combobox component, you only attach the movieclip that already has the combobox components on the stage of that movieclip. This won't work (considered as component bug) if you attach a movieclip with combobox components assigned at authoring time. You need to also use the "attachMovie" or createClassObject to create the combobox components (one by one) at runtime.

Follow this similar thread for the solution I provided. You can either use "attachMovie" or "createClassObject" (for this, you may refer to the manual).

http://www.actionscript.org/forums/showthread.php3?t=123911

am_i_troubleshooter
01-03-2007, 05:07 AM
Wait a minute. Your case is very different. The above solution I gave will not work for your case. Let me test out myself and I'll get back to you.

Before that, need to ask you why you require two frames for the instance "mc_newsecret"?

smokejava
01-03-2007, 05:12 AM
It was originally one .... thought maybe it was a initializing issue.

am_i_troubleshooter
01-03-2007, 05:41 AM
Ok, what a component thing.

To fix this, you need to assign your own depth for the "test" movieclip that you use CreateEmptyMovieClip to create at the main timeline. The problem lies with the "this.getNextHighestDepth()" which when you try to trace will give you "1048576" and most probably the UI component cannot handle such a high depth (maybe there is a manual that specify the range).

Change to below (main timeline and the rest remain unchanged) :

//this.createEmptyMovieClip("test", _root.getNextHighestDepth())
//trace("me --->"+this.test.getDepth());
this.createEmptyMovieClip("test", 1);
this.test.attachMovie("new_secret", "secret_test_mc", 1);


You may test out yourself.

smokejava
01-03-2007, 05:51 AM
That did it. Thanks for the help.