# Pop up window attach xml

**URL:** <https://forum.kirupa.com/t/pop-up-window-attach-xml/325906>\
**Category:** Uncategorized\
**Created:** [November 11, 2011, 2:39am UTC](https://forum.kirupa.com/t/pop-up-window-attach-xml/325906 "2011-11-11T02:39:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trnghosh](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@trnghosh](https://forum.kirupa.com/u/trnghosh)\
**Post date:** [November 11, 2011, 2:39am UTC](https://forum.kirupa.com/t/pop-up-window-attach-xml/325906/1 "2011-11-11T02:39:09Z")

</div>

Here is a code to create one pop up when clicked a button and close it when required. I found it in “[www.actionscript.org](http://www.actionscript.org)” but I like to attach this one to xml to fetch “title” and “message” from the xml. I tried but could not succeed, please advice how I wrote the xml and AS as well to create it. Here is the code

```auto

function createPopUp(title, message) { var title="My name "; var message ="My Own Message "; pop_up_menu = _root.attachMovie("pop-up-menu", title, 100000, {_x:Stage.width/2, _y:Stage.height/2}); // for placing in a certain place on the stage usethis one {_x:100, _y:100}); pop_up_menu.title_text.text = title; pop_up_menu.message_text.text = message; pop_up_menu.close_button.onRelease = function() { this._parent.removeMovieClip(); }; }

```
