Flash Uncovered.doc

图像质量评估:使用 SSIM 计算图像相似性 在图像处理领域,衡量两幅图像之间相似性的一种常见方法是使用结构相似性指数(SSIM)。SSIM 是一种全参考的图像质量评估指标,它不仅考虑了图像的亮度、对比度,还考虑了结构信息。在本文中,我们将介绍一个使用 Python 和 OpenCV 实现的 SSIM 计算脚本,并使用该脚本评估两幅图像的相似性。 阅读详情

Appendix A: Flash Uncovered

 


A simple .swf file and it’s below the line representation

 

       At some point along your journey to write your own .swf files, you are going to have to be able to read and understand the raw bits and bytes.  I created a one frame flash movie that contained only a rectangle and saved it as Rectangle.swf.  Let’s take a look at the way the file is represented in its .swf format.  Below is the hexadecimal representation of Rectangle.swf.  Let’s take a closer look…

 

000000  46 57 53 03 4F 00 00 00    78 00 05 5F 00 00 0F A0

000010  00 00 0C 01 00 43 02 FF    FF FF BF 00 23 00 00 00

000020  01 00 70 FB 49 97 0D 0C    7D 50 00 01 14 00 00 00

000030  00 01 25 C9 92 0D 21 ED    48 87 65 30 3B 6D E1 D8

000040  B4 00 00 86 06 06 01 00    01 00 00 40 00 00 00

 

   Every .swf file has two parts, the header block and a series of tagged data blocks.  Let’s begin with the header. 

 

HEADER

 

       The header is always the first 21 bytes of  the .swf file (true?).  It describes the file version(1,2, or 3), length of the file in bytes, the frame size in TWIPS, frame rate in frames per second,  and the frame count.

 

       Here is the “SWF File Reference’ description of the header:

 

Field

Type

Comment

Signature

UI8

Signature byte always ‘F’

Signature

UI8

Signature byte always ‘W’

Signature

UI8

Signature byte always ‘S’

Version

UI8

Single byte file version

File Length

UI32

Length of entire file in bytes

Frame Size

RECT

Frame size in TWIPS

Frame Rate

UI16

Frame delay in 8.8 fixed number of frames per second

Frame Count

UI16

Total number of frames in movie

 

 

The first three bytes are the standard signature for all .swf files.  They are the ASCII values of the characters ‘F’, ‘W’, and ‘S’ in that order.  The fourth byte indicates the version of the file. Although a file can be of version 1, 2, or 3, we will always be creating version 3 files so this value will also be fixed.

 

      0x46           ‘F’           0x57             ‘W’         0x53           ‘S’            0x03     3

 

The next 4 bytes represent an unsigned 32-bit integer indicating the file size.  Here’s where it starts getting tricky and machine architecture gets involved!  The next 4 bytes are 0x4F000000 so that would imply that the file length is 1325400064 bytes, a very large number which doesn’t make sense.  What we failed to do is swap all the bytes.

In .swf files, bytes are swapped whenever reading words and dwords such that a 32 bit value B1B2B3B4 is written as B4B3B2B1, and a 16 bit value B1B2 is written as B2B1.  Single bytes are written unchanged since there is NO bit-swapping. The reason for this is the differences in storage and retrieval between the Mac and PC processors.

 

Reversing the bytes we can read the 4 bytes correctly and see that file is 79 bytes long.

      

0x4F000000                     0x0000004F             79

 

       The next 9 bytes represent a data structure used in the .swf format called a Rectangle.  Here is the file description of a rectangle:

 

Field

Type

Comment

Nbits

nBits = UB[5]

Bits in each rect value field

Xmin

SB[nBits]

X minimum position for rect

Xmax

SB[nBits]

X maximum position for rect

Ymin

SB[nBits]

Y minimum position for rect

Ymax

SB[nBits]

Y maximum position for rect

 

To understand these bytes, we need to look at the individual bits.

 

78 00 05 5F 00 00 0F A0 00

 

 

 


0111 1000  0000 0000  0000 0101  0101 1111  0000 0000

0000 0000  0000 1111  1010 0000  0000 0000

 

       There are five fields in a rectangle structure: nBits, xmin, xmax, ymin, ymax.  The unsigned nBits field occupies the first five bits of the rectangle and indicates how long the next four signed fields are. 

