Material design spinner for apps powered by Starling and Feathers
Switch branches/tags
Nothing to show
Clone or download
Latest commit 83f6046 Jan 25, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build Initial commit Jan 23, 2017
source Initial commit Jan 23, 2017
swc Initial commit Jan 23, 2017
LICENSE Initial commit Jan 23, 2017
README.md Update README.md Jan 24, 2017
spinner.gif Initial commit Jan 23, 2017

README.md

Material design spinner extension for Feathers

A simple animated display object for apps powered by Starling and Feathers.

Spinner

Getting started

You can either use a pre-compiled SWC file or the original source file and texture from the source directory. The assets directory should be in the same level as your project's src directory. Alternatively, you can update the path to the embedded texture.

You will also need to enable depthAndStencil in your app descriptor XML:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/20.0">
	...
	<initialWindow>
		...
		<depthAndStencil>true</depthAndStencil>
		...
    </initialWindow>
    ...
</application>

Usage

The spinner can be used as any other Starling DisplayObject.

import feathers.extensions.MaterialDesignSpinner;

private var mSpinner:MaterialDesignSpinner;
...

mSpinner = new MaterialDesignSpinner();
addChild(mSpinner);

You can change the color to your liking:

mSpinner.color = 0x00BCD4;

The animation starts automatically once it is displayed on the stage, and it is stopped when removed. You can pass in a custom Juggler to manage the animation by yourself; Starling.juggler is used by default.

var myJuggler:Juggler = new Juggler();

mSpinner.juggler = myJuggler;

The spinner extends FeathersControl which means you are able to use it in your Feathers layouts.

mSpinner.layoutData = new AnchorLayoutData(NaN, NaN, NaN, NaN, 0, 0);

Re-compile SWC

If you edit the texture and wish to re-compile the SWC file, you can use the provided ANT build script. Make sure to edit build.properties to match your local environment and execute ant from the build directory.

Requirements

Credits

The work is based on RadialProgressBar created by Jakub Wagner. Modifications have been made by Marcel Piestansky.

Distributed under Apache License, version 2.0.