用途別リファレンス

音符を降らせる

例)キラキラ星の音符の個数と待ち時間
currentTime(例)
a=[1/4,1/4,1/4,1/4,1/4,1/4,1/2,1/4,1/4,1/4,1/4,1/4,1/4,1/2,
1/4,1/4,1/4,1/4,1/4,1/4,1/2,1/4,1/4,1/4,1/4,1/4,1/4,1/2,
1/4,1/4,1/4,1/4,1/4,1/4,1/2,1/4,1/4,1/4,1/4,1/4,1/4];
currentTime(例)
h=0;
next=0;
while (true) {
t=$c.play().currentTime();
ct=$c.play().currentTime();
if(ct>-1){
   text=(floor(ct/100));
}
    if (t>next) {
        new Onpu;
        next+=a[h]*2000;
        h=h+1;
    }
    update();
}
Onpu(例)
zOrder=0;
scaleX=0.3;

start=$c.play().currentTime(); while(y<$screenHeight){ t=$c.play().currentTime(); y=(t-start)*($screenHeight*3/4)/2000; } die();

前へ 曲の演奏時間の取得 次へ ラインパネルの作成