Deconstructing Flash Investigating the SWF file format orWhat

  • Slides: 22
Download presentation

Deconstructing Flash “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 my summer holidays”

Introduction • Simon Wistow – Computing BEng • Ian Harries – Supervisor • Iain

Introduction • Simon Wistow – Computing BEng • Ian Harries – Supervisor • Iain Phillips – Second Marker

Flash? • A little bit of History – Future. Splash was originally created by

Flash? • A little bit of History – Future. Splash was originally created by Future. Wave – Future. Wave bought by Macro. Media, Future. Splash renamed “Flash” – Current version is 4. – Flash file format (SWF) was open-sourced in 1998

Flash? • Vector animation format – Shapes and Lines – Bitmaps (JPEGs, PNGs) –

Flash? • Vector animation format – Shapes and Lines – Bitmaps (JPEGs, PNGs) – Sounds (ADPCMs, MP 3 s) • These are known as objects – analogous to actors, scenery and soundtrack

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

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

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

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

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

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

The idea • I needed – A tool for manipulating Flash files – A

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

Why? • Can’t create totally dynamic content – prevents uses on database applications •

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

The Competition • Macromedia Generator – Limited • Modification not creation – Expensive(very) •

The Competition • Macromedia Generator – Limited • Modification not creation – Expensive(very) • And you still need Flash Authoring tool – Slow – Resource Intensive

The Competition • Ming – Enemy of flash – PHP based – Unfinished, only

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

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

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

The Competition • Middlesoft SDK – Finished near project end – Limited to C++

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

How • File: : Binary – Perl module for binary manipulation of files •

How • File: : Binary – Perl module for binary manipulation of files • de-compilation/ reverse engineering – Finding errors in the released specification

How • creation of abstract Flash library – Object Structure • creation of SWF

How • creation of abstract Flash library – Object Structure • creation of SWF generation library – XS wrapping of libswf

Achievements File: : Binary SWF Parser Flash Object SWF Writer

Achievements File: : Binary SWF Parser Flash Object SWF Writer

Problems • Specification was wrong – Required experimentation • Very few knowledgeable people –

Problems • Specification was wrong – Required experimentation • Very few knowledgeable people – NDAs – Lack of community • Text representation • libswf very unstable – Author unavailable

Future Work • Text replacement • Interface Object with SWF generation library • More

Future Work • Text replacement • Interface Object with SWF generation library • More Input/Output filters – XML – SVG

Design Evaluation • Structure is sound • Perl was appropriate – good support from

Design Evaluation • Structure is sound • Perl was appropriate – good support from user base – hundreds of pre-built libraries – performance issues

Applications • Broadband access: richer interfaces • Database driven flash websites • batch generation

Applications • Broadband access: richer interfaces • Database driven flash websites • batch generation • library for flash authoring application

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

Conclusions • A lot has been achieved – but things still to do • Interest from industry and community • Many real-world applications • Development will continue