Here’s where we hit another subtle point about the .swf file representation.  Reading and writing bits is different from reading and writing words and dwords.  There is no swapping at all!  This is because when Flash is reading an n-bit field, it reads a byte at a time until it has read all n bits.  You don’t do any swapping inside of bytes so there is no swapping at all.  So the next five bits are read in order and evaluate to 15.  Although the nBit field usually varies, it appears fixed in the header so that header has a fixed size (It may just be because the movie dims are usually the same).

 


01111                15

 

       What if nBit has a value of sixteen?  This is exactly the size of a word so do we read the following fields as words and swap bytes?  No.  Fields described by bit size are always read a byte at a time.  No swapping, just read the next n bits in that order.

 

000000000000000               0  =  xmin

010101011111000               11000 = xmax

000000000000000               0 = ymin

001111101000000               8000 = ymax

 

       For the header, the rectangle is used to store the movie dimensions with xmax corresponding to the movie width and ymax corresponding to the movie height, both in TWIPS.  “What’s this TWIPS thing?” you ask.  According to whatis.com :

A twip (twentieth of a point) is a measure used in laying out space or defining objects on a page or other area that is to be printed or displayed on a computer screen. A twip is 1/1440th of an inch or 1/567th of a centimeter. That is, there are 1440 twips to an inch or 567 twips to a centimeter. The twip is 1/20th of a point, a traditional measure in printing. A point is approximately 1/72nd of an inch.

For Flash a point corresponds to a pixel, so if we convert from TWIPS to pixels, we see that our movie is 550 x 400. 

       Now we have looked at all of the fields of the rectangle and evaluated them, but what about those last seven bits which are all 0’s.  Well, they were just “filled.” 

 

0000000 = filled bits

 

After the end of any structure, if the structure does not completely fill up its last byte, then that last byte is filled with 0’s to keep the next item byte aligned.  So if the next item is a word or dword, you can read it as such and not worry about being in the middle of a byte.  In this case, only 1 bit in the last byte is used so the last 7 bits are filled with 0’s. 

       Next in the header is the frame rate, which is kind of weird.  It is supposed to be stored as a 16bit integer, but the first byte (or last depending on how you look at it) is completely ignored.  So the frame rate is 12 fps.

 

0x000C               0x0C00                   0x0C          12 = frame rate

 

       Next is the frame count, which is also a 16-bit integer.  So the frame count is 1.

 

0x0100                 0x0001(byte swapping)             1 = frame count

 

       Now we are done with the header.  After the header is a series of tagged data blocks.  Here is the file description of a tag:

 

Short Tag

 

Field

Type

Comment

Tag

UB[10]

Tag id

Length

UB[6]

Length of tag

 

Long Tag

 

Field

Type

Comment

Tag

UB[10]

Tag id

Long Header Flag

UB[6]

Always 0x3F

Length

UI32

Length of tag

 

 

 

      There are 2 types of tags.  They are the short and long data header.  Regardless of which case you have, you begin by looking at the first word.

 

0x4302             0x0243               0000 0010 0100 0011

 

The first 10 bits of the tag are the unsigned tag ID.  The tag ID indicates what type of data is to follow in the body of the data block to follow.  In this case the value of the tag ID is 9 which corresponds to a setBackgroundColor block.  (APPENDIX SHOULD HAVE ALL ID MEANINGS).  The last 6 unsigned bits of the tag indicate the length of the data block to follow if it is 62 bytes or less.  If the length of the data block is more than 62 bytes, then this field has all 1’s and the length is indicated in the following dword.  In this situation though the field does not have all 1’s so the field does indicate the actual length which is 3 bytes.

 

0000001001 = 9 = setBackgroundColor 000011 = 3 = body length

 

       Since we know that the length of the body is 3 bytes, let’s take a look at it.  A setBackgroundColor block only contains the 3 byte rgb color description so we evaluate it as such.  A color is its own 3 byte data type so there is no byte swapping.

 

0XFFFFFF = white

 

       The next tag is a long tag and is a defineShape tag.

 

0xBF00          0x00BF         0000 0000 1011 1111

 

