2 Replies Latest reply on Apr 25, 2006 6:07 AM by Newsgroup_User

    object.width and object._width

    Level 7
      Flash built in AS editor hilighted as keyword both
      object.width
      and
      object._width

      What is the difference between the two?


        • 1. Re: object.width and object._width
          Level 7
          aa,

          > Flash built in AS editor hilighted as keyword both
          > object.width
          > and
          > object._width
          >
          > What is the difference between the two?

          Look up the "Object class" entry of the ActionScript Language Reference.
          You'll see that the Object class has neither a width nor a _width
          property. But plenty of objects in ActionScript *do* have one of those.
          There's MovieClip._width, for example. I think what you're seeing -- and
          this is merely my guess -- is a result of the Actions panel knowing certain
          special words, and highlighting them whether one particular object contains
          such a property or not.

          Generally speaking, properties preceeded by an underscore are older.
          The underscores are still around for backwards compatability. In any case,
          width and _width would presumably both refer to something about an object's
          "width," whatever that might mean for a given object.


          David
          stiller (at) quip (dot) net
          Dev essays: http://www.quip.net/blog/
          "Luck is the residue of good design."