title: Get/set functions on static properties
body: <p>I've been learning about encapsulation in AS3 and using get/set functions to make variables that are (or appear to be) read only. I can get it to work with instance variables, but not static variables. I found <a href="http://help.adobe.com/en_US/as3/learn/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f36.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f33__WS5b3ccc516d4fbf351e63e3d118a9b90204-7f2c" rel="nofollow">this</a>, which seems to indicate that it's possible to use get/set functions on static properties, but the compiler keeps telling me I have duplicate function declarations. This is essentially what I'm using:</p>
  
  <pre><code>package {
      public class Foo {
          protected static var bar:int = 0;
  
          public static function get bar():int {return bar;}
      }
  }
  </code></pre>