0000000010 = 3 = defineShape           111111 = body length (so we have to look at the

                                                                              next dword)

0x23000000               0x00000023           35 = body length

 

Here is the file description of defineShape:

 

Field

Type

Comment

Header

RECORDHEADER

Tag ID = 2

ShapeId

UI16

ID for this character

ShapeBounds

RECT

Bounds of the shape

Shapes

SHAPEWITHSTYLE

Shape information

 

                   The body of a defineShape is composed of an unsigned 16-bit character ID, a rectangle defining the bounds for the shape, and a ShapeWithStyle structure which contains shape information.

 


0x0100        0x0001         1 = shape ID

 

Now the Rect which defines the boundaries:

 

70 FB 49 97 0D 0C 7D 50

 

 

 

 


0111 0000  1111 1011  0100 1001  1001 0111  0000 1101   0000 1100  0111 1101  0101 0000

 

01110 = 14 = nBits

00011111011010 = 2010 = xmin     /20 to covert to pixels from TWIPS  100.5

01001100101110 = 4910 = xmax                                       245.5

00011010000110 = 1670 = ymin                                        83.5

00111110101010 = 4010 = ymax                                       200.5

000 = fill bits

 

       The ShapeWithStyle structure has five parts.  A fill style array, a line style array, a nFillBits field, a nLineBits field, and an array of shape records.  Here is the file description:

 

Field

Type

Comment

FillStyles

FILLSTYLEARRAY

Array of fill styles

LineStyles

LINESTYLEARRAY

Array of line styles

NumFillBits

nFillBits = UB[4]

Number of fill index bits

NumLineBits

nLineBits = UB[4]

Number of line index bits

ShapeRecords

SHAPEREC[one or more]

Shape records - see below

 

       A fill style array itself has three fields.  The first field is an 8 bit integer count which indicates how many fill styles are in the array.  This count works similar to the tag’s length field in that if it is all 1’s, you have to look at the next 16-bits to get the actual length.  Here is the file description:

 

Field

Type

Comment

FillStyleCount

count = UI8

Count of fill styles

FillStyleCountExtended

If count = 0xFF count = UI16

Extended count of fill styles. Supported only for Shape2 and Shape3.

FillStyles

FILLSTYLE[count]

Array of fill styles

 

 

In this case, the 8 bit count is equal to 0 so there is nothing to follow it.

 

0x00 = 0 = count             This is the end of the fill style array because it has no elements

 

       A line style array is exactly the same as a fill style array except it stores line styles.  Here is the file description:

 

Field

Type

Comment

LineStyleCount

count = UI8

Count of line styles

LineStyleCountExtended

If count = 0xFF count = UI16

Extended count of line styles

LineStyles

LINESTYLE[count]

Array of line styles

0x01 = 1 = count        So there is one line style in the array.

 

       A line style has two parts, an unsigned 16-bit integer indicating the width of a line in TWIPS, and a color.  Here is the file description:

 

Field

Type

Comment

Width

UI16

Width of line in twips

Color

RGB (Shape1 or Shape2)
RGBA (Shape3)

Color value including alpha channel information for Shape3s

 

 

The color in this case is a 24-bit RGB, but if we were doing a defineShape3, it would be a 32-bit RGBA where alpha is the transparency of the color. 

 

0x1400          0x0014 = 20 = width = 1 pixel

0x000000 = RGB = black

 

       Back to the ShapeWithStyle, the nFillBits field is 4 bits, as is the nLineBits.

 

0x0 = 0 = nFillBits              0x1 = 1 = nLineBits

 

       Now for the array of shape records.  There are three types of shape records.  Here are the file descriptions:

 

Shape Record Type 0

 

Field

Type

Comment

TypeFlag

UB[1] = 0

Non-edge record flag

EndOfShape

UB[5] = 0

End of shape flag

 

 

Shape Record Type 1

 

Field

Type

Comment

TypeFlag

UB[1] = 0

Non-edge record flag

StateNewStyles

newStyles = UB[1]

New styles flag. Used by DefineShape2 and DefineShape3 only.

StateLineStyle

lineStyle = UB[1]

Line style change flag

StateFillStyle0

fillStyle0 = UB[1]

