000 SWF File Format - ME3Tweaks

1y ago
9 Views
2 Downloads
1.97 MB
284 Pages
Last View : 16d ago
Last Download : 3m ago
Upload by : Lee Brooke
Transcription

SWF File Format Specification Version 9

Copyright 2006-2008 Adobe Systems Incorporated. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without written approval from Adobe Systems Incorporated. Notwithstanding the foregoing, a person obtaining an electronic version of this manual from Adobe may print out one copy of this manual provided that no part of this manual may be printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation, commercial purposes, such as selling copies of this documentation or providing paid-for support services. Trademarks Adobe, ActionScript, Flash, Flash Media Server, Flash Player, and PostScript are either registered trademarks or trademarks of Adobe Systems Incorporated and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Adobe Systems Incorporated or other entities and may be registered in certain jurisdictions including internationally. No right or license is granted to any Adobe trademark. Third-Party Information This guide contains links to third-party websites that are not under the control of Adobe Systems Incorporated, and Adobe Systems Incorporated is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Adobe Systems Incorporated provides these links only as a convenience, and the inclusion of the link does not imply that Adobe Systems Incorporated endorses or accepts any responsibility for the content on those thirdparty sites. No right, license or interest is granted in any third party technology referenced in this guide. NOTICE: THIS PUBLICATION AND THE INFORMATION HEREIN IS FURNISHED “AS IS”, IS SUBJECT TO CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY KIND (EXPRESS, IMPLIED, OR STATUTORY) WITH RESPECT TO THIS PUBLICATION, AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSES, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. Adobe Systems Incorporated Published June 2007, April 2008

Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 SWF file format specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 The SWF header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 SWF file structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Tag format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Definition and control tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Tag ordering in SWF files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 The dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Processing a SWF file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 File compression strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Chapter 1: SWF File Format 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 ActionScript 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 ActionScript 2.0 byte codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Class linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Binary data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Text and fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Scene support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Chapter 2: SWF File Format 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Bitmap filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Blend modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Bitmap caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Enhanced strokes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Enhanced gradients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Advanced text rendering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 9-slice scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 On2 Truemotion VP6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Screen Video V2 bitstream codec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 SWF file attributes and metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 ImportAssets2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3

Chapter 3: SWF File Format 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 ActionScript extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 New video format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Runtime ActionScript controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 SetTabIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 ClipEventConstruct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Small text rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Chapter 4: SWF File Format 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 File compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Unicode support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Named anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ActionScript extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 New audio and video formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 The FLV file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Improved documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Chapter 5: Basic Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Coordinates and twips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Integer types and byte order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Fixed-point numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Floating-point numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Encoded integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Bit values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Using bit values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 String values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Language code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 RGB color record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 RGBA color with alpha record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ARGB color with alpha record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Rectangle record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 MATRIX record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Color transform record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Color transform with alpha record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Chapter 6: The Display List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 Clipping layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Using the display list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Display list tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 PlaceObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 PlaceObject2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4 Contents

PlaceObject3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ClipEventFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RemoveObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RemoveObject2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ShowFrame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 64 66 66 66 Chapter 7: Control Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 SetBackgroundColor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 FrameLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 Protect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ExportAssets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ImportAssets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 EnableDebugger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 EnableDebugger2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 ScriptLimits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 SetTabIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 FileAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73 ImportAssets2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 SymbolClass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75 Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76 DefineScalingGrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78 DefineSceneAndFrameLabelData. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Chapter 8: Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 SWF 3 action model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 SWF 3 actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 SWF 4 action model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 The program counter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 SWF 4 actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Stack operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Arithmetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Numerical comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Logical operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 String manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Type conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Control flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Movie control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106 SWF 5 action model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 SWF 5 actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108 ScriptObject actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 Contents 5

Type actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Math actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Stack operator actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121 SWF 6 action model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 SWF 6 actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 SWF 7 action model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 SWF 7 actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 SWF 9 action model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 SWF 9 actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Chapter 9: Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Shape overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Shape example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Shape structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Fill styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Line styles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Shape structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Shape records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Edge records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Shape tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Chapter 10: Gradients. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Gradient transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Gradient control points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Gradient structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 GRADIENT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 FOCALGRADIENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 GRADRECORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Chapter 11: Bitmaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 DefineBits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161 JPEGTables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 DefineBitsJPEG2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 DefineBitsJPEG3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 DefineBitsLossless . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 DefineBitsLossless2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Chapter 12: Shape Morphing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 DefineMorphShape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 DefineMorphShape2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Morph fill styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 MORPHFILLSTYLEARRAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 6 Contents

MORPHFILLSTYLE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Morph gradient values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 MORPHGRADIENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 MORPHGRADRECORD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Morph line styles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 MORPHLINESTYLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 MORPHLINESTYLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 MORPHLINESTYLE2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Chapter 13: Fonts and Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Glyph text and device text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Static text and dynamic text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182 Glyph text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 Glyph definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 The EM square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184 Converting TrueType fonts to SWF glyphs . . . . . . . . . . . . . . . . . . . .184 Kerning and advance values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 Advanced text rendering engine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 DefineFont and DefineText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Static glyph text example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Font tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 DefineFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 DefineFontInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 Western indirect fonts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 Japanese indirect fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 DefineFontInfo2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 DefineFont2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193 DefineFont3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 DefineFontAlignZones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198 Kerning record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 DefineFontName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 Static text tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 DefineText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 Text records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Dynamic text tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 DefineEditText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 CSMTextSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Chapter 14: Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 Event sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 DefineSound. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 StartSound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214 StartSound2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214 Sound styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215 Contents 7

