Created
November 25, 2010 07:17
-
-
Save jhaynie/715025 to your computer and use it in GitHub Desktop.
Prototype of writing a Titanium application using ActionScript 3 natively (instead of JS).
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
package { | |
import Titanium.API; | |
import Titanium.UI; | |
/** | |
* Simple Titanium application written in ActionScript 3 | |
*/ | |
public class App | |
{ | |
public static function main() : void | |
{ | |
Titanium.API.info("hello"); | |
var win : Window = Titanium.UI.createWindow({ | |
backgroundColor:"red" | |
}); | |
var button : Button = Titanium.UI.createButton({ | |
width:100, | |
height:40, | |
title:"Click me" | |
}); | |
win.add(button); | |
win.open(); | |
button.addEventListener("click",function(e){ | |
button.setTitle("Yah!"); | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment