/ Published in: ActionScript
creando una clase
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function NewClass() { } NewClass.prototype.someProperty = "someValue"; NewClass.prototype.someMethod = function() { trace("someMethod called"); }; var nc = new NewClass(); //And you can then utilize the properties and //methods of that instance: trace(nc.someProperty); nc.someMethod();
URL: http://www.oreillynet.com/pub/a/javascript/2003/08/19/actionscriptckbk.html