function swfHeader($framerate = 12, $framecount = 1, $xmin = 0, $xmax = 1, $ymin = 0, $ymax = 1) { parent::swftype(); $this->filelength = new U32(0); $this->framesize = new RECT($xmin, $xmax, $ymin, $ymax); $this->framerate = new U16($framerate << 8); $this->framecount = new U16($framecount); }
function instruction($code, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null) { parent::swftype(); $this->code = new U8($code); $this->arg1 = $arg1; $this->arg2 = $arg2; $this->arg3 = $arg3; $this->arg4 = $arg4; }
function exception_info($from, $to, $target, $exc_type, $var_name) { parent::swftype(); $this->from = new U30($from); $this->to = new U30($to); $this->target = new U30($target); $this->exc_type = new U30($exc_type); $this->var_name = new U30($var_name); }
function class_info($cinit, $traits) { parent::swftype(); $this->cinit = new U30($cinit); $this->trait_count = new U30(0); $this->traits = new abcArray($this->trait_count); foreach ($traits as $trait) { $this->traits->add($trait); } }
function script_info($init, $traits) { parent::swftype(); $this->init = new U30($init); $this->trait_count = new U30(0); $this->trait = new abcArray($this->trait_count); foreach ($traits as $trait) { $this->trait->add($trait); } }
function ns_set_info($items = null) { parent::swftype(); $this->count = new U30(0); $this->ns = new abcArray($this->count); if ($items != null) { foreach ($items as $item) { $this->ns->add(new U30($item)); } } }
function constantPool() { parent::swftype(); $this->int_count = new U30(0); $this->integer = new abcArray($this->int_count, TRUE); $this->uint_count = new U30(0); $this->uinteger = new abcArray($this->uint_count, TRUE); $this->double_count = new U30(0); $this->double = new abcArray($this->double_count, TRUE); $this->string_count = new U30(0); $this->string = new abcArray($this->string_count, TRUE); $this->namespace_count = new U30(0); $this->namespace = new abcArray($this->namespace_count, TRUE); $this->ns_set_count = new U30(0); $this->ns_set = new abcArray($this->ns_set_count, TRUE); $this->multiname_count = new U30(0); $this->multiname = new multiname($this->multiname_count, TRUE); }
function abcFile() { parent::swftype(); $this->minor_version = new U16(ABC_MINOR); $this->major_version = new U16(ABC_MAJOR); $this->constant_pool = new constantPool(); $this->method_count = new U30(0); $this->method = new abcArray($this->method_count); $this->metadata_count = new U30(0); $this->metadata = new abcArray($this->metadata_count); $this->class_count = new U30(0); $this->instance = new abcArray($this->class_count); $this->class = new abcArray(); $this->script_count = new U30(0); $this->script = new abcArray($this->script_count); $this->method_body_count = new U30(0); $this->method_body = new abcArray($this->method_body_count); }
function instance_info($name, $super_name, $flags, $protectedNs, $interfaces, $iinit, $traits) { parent::swftype(); $this->name = new U30($name); $this->super_name = new U30($super_name); $this->flags = new U8($flags); $this->protectedNs = new U30($protectedNs); $this->intrf_count = new U30(0); $this->interface = new abcArray($this->intrf_count); foreach ($interfaces as $interface) { $this->interface->add(new U30($interface)); } $this->iinit = new U30($iinit); $this->trait_count = new U30(0); $this->trait = new abcArray($this->trait_count); foreach ($traits as $trait) { $this->trait->add($trait); } }
function method_body_info($method, $max_stack, $local_count, $init_scope_depth, $max_scope_depth, $code, $exceptions, $traits) { parent::swftype(); $this->method = new U30($method); $this->max_stack = new U30($max_stack); $this->local_count = new U30($local_count); $this->init_scope_depth = new U30($init_scope_depth); $this->max_scope_depth = new U30($max_scope_depth); $this->code_length = new U30(0); $this->code = new abcArray(); foreach ($code as $instruction) { $this->code->add($instruction); } $this->exception_count = new U30(0); $this->exception = new abcArray($this->exception_count); foreach ($exceptions as $exception) { $this->exception->add(new U30($exception)); } $this->trait_count = new U30(0); $this->trait = new abcArray($this->trait_count); foreach ($traits as $trait) { $this->trait->add(new U30($trait)); } }
function option_info() { parent::swftype(); $this->option_count = new U30(0); $this->option = new abcArray($this->option_count); }
function trait_method($slot_id, $function) { parent::swftype(); $this->slot_id = new U30($slot_id); $this->function = new U30($function); }
function multiname_info($kind, $data) { parent::swftype(); $this->kind = new U8($kind); $this->data = $data; }
function UTF8String($string) { parent::swftype(); $this->utf8data = $string; $this->size = new U30(strlen($this->utf8data)); }