creando una clase


/ Published in: ActionScript
Save to your folder(s)

creando una clase


Copy this code and paste it in your HTML
  1. function NewClass() {
  2. }
  3. NewClass.prototype.someProperty = "someValue";
  4. NewClass.prototype.someMethod = function() {
  5. trace("someMethod called");
  6. };
  7. var nc = new NewClass();
  8.  
  9. //And you can then utilize the properties and //methods of that instance:
  10.  
  11. trace(nc.someProperty);
  12. nc.someMethod();

URL: http://www.oreillynet.com/pub/a/javascript/2003/08/19/actionscriptckbk.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.