Streaming sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 SoundStreamHead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 SoundStreamHead2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 SoundStreamBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Frame subdivision for streaming sound . . . . . . . . . . . . . . . . . . . . . . . 221 ADPCM compression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 ADPCM sound data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224 MP3 compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 MP3 sound data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 MP3 frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Nellymoser compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229 Chapter 15: Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Button states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Button tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232 Events, state transitions, and actions . . . . . . . . . . . . . . . . . . . . . . . . . . .232 Button tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234 Button record. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234 DefineButton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235 DefineButton2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 DefineButtonCxform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 DefineButtonSound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239 Chapter 16: Sprites and Movie Clips . . . . . . . . . . . . . . . . . . . . . . 241 Sprite names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .242 DefineSprite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243 Chapter 17: Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Sorenson H.263 Bitstream Format . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Summary of differences from H.263 . . . . . . . . . . . . . . . . . . . . . . . . .246 Video packet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246 Macro block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248 Block data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Screen video bitstream format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Block format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Video packet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Image block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252 Screen Video V2 bitstream format . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252 Video Packet V2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253 Image Block V2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 Image format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 Image block diff position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Image block prime position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 8 Contents

On2 Truemotion VP6 bitstream format. . . . . . . . . . . . . . . . . . . . . . . . . 256 VP6 FLV video packet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 VP6 FLV Alpha video packet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 VP6 SWF video packet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 VP6 SWF Alpha video packet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 SWF video tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 DefineVideoStream. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 VideoFrame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261 Chapter 18: Binary data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 DefineBinaryData. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Appendix A: SWF Uncovered: A Simple SWF File Dissected . 265 Appendix B: Reverse index of tag values . . . . . . . . . . . . . . . . . . . 281 Contents 9

10 Contents

Introduction SWF file format specification The SWF file format (pronounced “swiff ”) delivers vector graphics, text, video, and sound over the Internet and is supported by Adobe Flash Player software. The SWF file format is designed to be an efficient delivery format, not a format for exchanging graphics between graphics editors. It is designed to meet the following goals: On-screen display—The format is primarily intended for on-screen display and supports anti-aliasing, fast rendering to a bitmap of any color format, animation, and interactive buttons. Extensibility—The format is a tagged format, so it can be evolved with new features while maintaining backward compatibility with earlier versions of Flash Player. Network delivery—The format can travel over a network with limited and unpredictable bandwidth. The files are compressed to be small and support incremental rendering through streaming. The SWF file format is a binary format and is not human readable like HTML. The SWF file format uses techniques such as bit-packing and structures with optional fields to minimize file size. Simplicity—The format is simple so that Flash Player is small and easily ported. Also, Flash Player depends upon a limited set of operating system features only. File independence—The files display without dependence on external resources such as fonts. Scalability—The files work well on limited hardware, and can take advantage of better hardware when it is available. This ability is important because computers have different monitor resolutions and bit depths. Speed—The files render with quick, high quality. Scriptability—The format includes tags that provide sequences of byte codes to be interpreted by a stack machine. The byte codes support the ActionScript language. Flash Player provides a runtime ActionScript object model that allows interaction with drawing primitives, ser

SWF file format specification The SWF file format (pronounced "swiff") delivers vector graphics, text, video, and sound over the Internet and is supported by Adobe Flash Player software. The SWF file format is designed to be an efficient delivery format, not a format for exchanging graphics between graphics editors.

Related Documents:

The SWF file format uses 8-bit, 16-bit, 32-bit, 64-bit, signed, and unsigned integer types. All integer values are stored in the SWF file by using little-endian byte order: the least significant byte is stored first, and the most significant byte is stored last, in the same way as the Intel x86 architecture. The bit order within bytes in the

to SWF files as Flash Player files, not Shockwave Flash files. Flash converts your movie data into a highly compact and efficient form in an SWF file; the SWF file contains only the information needed for playback of your movies. In contrast, when you save your movies by choosing File Save (or File Save As), they are saved with the .flasuffix.

Winch NOVA Electric wire rope hoists 03 30 CraneKit Crane components Controlling/ Monitoring SWF is one of the leading global players in crane and hois ting equipment. At all times and in all places, SWF applies to the highest and the most demanding standards – those of our customers. Our customers are

Street/7th Ave to SWF via ARC, Main Line/Bergen County Line, an upgraded Port Jervis Line and new alignment from CP Hudson Jct. on abandoned line north and east to the SWF Terminal via SWF North Interchange. Includes a new commuter park-ride lot at the Interchange (if used for satellite airport parking, additional shuttle

depleted) with a national Sovereign Wealth Fund (SWF), primarily to whittle down the controversies hunting the ECA's legality and to put in place a more robust plan to strengthen the Nigerian economy. This paper is therefore intended to explore the usefulness of the Sovereign Wealth Fund (SWF) initiative as a tool for strengthening and diversify

SWF Krantechnik GmbH Boehringer Str.4 D-68307 Mannheim Phone 49(0)621.78990- Fax 49(0)621.78990-100 www.swfkrantechnik.com info@swfkrantechnik.com 1.6 DU 08 CRANE DRIVES SPECIFICATION

pas de neurones Arbre pas de neurones C.elegans 302 neurones C.elegans 302 neurones Mouche 1 000 000 neurones Mouche 1 000 000 neurones Rat 1 000 000 000 n. Rat 1 000 000 000 n. Humain 10 000 000 000 000 n. Humain 10 000 000 000 000 n. Le cerveau génère des mouvements ( comportement)

banking services will face stiff competition from innovative startups, telecoms organisations, retailers, Silicon Valley companies and others. Our latest CBI/PwC survey found that 71% of banks see competition coming from new entrants (the highest since the Survey began in December 2006). This scenario is bearable only for a small number of sprawling banks that derive their revenue primarily .