Swf File Format Specification Version 19
Total Page:16
File Type:pdf, Size:1020Kb
SWF FILE FORMAT SPECIFICATION VERSION 19 Copyright © 2006-2012 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, Adobe Media Server, Flash Player, PostScript, and XMP 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 third- party 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 2012 Contents Introduction ............................................................................................................................................................. 12 Chapter 1: Basic Data Types .................................................................................................................................... 14 Coordinates and twips ......................................................................................................................................... 14 Integer types and byte order ............................................................................................................................... 14 Fixed-point numbers ........................................................................................................................................... 15 Floating-point numbers ....................................................................................................................................... 16 Encoded integers ................................................................................................................................................. 16 Bit values ............................................................................................................................................................. 17 Using bit values .................................................................................................................................................... 18 String values ........................................................................................................................................................ 19 Language code ..................................................................................................................................................... 20 RGB color record ................................................................................................................................................. 21 RGBA color with alpha record ............................................................................................................................. 21 ARGB color with alpha record ............................................................................................................................. 21 Rectangle record ................................................................................................................................................. 22 MATRIX record..................................................................................................................................................... 22 Color transform record ........................................................................................................................................ 24 Color transform with alpha record ...................................................................................................................... 25 Chapter 2: SWF Structure Summary ................................................................................................................. 27 The SWF header .................................................................................................................................................. 27 SWF file structure ................................................................................................................................................ 28 Tag format ........................................................................................................................................................... 29 Definition and control tags .................................................................................................................................. 29 Tag ordering in SWF files ..................................................................................................................................... 30 The dictionary ...................................................................................................................................................... 30 Processing a SWF file ........................................................................................................................................... 32 File compression strategy .................................................................................................................................... 32 Summary .............................................................................................................................................................. 32 Chapter 3: The Display List ...................................................................................................................................... 33 Clipping layers ..................................................................................................................................................... 33 Using the display list ............................................................................................................................................ 33 Display list tags .................................................................................................................................................... 34 PlaceObject ...................................................................................................................................................... 34 PlaceObject2 .................................................................................................................................................... 35 PlaceObject3 .................................................................................................................................................... 38 Color Matrix filter ............................................................................................................................................ 42 Convolution filter ............................................................................................................................................. 42 Blur filter .......................................................................................................................................................... 44 Drop Shadow filter........................................................................................................................................... 45 Glow filter ........................................................................................................................................................ 46 Bevel filter ....................................................................................................................................................... 46 Gradient Glow and Gradient Bevel filters ....................................................................................................... 47 ClipEventFlags .................................................................................................................................................