SwfBuilder class

テスト用の合成SWFフィクスチャビルダー。

SwfParserが読める最小限の形式でタグを組み立てる。実SWF(著作物)に 依存するテストを、このビルダーが生成する合成SWFへ置き換えるための基盤。

Constructors

SwfBuilder({int version = 4, int widthPx = 240, int heightPx = 240, double frameRate = 12})

Properties

frameRate → double
final
hashCode → int
The hash code for this object.
no setterinherited
heightPx → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version → int
final
widthPx → int
final

Methods

build() → Uint8List
FWSヘッダ + 蓄積したタグ列 + Endタグ。
buildCompressed() → Uint8List
buildのCWS(zlib圧縮SWF)版。
defineButton(int id, {required int keyPress, required Uint8List actions, int? shapeId}) → void
DefineButton2(タグ34)。CondKeyPress=keyPressのButtonCondAction 1個と、 shapeId指定時はヒット/アップ兼用のButtonRecordを持つボタンを定義する。
defineShapeRect(int id, {required int widthPx, required int heightPx, int fillRgb = 0x000000}) → void
単色塗りの矩形シェイプをDefineShape(タグ2/バージョン1)として定義する。
defineSprite(int id, void build(SwfBuilder sprite)) → void
DefineSprite(タグ39)。buildでスプライト内タイムラインをネストビルドする。
doAction(Uint8List bytecode) → void
frameLabel(String label) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
placeObject2({required int depth, int? characterId, int? translateXPx, int? translateYPx, String? name}) → void
removeObject2({required int depth}) → void
setBackgroundColor(int r, int g, int b) → void
showFrame() → void
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited