Procedural File: mk_lib_swf.php
Source Location: /lib/mk_lib_swf.php
Page Details:
Tags:
bin2dec [line 429]
void bin2dec(
mixed $buf)
|
|
converts "binary string" to signed integer
boundBits [line 168]
void boundBits(
mixed $num)
|
|
parameter: number return bits needed to write
count_bit [line 173]
void count_bit(
mixed $nmb, [mixed $bit = false])
|
|
count zeroes or one in a given number
find_minBits [line 147]
void find_minBits(
mixed $nmbAr, [mixed $inTwips = true])
|
|
parameter: number converts in twips and return minimun number of bits needed to write
fp_binStr_float [line 372]
void fp_binStr_float(
mixed $fpStr, [mixed $precision = 4], [mixed $fp = 16])
|
|
converts a string representing binary 16.16 fixed point to float
fp_find_minBits [line 397]
void fp_find_minBits(
mixed $fpAr)
|
|
find minBits for fp 16.16 values these valued are not related to twips so inTwips flag is not used
fp_value2bin [line 342]
void fp_value2bin(
mixed $fv, [mixed $minBits = 32])
|
|
converts a float to 16.16 fixed point value
get_binData [line 470]
void get_binData(
mixed $binStr, [mixed $requirePad = false])
|
|
converts a "binary" string whose bit is represented a "1" or "0" to a binary data
get_binData_string [line 455]
void get_binData_string(
mixed $buf)
|
|
converts a raw binData to "binary" string each bit is represented as "1" or "0"
get_global_swfVersion [line 492]
void get_global_swfVersion(
)
|
|
get_pad [line 485]
void get_pad(
mixed $nBits)
|
|
private: compute padding bits from a given nBits return a padding "0" string
get_tagID [line 127]
void get_tagID(
mixed $tagName)
|
|
accept tag name return a valid tag id
get_tagName [line 113]
void get_tagName(
mixed $tagID)
|
|
accept tag id and return a valid tag name, check if tag id is supported
has_itemID [line 95]
void has_itemID(
mixed $tagID)
|
|
returns true | false if a certain tag has item ID
isnegative [line 449]
void isnegative(
mixed $binStr)
|
|
return true | false if given binary string starts with "1";
is_supported_tag [line 84]
void is_supported_tag(
mixed $tagID)
|
|
verify if tag i supported by passing tag id (decimal)
nmb2twip [line 190]
void nmb2twip(
mixed $nmb)
|
|
converts number to twip
read_buttonRecord_data [line 1382]
void read_buttonRecord_data(
mixed $buf, [mixed $btType = BUTTON])
|
|
reads data returns an associative array with BUTTONRECORDS fields
read_color_data [line 959]
void read_color_data(
mixed $buf, [mixed $dsType = SHAPE])
|
|
reads data returns an associative array with these fields: red, green, blue, [alpha]
read_cxform_data [line 980]
void read_cxform_data(
mixed $buf)
|
|
reads data (CXFORM structure) returns an associative array with these fields hasAddTerms, hasMultTerms, nBits, redMultTerm, greenMultTerm, blueMultTerm, redAddTerm, greenAddTerm, blueAddTerm
read_cxform_with_alpha_data [line 1034]
void read_cxform_with_alpha_data(
[mixed $buf = ""])
|
|
reads data (CXFORMWITHALPHA structure) returns an associative array with these fields hasAddTerms, hasMultTerms, nBits, redMultTerm, greenMultTerm, blueMultTerm, alphaMultTerm, redAddTerm, greenAddTerm, blueAddTerm, alphaAddTerm
read_defineButtonSound_data [line 1427]
void read_defineButtonSound_data(
[mixed $tagData = ""])
|
|
reads data fill an associative array with defineButtonSound fields
read_defineButton_data [line 1349]
void read_defineButton_data(
[mixed $tagData = ""])
|
|
reads data returns an associative array with BUTTON2 field data before BUTTONRECORD block data
read_exportAssets_data [line 1286]
void read_exportAssets_data(
mixed $tagData)
|
|
reads data fills and returns exportAssets (movieclip with linkage) fields
read_fileAttributes_data [line 1313]
void read_fileAttributes_data(
mixed $tagData)
|
|
reads data returns an associative array with FileAttributes tag data from a give binary data
read_filterList_data [line 1468]
void read_filterList_data(
[mixed $buf = ""])
|
|
reads data fill an associative array with FILTERLIST fields
read_filter_data [line 1491]
void read_filter_data(
[mixed $buf = ""])
|
|
read_frameLabel_data [line 1257]
void read_frameLabel_data(
mixed $tagData)
|
|
reads data returns the name label
read_matrix_data [line 872]
void read_matrix_data(
mixed $buf)
|
|
fill and return an array containing MATRIX fields from a given byte buffer
read_metaData_data [line 1335]
void read_metaData_data(
mixed $tagData)
|
|
reads data returns a string containing metadata notice: metadata is an xml instance content
read_movieClip_data [line 1238]
void read_movieClip_data(
mixed $tagData)
|
|
reads data returns an associative array with these fields: spriteID, frameCount, controlTags
read_placeObject2_data [line 1119]
void read_placeObject2_data(
mixed $buf)
|
|
reads data fill an associative array with these fields pfHasClipActions pfHasClipDepth pfHasName pfHasRatio pfHasColorTransform pfHasMatrix pfHasCharacter pfMove depth characterId / itemID matrix colorTransform ratio name clipDepth clipActions this is a complex object, refer to swf file format for further info
read_placeObject2_flags [line 1185]
void read_placeObject2_flags(
mixed $poFlags)
|
|
reads data returns an associative array with placeObjec2 flags
read_protect_data [line 1273]
void read_protect_data(
mixed $tagData)
|
|
reads data return the only one field in protect tag MD5password
read_rect_data [line 816]
void read_rect_data(
[mixed $buf = ""])
|
|
fill and return an array containing RECT fields from a given byte buffer
read_removeObject2_data [line 1206]
void read_removeObject2_data(
mixed $tagData)
|
|
reads data returns the only one removeOject2 field: depth
read_setBackgroundColor_data [line 1219]
void read_setBackgroundColor_data(
mixed $tagData)
|
|
reads data fills and returns an associative array with color fiels
read_swf_string [line 854]
void read_swf_string(
mixed $buf, [mixed $fixSlashes = false])
|
|
reads data returns a string, strip away null-termination char
read_tag_header_data [line 760]
void read_tag_header_data(
mixed $buf, [mixed $offsetPosition = -1])
|
|
read rawdata returns an array containing these fields: tagID -> tag code id tagLength -> body length itemID -> item id, even if data does non contains tagOffset -> used to check short/long tag header tagType -> tag description
set_global_swfVersion [line 488]
void set_global_swfVersion(
[mixed $swfVersion = 6])
|
|
si8dec [line 304]
void si8dec(
mixed $binSI8)
|
|
converts 1 byte data to signed number;
si16dec [line 310]
void si16dec(
mixed $binSI16)
|
|
converts 2 bytes little-endian data to signed number;
si32dec [line 315]
void si32dec(
mixed $binSI32)
|
|
converts 4 bytes little-endian data to signed number;
si64double [line 321]
void si64double(
mixed $binSI64)
|
|
converts 8 bytes little-endian data to signed float;
snap2twip [line 200]
void snap2twip(
mixed $nmb)
|
|
"snap" number value to twip, it eases player rendering
SWFtag_end [line 741]
builds an return end tag place this at end of the movie
SWFtag_long_header [line 528]
void SWFtag_long_header(
mixed $tagID, mixed $tLength)
|
|
return long tag header record more or equal than 63 bytes in length
SWFtag_short_header [line 520]
void SWFtag_short_header(
mixed $tagID, mixed $length)
|
|
return short tag header record less than 63 bytes in length
swf_bin [line 256]
void swf_bin(
mixed $bin)
|
|
return a byte value from a binary string
swf_double [line 225]
void swf_double(
mixed $d)
|
|
swf_dword [line 223]
void swf_dword(
mixed $w)
|
|
parameter: number return 4 bytes little-endian
swf_fillStyles [line 575]
void swf_fillStyles(
[mixed $fillAr = array()])
|
|
parameters: array of fillstyles builds an return fillstyles record NOTE: this is an obsolete and incomplete function
swf_init_defineShape [line 560]
void swf_init_defineShape(
mixed $shapeID, mixed $tag_length, mixed $xmin, mixed $ymin, mixed $xmax, mixed $ymax)
|
|
parameters: they are in dev starts defining shape
swf_lineStyles [line 597]
void swf_lineStyles(
[mixed $lineWidths = array()], [mixed $lineAr = array()])
|
|
parameters: array of linewidths, array of linestyles builds an return linestyles record NOTE: this is an obsolete and incomplete function
swf_placeObject2 [line 705]
void swf_placeObject2(
[mixed $shapeID = 1], [mixed $depthID = 1], [mixed $placeFlagMove = false], [mixed $placeFlagHasCharacter = true], [mixed $placeFlagHasMatrix = true])
|
|
parameters: shape id (number) builds an return placeobject2 tag
swf_rect [line 502]
void swf_rect(
mixed $x, mixed $y, mixed $wd, mixed $hg)
|
|
parameters, coordx, coordy, width, height return a Flash rectangle structure
swf_setBgcolor [line 550]
void swf_setBgcolor(
mixed $r, mixed $g, mixed $b)
|
|
parameters, red, green, blue components > 0 < 255; build and return a setBackgroundColor tag
swf_setTailheader [line 537]
void swf_setTailheader(
mixed $w, mixed $h, mixed $rate, mixed $frames)
|
|
parameters, stageWidth, stageHeight, fps, numFrames build and return the last part of swf header
swf_shape_record_rect [line 634]
void swf_shape_record_rect(
mixed $x, mixed $y, mixed $wd, mixed $hg)
|
|
parameters: x, y, width, height builds an return shaperecord rect structure
swf_shape_with_style [line 619]
void swf_shape_with_style(
mixed $nFillStyles, mixed $nLineStyles)
|
|
parameters: fillstyle record, linestyle record builds an return shapewithstyle record
swf_showFrame [line 732]
builds an return showframe tag this is the last tag in every frame
swf_string [line 250]
void swf_string(
mixed $str)
|
|
parameter: string return string + a null byte terminator
swf_value2bin [line 275]
void swf_value2bin(
mixed $v, mixed $bits)
|
|
return a binary string with fixed bitlength from a numeric value
swf_word [line 217]
parameter: number return 2 bytes little-endian
twip2nmb [line 211]
void twip2nmb(
mixed $tw)
|
|
converts twips to number
ui8dec [line 282]
void ui8dec(
mixed $binUI8)
|
|
converts 1 byte data to number;
ui16dec [line 290]
void ui16dec(
mixed $binUI16)
|
|
converts 2 bytes little-endian data to unsigned number;
ui32dec [line 297]
void ui32dec(
mixed $binUI32)
|
|
converts 4 bytes little-endian data to unsigned number;
write_buttonRecord_data [line 1934]
void write_buttonRecord_data(
[mixed $brd = array()], [mixed $btType = BUTTON2])
|
|
writes data BUTTONRECORDS compiled binary data
write_color_data [line 1623]
void write_color_data(
mixed $cAr)
|
|
write a COLOR structure from a given color array containing these fields: red, green, blue, [alpha]
write_cxform_data [line 1646]
void write_cxform_data(
mixed $cfd)
|
|
write a CXFORM structure data from given associative array containing these fields: hasAddTerms, hasMultTerms, nBits, redMultTerm, greenMultTerm, blueMultTerm, redAddTerm, greenAddTerm, blueAddTerm
write_cxform_with_alpha_data [line 1690]
void write_cxform_with_alpha_data(
mixed $cwad)
|
|
write a CXFORMWITHALPHA structure data from given associative array containing these fields: hasAddTerms, hasMultTerms, nBits, redMultTerm, greenMultTerm blueMultTerm, alphaMultTerm, redAddTerm, greenAddTerm blueAddTerm, alphaAddTerm
write_defineButtonSound_data [line 1966]
void write_defineButtonSound_data(
[mixed $bsd = array()])
|
|
writes data compile defineButton tagData from a given associative array
write_defineButton_data [line 1906]
void write_defineButton_data(
[mixed $bd = array()])
|
|
writes data compile defineButton or defineButton2 tagData
write_exportAssets_data [line 1842]
void write_exportAssets_data(
[mixed $ead = array()])
|
|
writes data from a given associative array assetCount, number of assets asset items contain fields: id, name
write_fileAttributes_data [line 1869]
void write_fileAttributes_data(
[mixed $faData = array()])
|
|
writes data, compile binary tagData from a given associative array
write_frameLabel_data [line 1813]
void write_frameLabel_data(
[mixed $label = ""], [mixed $hasAnchor = 0])
|
|
gets a string and return binary frame label OR named anchor tagdata
write_matrix_data [line 1555]
void write_matrix_data(
mixed $md)
|
|
compose bindata from a given array containing MATRIX fields: [hasScale], [nScaleBits], scaleX, scaleY, [hasRotate], [nRotateBits], rotateSkew0, rotateSkew1, [nTranslateBits], translateX, nTranslateY
write_metaData_data [line 1892]
void write_metaData_data(
[mixed $metadata = ""])
|
|
writes data, compile metadata tag froma a given metadata string
write_placeObject2_data [line 1735]
void write_placeObject2_data(
mixed $pod)
|
|
pack placeObject2 tagData from a given associative array containing these fields: ------- please list fields --------
write_protect_data [line 1826]
void write_protect_data(
mixed $MD5password)
|
|
gets a string representing MD5 password returns protect tagdata
write_rect_data [line 1504]
void write_rect_data(
mixed $xmin, mixed $xmax, mixed $ymin, mixed $ymax, [mixed $inTwips = true])
|
|
writes data parameters, xmin, xmax, ymin, ymax return a Flash rectangle structure
write_removeObject2_data [line 1790]
void write_removeObject2_data(
mixed $depth)
|
|
returns removeObject2 tagdata from given depth
write_setBackgroundColor_data [line 1799]
void write_setBackgroundColor_data(
mixed $cAr)
|
|
gets an associative array returns setBackgroundColor tagdata
write_tag_header_data [line 1534]
void write_tag_header_data(
mixed $tagHData)
|
|
write and returns rawdata from a given associative array containing: tagID -> tag code id tagSL -> short or long type, if tagLength > 63 long tag header is written tagLength -> body length itemID -> item id, even if data does non contains
|