3 Replies Latest reply on May 4, 2009 9:08 PM by kglad

    Object variables (arrays), persisting to a new keyframe?

    McFrisco Level 1

      After unexplainable problems with external class files, I'm trying another way of doing what I need to do:  an Object variable declared in the fla file.

      Well, this has its own set of problems.

      The big picture is:  I need to get user data and populate fields in their profile when they sign on.  Then save changes to their profile during the session, add new users and make changes to their profiles.  Pretty normal stuff.

       

      Here's the problem I'm having with the object.

       

      Frame 1  Script:

       

      /* Define the object to use as an associative array.*/


      var Person:Object = new Object();
      // Define a series of properties.
      Person.HomName = "Joe";
      Person.HomEmail = "joe@gmail.com";

       

       

      Then go to a new keyframe, where I have my fields that need to be populated

       

      Script:

       

      EnterName.text = Person.HomName;
      EnterEmail.text = Person.HomEmail;
      stop();

       

       

      When I compile, I get this error twice (once for each field) "The property being referenced does not have the static attribute."

       

      What does the mean and how do I fix it?

       

      Here is a link to the source file if you care to look.

       

      [URL]http://www.mediafire.com/?jjdjumlv4jj[/URL]

       

       

      The only way I've been able to get variable data from one script to another is through a _global.variable.  Is this the only way?  No arrays or objects vars?

       

      Thanks in advance for all who assist.  Some day soon I hope to be able to return the favor!