4 ms·
He has released the source code of the interpreter: http://www.solve-et-coagula.com/?p=9 http://www.solve-et-coagula.com/?p=9.
by edu 19y ago
He has released the source code of the interpreter: http://www.solve-et-coagula.com/?p=9 http://www.solve-et-coagula.com/?p=9.
- Zak 19y agoThat's the first time I've looked at ActionScript code. Javascript has such an elegant object system - they should have kept it.
- spiralhead 19y agoCould be wrong but I think you can still use the prototype syntax if you want.
- ascw 19y agoI know that the prototype syntax is available in as2, but I think it was removed in as3. I agree that the prototype syntax is more elegant, but I really believe Adobe was trying to appeal to Java and .NET developers.
- spiralhead 19y ago"but I think it was removed in as3" Wrong. I was curious so i tested it (i've been experimenting with Flex 2). The following code outputs "blah blah": var foo:Function = function() {} foo.prototype.someMethod = function() { trace("blah blah"); } new foo().someMethod(); I think the prototype syntax was kept to maintain backwards compatibility.
- ascw 19y agoThats cool, does it work with creating classes that way as well?
- spiralhead 19y agoim assuming the above code is equivalent to: class foo { public function someMethod() { trace("blah blah"); } } new foo().someMethod(); just different approaches to the same problem
- deleted 19y ago[deleted]