FlashCS3には,定番のパーツをムービー内で使用できる「コンポーネント」が用意されています。代表的なコンポーネントの使い方を学習しましょう。 前回の記事では,FlashCS3にあらかじめ用意されている「fl」パッケージのコンポーネントの基本的な使用方法をご紹介しました。今回は,個々のコンポーネントをピックアップし,具体的なコードの記述方法をご紹介します(図1)。 また,FlashCS3のコンポーネントは,あらかじめステージ上に配置し,デフォルト値を[コンポーネントインスペクタ]を使って設定する事もできますが,今回は,配置からデフォルト値の設定,イベント処理の割り当てまで,すべてActionScriptのコード上から設定を行ってみましょう。 まずは肩慣らし「Button」コンポーネント まずはButtonコンポーネントを使って,おさらいと肩慣らしです。任意のコンポーネントを使用するには,