SiON Practice2
SiONの練習です その2
♥0 |
Line 44 |
Modified 2011-11-27 10:49:46 |
MIT License
archived:2017-03-20 04:14:47
ActionScript3 source code
/**
* Copyright nika ( http://wonderfl.net/user/nika )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/5327
*/
package {
import flash.display.Sprite;
import org.si.sion.*;
import flash.text.*;
import flash.events.*;
public class Main extends Sprite {
public var driver:SiONDriver = new SiONDriver();
private var textField:TextField;
private var button:TextField;
function Main() {
textField = new TextField();
textField.x = 0;
textField.y = 0;
textField.width=300;
textField.height=100;
textField.border=true;
textField.borderColor=0xDDDDDD;
textField.background=true;
textField.backgroundColor=0xEEEEEE;
textField.text = "edit here";
textField.type = TextFieldType.INPUT;
textField.multiline=true;
textField.wordWrap=true;
addChild(textField);
button = new TextField();
button.x = 0;
button.y = 120;
button.width=100;
button.height=30;
button.border=true;
button.borderColor=0x111111;
button.background=true;
button.backgroundColor=0x333333;
button.textColor=0xEEEEEE;
button.text = "Play";
button.type = TextFieldType.DYNAMIC;
button.addEventListener(MouseEvent.CLICK, play);
addChild(button);
}
private function play(s:String):void{
driver.play(textField.text);
}
}
}