0 Replies Latest reply on Oct 1, 2007 6:34 PM by Whateverco

    sending a value

    Whateverco
      Hello,

      I appreciate your help...

      I created two classes;
      XmlUserName is parent class and JournalEntry class is child class.

      XmlUserName class is as follow:

      ------------------------------------------------------------------------------------------ ----------------------------------
      class XmlUserName extends MovieClip{

      public var myXML:XML;
      public var username:String;

      public function XmlUserName(){

      myXML = new XML();
      myXML.ignoreWhite = true;
      myXML.onLoad = processXML;
      myXML.load("loginName.xml"); // this is the file having the login username

      function processXML(success:Boolean):Void {
      if(success){
      var RootNode:XMLNode = this.childNodes[0].firstChild.nodeValue; username = String(RootNode);
      }
      }
      }
      }
      ------------------------------------------------------------------------------------------ ----------------------------------

      And JournalEntry class is as follow:
      ------------------------------------------------------------------------------------------ ----------------------------------
      class _journal.JournalEntry extends XmlUserName {
      private var depth:Number = 0;
      private var prev_page:MovieClip;
      private var next_page:MovieClip;
      private var components:Array;

      private var username:String;

      public function JournalEntry() {
      //previous page button
      prev_page = attachMovie("prev_page", "prev_page", depth++);
      prev_page._x = -325;
      prev_page._y = 250;

      //next page button
      next_page = attachMovie("next_page", "next_page", depth++);
      next_page._x = 325;
      next_page._y = 250;

      //array
      components = new Array();

      username = _parent.username;
      }
      }
      ------------------------------------------------------------------------------------------ ----------------------------------

      The problem is that the username in JournalEntry get "undefined" value...
      Please, let me know how to solve it.

      Thank you.