“investigating the swf file format” -or- “what i did in my summer holidays” deconstructing...

22

Upload: oswald-baldwin

Post on 04-Jan-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash
Page 2: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

“Investigating the SWF file format”

-or-“What I did in mysummer holidays”

Deconstructing Flash

Page 3: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Introduction

• Simon Wistow– Computing BEng

• Ian Harries– Supervisor

• Iain Phillips– Second Marker

Page 4: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Flash?

• A little bit of History– FutureSplash was originally

created by FutureWave– FutureWave bought by MacroMedia,

FutureSplash renamed “Flash”– Current version is 4.– Flash file format (SWF) was

open-sourced in 1998

Page 5: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Flash?

• Vector animation format– Shapes and Lines– Bitmaps (JPEGs, PNGs)– Sounds (ADPCMs, MP3s)

• These are known as objects– analogous to actors, scenery and

soundtrack

Page 6: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Flash

• Keeping with the film analogy– SWF format is a script to describe and

control the ‘actors’.– Divided into frames– frames divided into tags

• these define and control objects

– 34 different tags, using 17 data-types

Page 7: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Flash?

• Web Oriented– Highly compressed– Plug-in– Pseudo-Streaming

Page 8: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Flash?

• Scriptable– Control Events, within movie– Reactive not truly dynamic

Page 9: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

The idea

• I needed– A tool for manipulating Flash files– A way of creating Flash files from

scratch– Some way of converting between

formats• Abstract Representation

Page 10: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Why?

• Can’t create totally dynamic content– prevents uses on

database applications

• Because it’s complicated– it can’t be used within other applications,

the facilities don’t exist– You can't do some things with the existing

interface

• Storing SWF binary is not always appropriate

Page 11: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

The Competition

• Macromedia Generator– Limited

• Modification not creation

– Expensive(very)• And you still need Flash Authoring tool

– Slow– Resource Intensive

Page 12: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

The Competition

• Ming– Enemy of flash– PHP based– Unfinished, only generates

Page 13: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

The Competition

• XML-FLASH– Java Based– Limited to conversion into and out of

XML– Unfinished

Page 14: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

The Competition

• Middlesoft SDK– Finished near project end– Limited to C++ on Windows– Complicated– Restrictive Licensing– Creation Only

Page 15: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

How

• File::Binary– Perl module for binary

manipulation of files

• de-compilation/reverse engineering– Finding errors in the

released specification

Page 16: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

How

• creation of abstract Flash library– Object Structure

• creation of SWF generation library– XS wrapping of libswf

Page 17: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Achievements

SWFParser

FlashObject

SWFWriter

File::Binary

Page 18: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Problems

• Specification was wrong– Required experimentation

• Very few knowledgeable people– NDAs– Lack of community

• Text representation• libswf very unstable

– Author unavailable

Page 19: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Future Work

• Text replacement• Interface Object with

SWF generation library• More Input/Output filters

– XML– SVG

Page 20: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Design Evaluation

• Structure is sound• Perl was appropriate

– good support from user base– hundreds of pre-built libraries– performance issues

Page 21: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Applications

• Broadband access:richer interfaces

• Database driven flash websites• batch generation• library for flash authoring

application

Page 22: “Investigating the SWF file format” -or- “What I did in my summer holidays” Deconstructing Flash

Conclusions

• A lot has been achieved– but things still to do

• Interest from industry and community

• Many real-world applications• Development will continue