Fill style 0 change flag

StateFillStyle1

fillStyle1 = UB[1]

Fill style 1 change flag

StateMoveTo

moveTo = UB[1]

Move to flag

MoveBits

If moveTo nMoveBits = UB[5]

Move bit count

MoveDeltaX

If moveTo UB[nMoveBits]

Delta X value

MoveDeltaY

If moveTo UB[nMoveBits]

Delta Y value

Fill0Style

If fillStyle0 UB[nFillBits]

Fill 0 Style

Fill1Style

If fillStyle1 UB[nFillBits]

Fill 1 Style

LineStyle

If lineStyle UB[nLineBits]

Line Style

FillStyles

If newStyles FILLSTYLEARRAY

Array of fill styles

LineStyles

If newStyles LINESTYLEARRAY

Array of line styles

 

 

Shape Record Type 2

 

Field

Type

Comment

TypeFlag

UB[1] = 1

This is an edge record

EdgeRecord

EDGERECORD

Line or curve edge record

 

 

Type 0 defines the end of the shape record array.  Type 1 defines changes in line style, fill style, position, or a new set of styles.  Type 2 defines a straight or curved edge.  The first bit in a shape record is a type flag.  A 0 corresponds to a non-edge record, and a 1 corresponds to an edge record.  Looking at the first bit of our first shape record, we see that it is not an edge record.  Now we must look at the next 5 bits which are all flags which tell us what is to follow.  If all of the 5 bits are 0, then that is a type0 shape record and defines the end of the array of shape records.

 

25 C9 92 0D 21

 

 

 

 


0010 0101  1100 1001  1001 0010  0000 1101  0010 0001

 

0 = 0 = non edge record

01001 = 5 flags  line style flag is true, and move to flag is true

 

Since the move to flag is true, the next 5 bits are the nMoveToBits field.  This value is 14 so the next two fields which are the moveDeltaX, and the moveDeltaY are of size 14.  These are unsigned numbers.

 

01110 = nMoveToBits

01001100100100 = 4900 (TWIPS) = 245 pixels = moveDeltaX

00011010010000 = 1680 = 84 pixels = moveDeltaY

 

Since the line style flag is true, the next field is a nLineBits = 1 bit field representing the line style.  This field is equal to 1.  What exactly does this mean? It means that the line style for the line to follow is the first one in the line style array.

 

1 = 1 = line style

 

Now for the rest of the shape records:

 

ED 48 87 65 30 3B 6D E1 D8 B4 00 00

 

 

 

 


1110 1101 0100 1000 1000 0111 0110 0101 0011 0000 0011 1011 0110 1101 1110 0001 1101 1000 1011 0100 0000 0000 0000 0000

 

The next shape record begins with a 1 so it is an edge record.  There are two types of edge records.  Here are the file descriptions:

 

Edge Record Type 0 (Curved)

 

Field

Type

Comment

EdgeFlag

UB[1] = 0

Curved edge - always 0

NumBits

nBits = UB[4] + 2

Number of bits per value

ControlDeltaX

SB[nBits]

X control point change

ControlDeltaY

SB[nBits]

Y control point change

AnchorDeltaX

SB[nBits]

X anchor point change

AnchorDeltaY

SB[nBits]

Y control point change

 

Edge Record Type 1 (Straight)

 

Field

Type

Comment

EdgeFlag

UB[1] = 1

Straight edge - always 1

NumBits

nBits = UB[4] + 2

Number of bits per value

GeneralLineFlag

lineFlag = UB[1]

General Line equals 1

DeltaX

If lineFlag = 1 SB[nBits]

X delta

DeltaY

If lineFlag = 1 SB[nBits]

Y delta

VertLineFlag

If lineFlag = 0 vertFlag = SB[1]

Vertical Line equals 1

DeltaX

If vertFlag = 0 SB[nBits]

X delta

DeltaY

If vertFlag = 1 SB[nBits]

Y delta

 

 

