つまった(10月18日)
動かないですね。
Titanium.UI.setBackgroundColor('#000'); // create tab group var tabGroup = Titanium.UI.createTabGroup(); // // create base UI tab and root window // var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var animationFrames = [ 'wan.jpg', 'color.jpg' ] var animationView = Titanium.UI.createImageView({ height:200, width:200, top: 30, images:animationFrames, //ミリ秒単位で次のフレームまでの間隔を指定します duration: 100, //繰り返し回数を指定します(0の場合は無限にくりかえします) repeatCount: 0 }); //アニメーション開始時のイベント animationView.addEventListener('start',function(e){ }); //アニメーション終了時のイベント animationView.addEventListener('stop',function(e){ }); //フレーム変更時のイベント animationView.addEventListener('change',function(e){ //e.indexにフレームのindexが返ります }); var button1 = Ti.UI.createButton({ title:'button', width:'70%' }); //動かない箇所 button1.addEventListener('click',function(e){ animationView.start(); animationView.pause(); animationView.stop(); }); win1.add(button1); var tab1 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'tab1', window:win1 }); tabGroup.addTab(tab1); tabGroup.open();
画像を動かしたかったのだけど、難しい。。 うーん。
しかし、眠いので今日の所はここまでですね。
パーフェクトJavaScript (PERFECT SERIES 4)
- 作者: 井上誠一郎,土江拓郎,浜辺将太
- 出版社/メーカー: 技術評論社
- 発売日: 2011/09/23
- メディア: 大型本
- 購入: 22人 クリック: 538回
- この商品を含むブログ (12件) を見る