vinco
07-14-2005, 05:59 AM
Hi there,
I have 2 questions in using the Window Component.
First I cannot set a default value to a TextInput that's included in the movieclip using contentPath. (See Code below)
Moreover, if I'm creating the Window component in AS, I cannot load it from another movieclip.
Otherwise, if I create the Window Component on the Stage, the Listener won't work to close the window.
Those are the things that drive me crazy tonight. If you could help me, I'd really appreciate it.
Thanks!
Vincent
import mx.managers.PopUpManager;
import mx.containers.Window;
var wRenamePage = PopUpManager.createPopUp(this, Window, false, {closeButton:true});
wRenamePage.title="Rename Page";
wRenamePage.contentPath = "mcForm";
var windowListener:Object = new Object();
windowListener.click = function(evt){
wRenamePage.deletePopUp();
}
windowListener.complete = function(evt){
evt.target.setSize(180,140);
evt.target.content.tPageName.text ="hello";
//evt.target.content.tPageName.text = "pagename";
}
wRenamePage.addEventListener("click", windowListener);
wRenamePage.addEventListener("complete", windowListener);
I have 2 questions in using the Window Component.
First I cannot set a default value to a TextInput that's included in the movieclip using contentPath. (See Code below)
Moreover, if I'm creating the Window component in AS, I cannot load it from another movieclip.
Otherwise, if I create the Window Component on the Stage, the Listener won't work to close the window.
Those are the things that drive me crazy tonight. If you could help me, I'd really appreciate it.
Thanks!
Vincent
import mx.managers.PopUpManager;
import mx.containers.Window;
var wRenamePage = PopUpManager.createPopUp(this, Window, false, {closeButton:true});
wRenamePage.title="Rename Page";
wRenamePage.contentPath = "mcForm";
var windowListener:Object = new Object();
windowListener.click = function(evt){
wRenamePage.deletePopUp();
}
windowListener.complete = function(evt){
evt.target.setSize(180,140);
evt.target.content.tPageName.text ="hello";
//evt.target.content.tPageName.text = "pagename";
}
wRenamePage.addEventListener("click", windowListener);
wRenamePage.addEventListener("complete", windowListener);