I responded to your direct e-mail with a more detailed explanation, but for the benefit of the list:
The way to fix this is to either do: this._lockroot = true; at the top of the AS code in the SWF that contains the combo boxes, or do: loadedMovie._lockroot = true; in the loader movie, where loadedMovie is the movie clip that the movie was loaded into. -Andy On 6/21/07, Lord, Susan Ms. (CONTR) <[EMAIL PROTECTED]> wrote:
Hi there, I am having a unique problem using the combo box component. When I run the file on its own, it works great, but when I load the swf into my main file it stops working. Now to eliminate possibilities for other errors I created 2 files to test this and removed all other programming and am still having the same error. Would you mind taking a look and seeing if you can see my error? ** Sorry for the double post newbies.** In the test file, I drug 4 combo box components to the stage and gave them the instance of combo1, combo2, combo3 and combo4. Here is the code in the test file: //******************** Combo Boxes **********************\\ function change(evt) { trace(evt.target.selectedItem.label); trace(evt.target); for (var i = 1; i<=numComboBoxes; i++) { thisComboBox = this["combo"+i]; trace('combo'+i+" "+thisComboBox.value); } } numComboBoxes = 4; for (var i = 1; i<=numComboBoxes; i++) { var thisComboBox = this["combo"+i]; dataNum=0; thisComboBox.addItem({data:dataNum++, label:""}); thisComboBox.addItem({data:dataNum++, label:"aa"}); thisComboBox.addItem({data:dataNum++, label:"bb"}); thisComboBox.addItem({data:dataNum++, label:"cc"}); thisComboBox.addItem({data:dataNum++, label:"dd"}); thisComboBox.addItem({data:dataNum++, label:"ee"}); thisComboBox.addItem({data:dataNum++, label:"ff"}); thisComboBox.addItem({data:dataNum++, label:"gg"}); thisComboBox.addItem({data:dataNum++, label:"hh"}); thisComboBox.addItem({data:dataNum++, label:"ii"}); thisComboBox.addItem({data:dataNum++, label:"jj"}); thisComboBox.addItem({data:dataNum++, label:"kk"}); thisComboBox.addItem({data:dataNum++, label:"ll"}); thisComboBox.addItem({data:dataNum++, label:"mm"}); thisComboBox.addEventListener("change", this); thisComboBox.selectedIndex = 0; } _______________________________________ Then in a second file I created a loader. Here is the code: stop(); var myLoadedClip_mc:MovieClip =this.createEmptyMovieClip("myLoadedClip_mc", this.getNextHighestDepth) function load(filename:String, target_mc:MovieClip):Void { _loadListener = new Object(); _loadListener.onLoadInit = Delegate.create(this, loadComplete) _fileLoader = new MovieClipLoader(); _fileLoader.addListener(_loadListener); _fileLoader.loadClip(filename, target_mc); } function loadComplete():Void { trace("the clip is now loaded and on timeline as:"+myLoadedClip_mc) } movie = "testCombo.swf" load(movie, myLoadedClip_mc) _______________________________________ I am having the same issue. It works by itself, but not in the loader. Any ideas? I am stumped! Thanks! Susan _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com