forked from: SiON example
the simplest example
/**
* Copyright logicalyze ( http://wonderfl.net/user/logicalyze )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/pYff
*/
// forked from mash's SiON example
// the simplest example
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import com.bit101.components.*;
import org.si.sion.*;
[SWF(width = "270", height = "60", backgroundColor = "#ffffff", frameRate = "30")]
public class TheABCSong extends Sprite {
public var driver:SiONDriver = new SiONDriver();
function TheABCSong() {
new PushButton(this, 10, 20, "play", mml_play);
new PushButton(this, 150, 20, "stop", mml_stop);
}
private function mml_play(e:MouseEvent):void
{
driver.play("t100 l8 [ccggaag4 ffeeddc4 | [ggffeed4]2 ]2");
}
private function mml_stop(e:MouseEvent):void
{
driver.stop();
}
}
}