# Member variable access:flash 8

**URL:** <https://forum.kirupa.com/t/member-variable-access-flash-8/247623>\
**Category:** Uncategorized\
**Created:** [December 27, 2007, 11:21am UTC](https://forum.kirupa.com/t/member-variable-access-flash-8/247623 "2007-12-27T11:21:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cscsaba](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@cscsaba](https://forum.kirupa.com/u/cscsaba)\
**Post date:** [December 27, 2007, 11:21am UTC](https://forum.kirupa.com/t/member-variable-access-flash-8/247623/1 "2007-12-27T11:21:31Z")

</div>

Hi All,

I have problem with subject.  
I got “undefined” message by trace() in 2 cases as well.  
I don’t understand due to “this.createEmptyMovieClip” gives the newly created empty movieclip as well.

As the code shown below.

class CMedia extends MovieClip{  
public var oOwnMovie:MovieClip;

```
public function CMedia()
{
}

public function LoadMe()
{
     trace(this.oOwnMovie) // 1. case : output:undefined
     this.oOwnMovie=this.createEmptyMovieClip("mc", this.getNextHighestDepth());
     trace(this.oOwnMovie) // 2. case :output:undefined        
              
     return 1;   
}

```

}

Very annoying when i can not initialize a public member variable in this simple case.  
public var oOwnMovie:MovieClip = new MovieClip; throws error

and I could not initialize it by “createEmptyMovieClip”

Does anyone have example on how can i load external movies by classes ?

Thanks in advance!

Csaba