The next bit indicates if it is a straight or curved edge.  It is a 1 which stands for a straight edge.  The next 4 bits indicate the size of any delta fields which follow.  The formula for the nbits value is 2 + whatever the value of that 4 bit field.  In this case, the value of nbits is 13.  Following the nbit field is a 1-bit line flag.  This indicates whether the line being described is a general line or horizontal/vertical line.  The value of 0 corresponds to a hor/vert line, so the next bit is a vertFlag field and indicates whether the line is horizontal or vertical.  The value of the bit is 1 which corresponds to a vertical line.  The next field for a vertical line is the signed DeltaY field which is nbits = 13 bits long.  The value corresponds to 116 pixels.  That is the end of the shape record.

 

1 = 1 = edge record

1 = 1 = straight edge

1011 = 11 + 2 = 13 = nbits

0 = 0 = hor/vert line

1 = 1 = vertical line

0100100010000 = 2320 TWIPS = 116 pixels = DeltaY

 

The next three records are very similar to the last one:

 

1 = 1 = edge record

1 = 1 = straight edge

1011 = 11 + 2 = 13 = nbits

0 = 0 = hor/vert line

0 = 0 = horizontal line

1010011000000 = -2880 TWIPS (2’s complement number) = -144 pixels = DeltaX

 

1 = 1 = edge record

1 = 1 = straight edge

1011 = 11 + 2 = 13 = nbits

0 = 0 = hor/vert line

1 = 1 = vertical line

1011011110000 = -2320 TWIPS = -116 pixels = DeltaY

 

1 = 1 = edge record

1 = 1 = straight edge

1011 = 11 + 2 = 13 = nbits

0 = 0 = hor/vert line

0 = 0 = horizontal line

0101101000000 = 2880 TWIPS = 144 pixels = DeltaX

 

Finally, the last shape record begins with a 0 which means it is not an edge record.  Furthermore all of it’s flag bits are equal to 0 which means that it is the last shape record and we are through with our shape record array. 

 

0 = 0 = non-edge record

