Created
September 7, 2012 15:56
-
-
Save preslavrachev/3667382 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestClass implements Dynamic { // this is the crucial part | |
var a:String; | |
public function new() { | |
this.p = "test1"; | |
} | |
} | |
.... | |
var testObj = new TestClass(); | |
trace(testObj.a); // => "test" | |
testObj.b = "test2" // absolutely fine | |
testObj.c = function() { // absolutely fine again | |
return "test3"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment