- OpenLaszlo紹介
- プログラム構造関連
- スクリプト
- Javascript基礎
- 基礎知識
- ビュー<view>
- レイアウト
- 動かす
- 入力デバイス
- 文字
- 数値
- 日付
- オブジェクト指向
- 標準コンポーネント
- データの扱い
- データ操作(基礎)
- 応用編
–
swfファイルと同じディレクトリに、下記の名前でJPEG画像を保存します。
画像ファイルの大きさは何であれ、300×200に強制的に拡大縮小されます。
bg01.jpg bg02.jpg bg03.jpg bg04.jpg bg05.jpg
この5個のファイル名は固定です。
違うのと入れ替えるとその画像が動的に反映されます(たぶん)。
画像を変えるたびにコンパイルしなおす、という必要は全くなくなり、いつまでも汎用的に使えますね。といいつつ、あんまりテストしてないので、変だったらご連絡ください。画像を入れ替えても反映しないときはブラウザのキャッシュをクリアしてください。
slideshow.swfダウンロード
※ダウンロード後、ファイル名 「slideshow.swf-」 を 「slideshow.swf」 に変更してください。
<?xml version="1.0" encoding="UTF-8"?> <canvas width="300" height="200" bgcolor="0xeeeeee" proxied="false"> <class name="slide" opacity="0"> <image src="${classroot.thisPic}" width="300" height="200" stretches="both"/> <attribute name="thisPic" type="string"/> <attribute name="nextSlide" type="string"/> <animator name="show" start="false" attribute="opacity" from="0" to="1" duration="1000" onstop="classroot.sleep.doStart()"/> <animator name="sleep" start="false" attribute="opacity" to="1" duration="3000" onstop="classroot.hide.doStart()"/> <animator name="hide" start="false" attribute="opacity" from="1" to="0" duration="1500" onstart="eval(classroot.nextSlide).show.doStart()"/> </class> <slide id="bg01" thisPic="http:bg01.jpg" nextSlide="bg02" oninit="this.show.doStart();"/> <slide id="bg02" thisPic="http:bg02.jpg" nextSlide="bg03"/> <slide id="bg03" thisPic="http:bg03.jpg" nextSlide="bg04"/> <slide id="bg04" thisPic="http:bg04.jpg" nextSlide="bg05"/> <slide id="bg05" thisPic="http:bg05.jpg" nextSlide="bg01"/> </canvas>
P.S.
なんかこのページだけ、フリーソフト配布サイトみたい(^^;)