# Accessing Methods in Loaded Document Class

**URL:** <https://forum.kirupa.com/t/accessing-methods-in-loaded-document-class/281507>\
**Category:** flash\
**Created:** [February 10, 2009, 2:36am UTC](https://forum.kirupa.com/t/accessing-methods-in-loaded-document-class/281507 "2009-02-10T02:36:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boyceofreason](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@boyceofreason](https://forum.kirupa.com/u/boyceofreason)\
**Post date:** [February 10, 2009, 2:36am UTC](https://forum.kirupa.com/t/accessing-methods-in-loaded-document-class/281507/1 "2009-02-10T02:36:29Z")

</div>

I’m trying to access an init method I’ve set in one of my document level classes.

Container Movie loads Main Movie, which has Main.as as its document class, but I want to do a few things before I show the actual content. Here are some functions in Container.as:

```auto

public function moveLogo(e:TimerEvent):void{
            
            loadTxt.visible = false;
            var logoMoveUp:Tween = new Tween(logoCont, "y", Back.easeIn, 221, -250, 1, true);
            logoMoveUp.addEventListener(TweenEvent.MOTION_FINISH, initMain);
                        
        }
        
        public function initMain(e:TweenEvent){
            addChild(loader.content);
            **trace(loader.content); //returns [object Main]
              trace(loader.content.init); //returns: 1119: Access of possibly undefined property init through a reference with static type flash.display:DisplayObject.**
        }

```

If I trace e.currentTarget.content.init on my EVENT.COMPLETE callback function, I get “function Function()” like I should.
