PDA

View Full Version : Blank Combobox


Sunny13
01-15-2008, 04:26 AM
Can someone let me know the solution to this?
I have a combobox in a movieclip attached dynamically. It works well for the first time but when attached in the same movieclip once again... it does not show the selected item of the combobox.... here is simple code for the same

var objMain = this;
objMain.a_mc.attachMovie("notesNewNotesControls_mc","notesNewNotesControls_mc",1);
b_mc.onRelease = function() {
objMain.a_mc.attachMovie("notesNewNotesControls_mc","notesNewNotesControls_mc",2);
};

I have tried removeMovieClip as well but it does not work. If I use onEnterFrame to ensure that the movieclip has been removed or not .. it works but for some scenarios and also makes execution slow. Any suggestions?

tarjinder80
01-15-2008, 04:30 AM
Hi,

try this code.

var objMain = this;
var myMovie = objMain.a_mc.createEmptyMovieClip("main1", 1);
myMovie.attachMovie("notesNewNotesControls_mc", "notesNewNotesControls_mc", 1);
press_mc.onRelease = function() {
objMain.a_mc.main1.removeMovieClip();
var myMovie = objMain.a_mc.createEmptyMovieClip("main2", 1);
myMovie.attachMovie("notesNewNotesControls_mc", "notesNewNotesControls_mc", 1);
};

ThienHaFlash
01-15-2008, 05:20 AM
var objMain = this;
objMain.a_mc.attachMovie("notesNewNotesControls_mc", "new1", 1);
objMain.a_mc.attachMovie("notesNewNotesControls_mc", "new2", 2);


if you make two MC with the same name, the later with replace the first, of course? You need diffrent names for different instances (like different depths for them)