PDA

View Full Version : help.. ComboBox dropdown appears behind mc


riyan
01-02-2006, 05:52 AM
help with component
i have a ComboBox and DateField component inside a movieclip whcih i will call from the library. on the layer underneath the components there is a shape.

//attach form
var myMC:MovieClip = this.createEmptyMovieClip("holderForm, this.getNextHighestDepth());

holderForm.attachMovie("form", "newForm", holderForm.getNextHighestDepth());

my problem is that when i click on the ComboBox the dropdown is beneath the shape it also does that for the DateField.

but if i put the movieclip containing the components by dragging it onto the stage there are no problems.

how do i get around this??

this is the file in using. it's flash 8.
http://www.dijitaq.com/stuff/componentProblem.fla

anselon
01-17-2006, 10:42 PM
I'm having the same problem. I've been researching it, but am having little success. I have discovered a few specifics that might lead us in the right direction.

I find that if I have the movie clip that containd the compbo box on the timeline (and give it instancename) that my dynamically loaded dropdown works.

If I instead create the movie the dropdowns show up behind all other components.

I looked for a depth property to try to tweak but couldnt find one.

anselon
01-17-2006, 10:52 PM
ok, I remembered having this problem before...

I went back and looked at some preious flas I'd made.

Here's the trick.. dont use "getNextHighestDepth()"

if you specify the depth explicitly (or even use a variable or calculation) it will work fine.

Example of Broken attach:
this.attachMovie("disc_settings", "disc_settinx", this.getNextHighestDepth(), {_x:746, _y:397});

Example of Working attach:
myDepth = 200; // really use some increment
this.attachMovie("disc_settings", "disc_settinx", 1000+myDepth, {_x:746, _y:397});

good luck!