Archived:Adobe Flash Lite 1.1, 2.0, 2.1におけるFPS Meter
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.
We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.
Article Metadata
Code Example
Source file: Media:FPS-Meter v2.zip
Article
Translated:
By morisawafnj
Last edited: hamishwillee
(14 May 2013)
Contents |
概要
FPS(Frames Per Second)-Meter v2.0は、Adobe Flash Lite 1.1/2.0/2.1用の、作りは簡単ですが、とても役に立つアプリケーションです。スムーズな再生を行うために、Flash Liteアニメーションを最適化することができます。最初のバージョンは、こちらでリリースしています。
ここでは、このアプリケーションの全ソースコードと、コンパイル済の.MXP(Adobe Extention Manager Package)ファイルを確認することができます。
ソース
下記ファイル名をクリックすると、ダウンロードできます。
ソースコード
- 11フレームを持つムービークリップを作成し、フレーム番号1,2,11上にキーフレームを作成します。
- 最初のキーフレームで、タイマー変数を初期化します。
var timer:Number = 0;
- 2番目のキーフレームで、FPS(Frames Per Second)値を計算し、計算結果を表示します。
txtFPS = Math.round(10 / ((getTimer() - timer) / 1000));
timer = getTimer();
- 3番目のキーフレームで、フレーム番号2にジャンプし、ループ処理を作成します。
gotoAndPlay(2);
メモ
これと同じフレームベースのタイマーで、他の処理をすることができます。例えば、定期的なバッテリーメーターやネットワーク強度の更新、インターネットからのデータの再ロードがあります。
ダウンロードファイル中には、Flash Lite 1.1用のソースコードも含まれていて、同じ方法で操作することができます。




(no comments yet)