Created
November 27, 2011 03:54
-
-
Save aaronfay/1396929 to your computer and use it in GitHub Desktop.
Object construction in Actionscript
This file contains 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
package { | |
class Widget{ | |
function Widget():void{ | |
// note that the constructor in Actionscript has the | |
// same name as the Class | |
// this gets called when instantiated | |
} | |
} | |
} | |
// in your code | |
var widget = new Widget(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment