Code for a Window Component to open, title, populate and close

Could you help me with the code for the Window Component in Flash MX2004? I've read the Macromedia Component Manual (pgs 879-889), and gotten a new window component to open and place the close button on the window. I've also gotten a window to close, but I haven't been able to successfully combine both sets of code. Could you help me with the code to open, title, populate, and close a Window Component? thanks.
ccllwwAsked:
Who is Participating?
 
negatyveConnect With a Mentor Commented:
var initObject = new Object();
initObject.title = "window title";
initObject.closeButton = true;
initObject.contentPath = "symbolLinkage";
var popup = mx.managers.PopUpManager.createPopUp(this, mx.containers.Window, false, initObject);
var listener = new Object();
listener.click = function(evt)
{
      evt.target.deletePopUp();
};
popup.addEventListener("click", listener);
0
 
ccllwwAuthor Commented:
Thank you for your response. I'm new at this. Could you help me understand exactly where I paste the code? Is there anything else I need to do to make it work?
0
 
negatyveCommented:
- open a new movie
- drag a Window instance to the stage from the component panel, then delete it (but know you have it in the library)
- create a moviecli in the library, then give it the linkage "symbolLinkage" (right click on the symbol in the library, linkage, Export for actioscript)
- paste that code in the first frame of your movie, and test it
0
 
ccllwwAuthor Commented:
thank you. I'll give it a try later this evening.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.