お正月っぽい曲
(数年前まで)この時期よく耳にしていた曲ですが、最近聞かなくなったので、それっぽいのを作ってみました。
/**
* Copyright flabaka ( http://wonderfl.net/user/flabaka )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/lArj
*/
package
{
import com.bit101.components.PushButton;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import org.si.sion.SiONData;
import org.si.sion.SiONDriver;
[SWF (width="465",height="465",backgroundColor="0xFFFFFF",frameRate="30")]
/**
* ...
* @author flabaka
*/
public class Main extends Sprite
{
private var driver:SiONDriver;
private var musicData:SiONData;
private var btn:PushButton;
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
btn = new PushButton();
btn.label = "CLICK!";
btn.x = (stage.stageWidth / 2) - (btn.width / 2);
btn.y = (stage.stageHeight / 2) - btn.height;
addChild(btn);
driver = new SiONDriver();
musicData = driver.compile("t100 @v32 l2 o6 g l4agedccddgf l2 er l2 g l4agedccdded l2cr");
btn.addEventListener(MouseEvent.CLICK, clickHandler);
}
private function clickHandler(e:MouseEvent):void
{
driver.play(musicData);
}
}
}