Adobe Flash Professional Commands for Exporting, Optimizing and Publish HTML5 Canvas documents for SpringRoll
JavaScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.travis.yml
AlphaSplitter.zip
Gruntfile.js
LICENSE
README.md
package.json

README.md

SpringRoll Flash Toolkit Build Status devDependency Status GitHub version

Adobe Flash Professional Commands for Exporting, Optimizing and Publish HTML5 Canvas document. While these commands are exclusive to using SpringRoll, there are a couple helper function for use with certain SpringRoll features.

Installation

Usage

All the scripts are runable from the Commands menu within Flash Professional.

Exporting/Export BitmapMovieClip

Create JSON and spritesheet useable for springroll.easeljs.BitmapMovieClip. To use, select a MovieClip or MovieClips from the library to export then run the command.

Exporting/Export Frame Label Sequence

Export a sequence of PNGs based on the frame labels. Useful if you're creating spritesheets using TexturePacker. To use, run the command on the current timeline which contains frame labels.

Optimizing/Clear Extra Blank Keyframe

Remove all redundant clear keyframes. In earlier versions of CC and CC 2014, blank keyframes added more filesize and produced playback issues in CreateJS. To use, run the command on the current timeline.

Optimizing/Filter Finder

Generate a report of all the MovieClips within the current project which contain filters (Color transforms, Drop shadows, etc). This is useful for tracking down and remove filters which harm performance. To use, simply run the command.

Optimizing/HTML5 Canvas Size Report

Generate a report of the output size of all the assets in an HTML5 Canvas published document. To use, publish the current document and then run the command.

Optimizing/Optimize Graphics

Remove all unused graphic frame from a selected graphic symbol in the library. To run, select a graphic from the library and then run the command.

Optimizing/Optimize Keyframe

Reduce the number of keyframes by eliminating keyframes that are similar. To run, navigate to a timeline of frames you would like to remove, then run the command. There are two values "Move Tolerance" and "Scale Tolerance". If two keyframes contain a symbol within those tolerance the second keyframe is removed.

Timeline/Animation Event Label

Create animation event labels on the timeline which work with springroll.easeljs.Animator. To use, select a range of frames on the current timeline and run the command. This will prompt for an event name to create a start and end label for use with Animator. For instance, "idle" event name will create "idle" and "idle_stop" labels. Animator has two types of event labels, stop (stop at the end) and loop (return to the beginning and keep playing).

Utilities/Copy Layers To Bitmap

This command combines all layers on the current timeline non-destructively into a single bitmap. All the layers are guided, locked and hidden. Running the script again will undo this convert and give you the normal vector layers.

HTML5 Canvas Post Publish

This is not a command. This script automatically is invoked whenever an HTML5 Canvas FLA is published. It does two things: first, a JSON file is created of the lib.properties (which contains the manifest, size, framerate, etc) of the current document. Also, the output file is optimize to better work with a JavaScript minification tool (e.g., Uglify).

Building Toolkit

Dependencies

To rebuild the extension for Flash, you need to have Node and Grunt installed.

Download and install the Adobe Exchange Packager (you will need to login to the Adobe Exchange to be able to download the application).

Create Environment Settings

Create a settings.json file within the FlashToolkit project folder with the following format:

{
	"packager": "/Applications/Adobe Exchange Packager.app/Contents/Resources/macosx/ZXPSignCmd",
	"keystore": "/Users/username/Documents/MySignedCertificate.p12",
	"storepass": "myCertPassword"
}

You may need to make the ZXPSignCmd file executable, as it might not have the needed permissions by default.

Building the ZXP

Rebuild the Toolkit by running the default Grunt task:

grunt

License

Copyright (c) 2015 CloudKid

Released under the MIT License.