カテゴリー
未分類

メモ:DisplayObject subclass

ちょいとメモ。
Loader.content(もしくはLoaderInfo.content)の抽出に悪戦苦闘。
cloneの必要があるのかと思ったがどうもそーでもないっぽい。BitmapDataではなくBitmapらしい。そもそもLoader自体がDisplayObjectのサブだから、そゆことをしてはいけないのかもしれない。

Shape for a “canvas” for drawing content on-screen. In particular, if you want to create an instance for drawing shapes on the screen, and it won't be a container for other display objects, you'll gain significant performance benefits using Shape instead of Sprite or MovieClip.
A loaded image will be a Bitmap instance.
A loaded SWF file written in ActionScript 3.0 will be a Sprite or MovieClip instance (or an instance of a subclass of those classes, as specified by the content creator).
Sprite if the object will be created using only ActionScript, or as the base for a custom display object that will be created and manipulated solely with ActionScript.
If you are creating a class that will be associated with a clip symbol in the library, choose one of these DisplayObjectContainer subclasses as your class's base class:
* MovieClip if the associated movie clip symbol has content on more than one frame
* Sprite if the associated movie clip symbol has content only on the first frame

話はずれるが、
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/js/html/wwhelp.htm
って一つにまとまらないのかしら?
タブだと切り替えがめんどくさい。(ウインドウ一つ追加すればいいだけなんだけど)

「メモ:DisplayObject subclass」への4件の返信

URLLoaderでバイナリで読み込んで処理しようかと思ったけど、結局変換でLoaderを使う必要があるので一緒かー。
Loaderのcompleteイベントを変更して、そこからbitmapを抽出する方が簡単だな。
external swfのduplicateをする場合にはURLLoaderでやるしかないだろうけど、Loader.loadBytesはそれなりに負荷がかかりそうだから、必要な場合だけって感じかなー。
話は飛ぶのだけど
Base64Encoder
http://livedocs.adobe.com/flex/3_jp/langref/mx/utils/Base64Encoder.html
ってFlex3にはあるっぽいが、Flashには入ってる??flashのas3にはmxパッケージって存在していないような気がするのだけど、どうなっているのだろうか?
まぁ
http://dynamicflash.com/goodies/base64/
を使えばいいのだろうけど・・。
なんか色々話が飛びすぎてまとまらない(汗

あーあと今Classライブラリの中を見ていたらFlashの基本クラスがlocal settingのflash Develop以下に存在しているのだけど、なして?移動されたの?
ちと怖い。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です