6 Replies Latest reply on Dec 26, 2007 3:09 AM by yachts99-2vTvY1

    Initialize a member of custom  class

    strongfrakk
      Hi All,

      I want to initialize the oOwnMovie of CMedia class by this below

      ....................... code example below
      class CMedia extends MovieClip{
      public var oOwnMovie:MovieClip;


      public function LoadMe()
      {
      trace(this.oOwnMovie instanceof MovieClip); // output:false
      this.oOwnMovie = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
      trace(trace(this.oOwnMovie instanceof MovieClip)); // output:false again
      .....................................

      The type checking throws a "false" me.
      How can I initialize a class member object in a class function ?

      Thanks in advance!
      Csaba