000000 = flags (since they are all 0, this is the end of the shape record array

 

Since we are done with our structure, we must now fill our last byte with 0’s to keep byte aligned. 

 

000000 = filled 0’s

 

We are also done with our shape with style since the shape record array is the last element of the shape with style.  Since we are already byte aligned, we can go on to our next tagged data block. 

 

       The tag ID of the block is equal to 26 which corresponds to a placeObject2.  The length field has a value of 6 so the length of the data block is 6 bytes.

 

0x8606         0x0686       0000 0110 1000 0110

 

0000011010 = 26 = tag ID = placeObject2

000110 = 6 = length

 

06 01 00 01 00 00

 

 

 


0000 0110 0000 0001 0000 0000 0000 0001 0000 0000 0000 0000

 

Here is the file description of the placeObject2:

 

Field

Type

Comment

Header

RECORDHEADER

Tag ID = 26

PlaceFlagsReserved

UB[2]

Reserved Flags

PlaceFlagHasName

UB[1]

Has name

PlaceFlagHasRatio

UB[1]

Has ratio

PlaceFlagHasColorTransform

UB[1]

Has color transform

PlaceFlagHasMatrix

UB[1]

Has matrix

PlaceFlagHasCharacter

UB[1]

Places a character

PlaceFlagMove

UB[1]

 

Depth

UI16

Depth of character

CharacterId

If PlaceFlagHasCharacter = 1 UI16

ID of character to place

Matrix

If PlaceFlagHasMatrix = 1 MATRIX

Transform matrix data

ColorTransform

If PlaceFlagHasColorTransform = 1 CXFORM

Color transform data

Ratio

If PlaceFlagHasRatio = 1 UI16

 

Name

If PlaceFlagHasName = 1 STRING

Name of character

 

The first 8 bits of the body are all flags indicating what is to follow.  A 1 in the 6th bit indicates that the body has a transform matrix, and the 1 in the 7th bit indicates that the object to be placed has a character ID.  

 

00000110         body has a transform matrix and object has a character ID

 

Following the flags is a 16-bit unsigned integer which indicates the depth of the character.  In this case the depth is 1 which makes sense since the rectangle is the only object in the movie.

 


0x0100           0x0001        depth = 1

 

Since the object has a character ID, the next field in the body is the unsigned 16-bit ID.  Being the only object in the movie, the ID of the rectangle is 1.

 

0x0100           0x0001        character ID = 1

 

The final field for this placeObject2 is the transform matrix.  Here is the file description:

 

Field

Type

Comment

HasScale

hasScale = UB[1]

Has scale values if equal to 1

NscaleBits

If hasScale nScaleBits =UB[5]

Bits in each scale value field

ScaleX

If hasScale FB[nScaleBits]

X scale value

ScaleY

If hasScale FB[nScaleBits]

Y scale value

HasRotate

hasRotate = UB[1]

Has rotate and skew values if equal to 1

NrotateBits

If hasRotate nRotateBits = UB[5]

Bits in each rotate value field

RotateSkew0

If hasRotate FB[nRotateBits]

First rotate and skew value

RotateSkew1

If hasRotate FB[nRotateBits]

Second rotate and skew value

NtranslateBits

nTranslateBits = UB[5]

Bits in each translate value field

TranslateX

SB[nTranslateBits]

X translate value

TranslateY

SB[nTranslateBits]

Y translate value

 

Since this shape has no transform information, the matrix is empty.  All of its flag bits have values of zero.  This is not super efficient but it is valid.

 

0x00            completely empty matrix with leftover bits filled

 

Since we are done with our placeObject2, let’s take a look at our next tag.

 


0x4000           0x0040      0000 0000 0100 0000

 

tag ID = 1 = showFrame

length = 0

 

We see that the tag is an instruction to show the frame.  A showFrame has no body.  Its length is 0, so we move on to the next tag.

 

0x0000           0x0000        0000 0000 0000 0000

 

tag ID = 0 = end

length = 0

 

We have reached the end tag which signals the end of our .swf file!!!!!!!!!!

(10)三相三绕组变压器的建模仿真 建立了三相三绕组变压器组的Simulink仿真模型,通过实例进行了仿真计算。 阅读详情

相关推荐

fws转cws,swf触解压工具

可将swf文件,从fws编码转换成cws编码,方便在硕思中查看脚本或资源.

SWF游戏软件逆向基础知识1

第1节 在遇到SWF文件,游戏资源分析用得到 swf文件的整体结构是 header + body的组成。 文件的开始是一个[文件头] 它的结构如下: 字节 名称 说明 1 Signature “F”表示非加密格式,“C”表示加密格式 1 Signature “W”无特殊意义 1 Signature “S”无特殊意义 1 Version 版本号,它表示对应

蘑菇哥 1050

flash file format specification version 19

swf 文件格式 说明 版本 19 共248页 ,该文档描述swf文件的二进制数据构成.

Macromedia Flash文件格式(SWF)详细说明书(现归Adobe公司所有) 1、2章

本文根据“Macromedia Flash文件格式(SWF)详细说明书”翻译而来,其原版归Adobe公司所有,特此声明。---------------------------------------Macromedia Flash文件格式(SWF)详细说明书Macromedia Flash文件格式(SWF)(读作“swiff”)是Macromedia Flash播放器在互联网上进行矢量

糖醋舌头 6378

令人敬畏的泰格伍兹 万维钢_使用SwiftUI创建令人敬畏的加载状态

令人敬畏的泰格伍兹 万维钢Creating an intuitive animation is very simple and efficient in Apple’s brand new framework, SwiftUI. Before getting started, check out the video below to get to know what we are about to...

weixin_26638123的博客 283

swf文件格式解析(二)

上一篇教程可能写的有点乱 ,本回合开始之前先做一个概述吧,引用官方白皮书的原文 概述 SWF 文件是由一个文件头,和跟在后面的一系列的标签组成。标签有定义型标签和控 制型标签两类。定义型标签把对象定义为角色存储在字典里,控制型标签操作这些角色并控 制影片的流程。 如下图 上回合已经解析完文件头 本会合接着解析Tag 首先,官方理论知识补充 定义型标签和控制型标...

weixin_30648963的博客 224

播放列表 --- SWF解析学习 笔记(2)

<br /><br /><br /><br /> 播放一个swf文件的一帧,需要以下三个步骤:<br /> <br />1定义需要使用的DefineShape, DefineSprite这种定义型tag;<br />这些tag以及character id 会在解析时存储到字典中。<br />2: 从字典里将定义型tag的character id复制并放到播放列表(display list)中,这就是下一帧要播放的charater id.<br /> <br />3:当这些完成后,使用ShowFrame

wind_breez的专栏 865

win7播放swf文件提示错误的解决方法

 大家都知道swf文件是各种flash动画格式文件,最近有的朋友在播放swf文件的时候却提示错误,这是怎么回事?该怎么解决?,但是今天小编就教大家如何解决播放swf文件提示错的方法。     一、我们按下组合键win+r打开运行,接着在运行输入“gpedit.msc”,点击“确定”即可,如下图所示:     二、接着依次展开“用户配置→管理模板→Windows组件→Internet

车到山前必有路,就是不知在哪里 1133

解决SWF加载报错问题 —以及利用该错误防止盗链

 一个SWF加载另一个SWF时,常会报错,最近研究了主要的报错情况.在剖析报错情况前,先看下我们用的加载代码:AS3代码var loadSwf:Loader = new Loader;    loadSwf.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCom)    loadSwf.load(new 

请移架http://blog.sina.com.cn/u/2765457197 1566

swf文件解析(二) 文件分解及Tag获取

Extensibilit The format is a tagged format, so it can be evolved with new features while maintaining backward compatibility with earlier versions of Flash Player. ///////////////////////////////////

工作ing 2693

swf 解析

引用:http://blog.sina.com.cn/s/blog_6859df370100wtk4.html 概述 SWF 文件是由一个文件头,和跟在后面的一系列的标签组成。标签有定义型标签和控 制型标签两类。定义型标签把对象定义为角色存储在字典里,控制型标签操作这些角色并控 制影片的流程。 如下图 上回合已经解析完文件头 本会合接着解析Tag 首先,官方理论知识补充 定义型...

weixin_33859231的博客 423

swfobject2.2参数详解

swfobject2.2参数详解(swfobject.embedSWF) swfobject.embedSWF(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn); 各个参数的含义: 1--> swfUrl

笨鱼@Blog 2028

swf tag 学习笔记

Swf 6 版本tag功能表            Control Tags

dingding1984的专栏 1038

swf 头标签tag

<br />从swfdec工程COPY出来的,对解析swf头文件有帮助.<br /><br />static struct tag_func_struct tag_funcs[] = {<br />  [SWFDEC_TAG_END] = {"End", tag_func_end, SWFDEC_TAG_DEFINE_SPRITE },<br />  [SWFDEC_TAG_SHOWFRAME] = {"ShowFrame", tag_func_show_frame, SWFDEC_TAG_DEFINE_S

thinkvd dvd and video converter 1282

swf文件解析(一) 文件header部分解析

SWF(shock wave flash)是ADOBE公司的动画设计软件Flash的专用格式。

工作ing 4386

flash脚本语言详细解读

flash脚本语言详细解读 - Go to 跳转到指定的帧     - Play 播放     - Stop 停止     - Toggle High Quality 在高画质和低画质间切换     - Stop All Sounds 停止所有声音的播放     - Get URL 跳转至某个超联结     - FSCommand 发送FSCommand命令     - Load Movie 装...

king5439的专栏 392

(swf file format spec v10)swf文件格式中英文说明书v10,颜色记录,笔记6

最枯燥的部分终于要结束了,马上就要迎来很关键的部分,不过这之前都是后面要深入了解的基础。 RGB color record The RGB record represents a color as a 24-bit red, green, and blue value. RGB颜色记录 RGB颜色记录代表颜色用一个24 bit 的红、绿、蓝的值。 Red UI8 Red colo...

orrin的原创空间 281

flash常见问题集锦,很适合新手哦

如何加载一个SWF文件并控制其位置等相应属性……新建一个空地MC,将它放在主场景中,实体名改为OK,写AS: loadMovie("test.swf", "_root.ok"); 控制这个MC的位置,大小等相对属性(Property)就会影响调入SWF的位置和大小。 setProperty ("mc", _xscale, "****"); setProperty ("mc", _yscal

1万+

量化投资以python为工具.zip

量化投资以python为工具:数据、源代码、习题答案,自己整理的,分享给大家。

上一篇: 设计Public API
下一篇: 忧伤似水
davemin
博客等级 码龄25年 55粉丝 60原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值