# Window content management (using Window component)

**URL:** <https://forum.kirupa.com/t/window-content-management-using-window-component/41841>\
**Category:** flash\
**Created:** [February 2, 2004, 3:22pm UTC](https://forum.kirupa.com/t/window-content-management-using-window-component/41841 "2004-02-02T15:22:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalvi](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dalvi](https://forum.kirupa.com/u/dalvi)\
**Post date:** [February 2, 2004, 3:22pm UTC](https://forum.kirupa.com/t/window-content-management-using-window-component/41841/1 "2004-02-02T15:22:28Z")

</div>

Hello,

I usually preffer clean code, so this is my problem:

I’m writing the following code in the .fla file:  
var main:SmthMain = new SmthMain();

And the rest of the code is in .as files only.

**I can’t seem to find a way to control the content of a window (mx 2004 component). That is asigning handlers on buttons, retrieving values from textinputs and so on.**

onLoad and onComplete does not have the content fully loaded.  
only onEnterFrame seems to work but this is bad coding.

I could use a sample code. Maybe from someone that really has it with AS2.0 and MX 2004 components.
