# Window component

**URL:** <https://forum.kirupa.com/t/window-component/166798>\
**Category:** Uncategorized\
**Created:** [October 22, 2005, 10:12pm UTC](https://forum.kirupa.com/t/window-component/166798 "2005-10-22T22:12:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![conceptioN](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@conceptioN](https://forum.kirupa.com/u/conceptioN)\
**Post date:** [October 22, 2005, 10:12pm UTC](https://forum.kirupa.com/t/window-component/166798/1 "2005-10-22T22:12:10Z")

</div>

Hi, I’m having some trouble using the window component examples provided w/ Flash 8. I’m using this example: (1) Place Window Component in Library. (2) Put this actionscript on Frame 1:

```auto
/**
Requires:
- Window component in library
*/

import mx.managers.PopUpManager;
import mx.containers.Window;

System.security.allowDomain("http://www.flash-mx.com");

var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true, {closeButton:true, contentPath:"http://www.flash-mx.com/images/image1.jpg"});
var winListener:Object = new Object();
winListener.click = function(evt_obj:Object) {
my_win.deletePopUp();
};
winListener.complete = function(evt_obj:Object) {
my_win.setSize(my_win.content._width, my_win.content._height + 25);
}
my_win.addEventListener("click", winListener);
my_win.addEventListener("complete", winListener);
stop();

```

–when I try to preview this movie it gives me this actionscript error:

```auto
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 11: Type mismatch.
var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true, {closeButton:true, contentPath:"http://www.flash-mx.com/images/image1.jpg"});

```

–Any ideas why I get this error? If not, please try this example yourself (only takes a minute) and tell me if it actually works.
