Giter Site home page Giter Site logo

flump's Introduction

Flump

Flump reads specially-constructed .fla and .xfl files saved by Flash and extracts animations and textures to allow them to be recreated in the GPU. Animations created in Flump's style will use far less texture memory per frame of animation than an equivalent flipbook animation, allowing for more expressive animations on mobile platforms. Runtimes have been written for Starling, Sparrow, Flambe and PlayN.

Creating a movie for Flump

  1. Install the latest version of Adobe AIR
  2. Install the Flump AIR app
  3. Create a .fla in Flash CS 5, 5.5, or 6
  4. Create a new item in the library and draw a shape in its canvas
  5. Right-click on the item, select its properties, tick the Export for ActionScript and Export in frame 1 checkboxes and change its base class to flash.display.Sprite
  6. Create a second item in the library, and drag the first into it.
  7. Add additional frames in the second item, and create a classic tween moving the first item around in those frames.
  8. Save the file and publish it as a swf.
  9. Open the Flump app and change its import directory to the directory containing the .fla and .swf files. The .fla file should appear in the list of source files.
  10. Select the .fla file and click 'Preview'. The tween you created in step 6 should start playing back in a preview window.

Details of Flump's conversion

This walks through Flump's process when it exports a single .fla/.swf file combo.

Texture creation

For each item in the document's library that is exported for ActionScript and extends flash.display.Sprite, Flump creates a texture. To do so, it instantiates the library's exported symbol from the .swf file and renders it to a bitmap.

All of the created bitmaps for a Flash document are packed into texture atlases, and xml is generated to map between a texture's symbol and its location in the bitmap.

Animation creation

For each item in the document's library that extends flash.display.MovieClip and isn't a flipbook (explained below), Flump creates an animation. It checks that for all layers and keyframes, each used symbol is either a texture, an animation, or a flipbook. Flump animations can only be constructed from the flump types.

Flipbook creation

For animations that only contain a few frames, a flipbook may be more appropriate. To create one, add a new item to the library and name the first layer in the created item flipbook. When exporting, flump will create a bitmap for each keyframe in the flipbook layer. In playback, flump will display those bitmaps at the same timing.

Compatibility

Flump works with Flash CS 5, 5.5, and 6

Reporting Bugs

To get AIR to report errors, you need to run Flump with the AIR debugger (adl). Assuming you have the free Flex SDK and ant installed on your machine:

  1. Build the flump runtime

     flump/runtime$ ant -Dflexsdk.dir=/path/to/flex maven-deploy
    
  2. Build the flump exporter

     flump/exporter$ ant -Dflexsdk.dir=/path/to/flex swf
    
  3. Run the flump exporter

     flump/exporter$ /path/to/flex/bin/adl etc/airdesc.xml dist
    

flump's People

Contributors

aduros avatar deadmoose avatar groves avatar roguenet avatar tconkling avatar thejustinwalsh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.