Flash's ComboBox Component
The ComboBox component in Flash does not behave as expected if used in a movieclip loaded by loadMovie or attachMovie. What happens is that the ComboBox won't open, as if it doesn't react to events. The problem has been discussed, and I managed to find the following suggestions:- Drag an instance of the component onto the stage of the movieclip that's loading the movieclip containing the ComboBox. It can then be deleted, the point is that the loading movieclip has the component in its library. This appeared to solve the problem for a lot of people.
- Use loadMovieNum instead of loadMovie
- Attach the ComboBox with ActionScript instead of placing it in a movieclip
- Randomly rename the combo, movieclip, file etc until it mysteriously starts to work (worked for one guy, though may not be the most robust solution)
From what I understand though, this is a bug in the ComboBox/loadMovie-features, and it puzzles me that Macromedia didn't fix it in the newly released Flash 8. From the newsgroups it seems that the problem has been around for a while, and in the cases that it doesn't work placing the Combo in the library of the main clip, there seems to be no workarounds. I don't know what I would have done if I hadn't been able to place it on a frame on the main timeline.
29 Comments:
Have you tried swapDepts()?
It changes the stacking order of swf's and MovieClips
with combobox inside a movieclip call :
myComboMovieclip.swapDepths(myMovieClip)
If your referencing a movieclip on a different level, just add level to the path. feks
swap the depth of a movielip inside a loaded movie with a movieclip on the main timeline like this:
myMovieClip.swapDepths(_level0.anotherMovieClip)
if your swapping on the same level you can use a number as an argument.
myMoviClip.swapDepths(666)
I actually don't remember if I tried swapDepths, but it probably would have worked if I had placed the combo in a movieclip of its own.
Thanks for the tip! :-)
Just an FYI - if you use this._lockroot = true; in the movieclip you are loading,the combobox works fine. Or alternatively, if you are usinf a loader component you could use my_ldr.content._lockroot = true; where my_ldr is the name you've given to your loader component.
Lockroot worked like a charm. thanks!
Thank you so much for this post, lock root sorted out my problem!
the lockroot does the trick. huh. thanks a lot for that, it was really bugging me.
This is a common issue when you have a parent .swf that loads children .swf files that contain one of the following components Alert, ComboBox, DateField, Menu, MenuBar, or Window.
In cases where this scenario occurs, I have found that it is best to declare a global variable, such as _global.TrueRoot, in the parent .swf that refers to the root. For example if I have a parent that loads in children that have _lockroot = true I might declare _global.TrueRoot = _root in the first frame of the parent and then use _global.TrueRoot in the children when they need to interact with the _root (parent) movieclip.
Thank you! very helpful
I attached this code to the MC into which the comboBox is loaded:
onClipEvent (load) {
this._lockroot = true;
}
works for me.
this._lockroot = true; works perfectly
I spent 3 hours to find solution for similar problem.
lockroot is fine.
Thanks!
I spent 3 hours to find solution for similar problem.
lockroot is fine.
Thanks!
Hi folks, my name is Herbert I'm from Nicaragua (22 years old), I once had that same problem with the combobox component, but I discovered a way to fix it.
Here's the link to the solution (at the botton of the webpage, you can also get the this webpage from Flash Help pane):
http://livedocs.adobe.com/flash/9.0/main/00002626.html
If it help anyone, please send me a comment to: herbertrobb@yahoo.com
Greetings. :)
In my flash file I used a lot of actionscript for multilingual stuff and the regular lockroot stuff didn't work as expected. My solution was to add the following code directly to the ComboBox
onClipEvent (load) {this._lockroot = true;}
Your're the best! lockroot works very good for me!!! thankx!!!!
Thank you for the _lockroot tip.
Muah!!!!
this._lockroot = true;
Muah!!!
Saved me a headache!!!
I'd like to add my thank you. I spent more than three hours trying to find what the problem was with a popup form that had a combobox. My textboxes worked fine but comboboxes did nothing.
I added
this._lockroot = true;
to the first frame of my Movieclip and voila! It all worked.
thank you for your posts. lockroot work fine
lockroot solves some problem of combobox. I can't select item when i use scrollbar.
i solved problem :)
i put combobox component to out of scene where i use loadmovie.
After 3h working in this problem I finally found this post. LOCKROOT just solved the problem. Thank you!!!!!!!
Laila, Thank you very, very much!!!
I was going crazy with that!!!
Put a instance in the main movie solve the trouble...
Now my hair it´s safe...
Hugs from Brazil!!!
"At 3:47 PM, Anonymous said...
Just an FYI - if you use this._lockroot = true; in the movieclip you are loading,the combobox works fine. Or alternatively, if you are usinf a loader component you could use my_ldr.content._lockroot = true; where my_ldr is the name you've given to your loader component."
THIS SOLVED THE ISSUE. Thanks a lot!
lockroot on combobox worked great for me. Dumb Flash
Thank you ,works like a charm ,
just use [instance name you will put the content].lockroot=true;
Forget all that. I suggest you use a a VPN service with an (Anonymous Proxy)
Great! This post always saves my life
THANKS!
Solved my problem.... thanks a lot!
Indeed. Using the Loadername._lockroot = true works. I put it on frame one of the main movie where I load in the external movie. The combobox works now.
Post a Comment
<< Home