Skip to content

Material design spinner for apps powered by Starling and Feathers

License

Notifications You must be signed in to change notification settings

marpies/material-design-spinner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published