Package | com.robertpataki.heartcode |
Class | public class ProgressIndicator |
Inheritance | ProgressIndicator ![]() |
You can use it to
Compatible players:
Method | Defined By | ||
---|---|---|---|
ProgressIndicator(shape:String, density:uint, range:Number, color:Number, radius:uint, frequency:Number, fade:Boolean)
Creates a new preloader animation. | ProgressIndicator | ||
kill():void
Kills the preloader. | ProgressIndicator |
Constant | Defined By | ||
---|---|---|---|
DEFAULT_COLOR : Number = 0x666666 [static] | ProgressIndicator | ||
DEFAULT_DENSITY : uint = 12 [static] | ProgressIndicator | ||
DEFAULT_FADE : Boolean = false [static] | ProgressIndicator | ||
DEFAULT_FREQUENCY : Number = 0.05 [static] | ProgressIndicator | ||
DEFAULT_RADIUS : uint = 14 [static] | ProgressIndicator | ||
DEFAULT_RANGE : Number = 0.8 [static] | ProgressIndicator | ||
DEFAULT_SHAPE : String = ellipse [static] | ProgressIndicator | ||
SHAPE_CIRCLE : String = circle [static] | ProgressIndicator | ||
SHAPE_ELLIPSE : String = ellipse [static] | ProgressIndicator | ||
SHAPE_SQUARE : String = square [static] | ProgressIndicator | ||
SHAPE_STAKE : String = stake [static] | ProgressIndicator | ||
SHAPE_TRIANGLE : String = triangle [static] | ProgressIndicator |
ProgressIndicator | () | Constructor |
public function ProgressIndicator(shape:String, density:uint, range:Number, color:Number, radius:uint, frequency:Number, fade:Boolean)
Creates a new preloader animation.
Parametersshape:String (default = NaN ) — The shape of the preloader bits. The default value is DEFAULT_SHAPE
| |
density:uint (default = NaN ) — Sets the fineness of the preloader. The default value is DEFAULT_DENSITY
| |
range:Number (default = NaN ) — Sets the range of bits to be animated. The default value is DEFAULT_RANGE
| |
color:Number (default = NaN ) — Sets the color of the preloader. The default value is DEFAULT_COLOR
| |
radius:uint (default = NaN ) — The radius of the circle the shapes are drawn around. The default value is DEFAULT_RADIUS
| |
frequency:Number (default = NaN ) — The refreshing frequency of each bit (in seconds). The default value is DEFAULT_FREQUENCY
| |
fade:Boolean (default = NaN ) — If set to true the non-animated bits of the preloader are invisible. This gives the preloader a nice dynamic look. The default value is DEFAULT_FADE
|
See also
kill | () | method |
public function kill():void
Kills the preloader.
DEFAULT_COLOR | Constant |
public static const DEFAULT_COLOR:Number = 0x666666
DEFAULT_DENSITY | Constant |
public static const DEFAULT_DENSITY:uint = 12
DEFAULT_FADE | Constant |
public static const DEFAULT_FADE:Boolean = false
DEFAULT_FREQUENCY | Constant |
public static const DEFAULT_FREQUENCY:Number = 0.05
DEFAULT_RADIUS | Constant |
public static const DEFAULT_RADIUS:uint = 14
DEFAULT_RANGE | Constant |
public static const DEFAULT_RANGE:Number = 0.8
DEFAULT_SHAPE | Constant |
public static const DEFAULT_SHAPE:String = ellipse
SHAPE_CIRCLE | Constant |
public static const SHAPE_CIRCLE:String = circle
SHAPE_ELLIPSE | Constant |
public static const SHAPE_ELLIPSE:String = ellipse
SHAPE_SQUARE | Constant |
public static const SHAPE_SQUARE:String = square
SHAPE_STAKE | Constant |
public static const SHAPE_STAKE:String = stake
SHAPE_TRIANGLE | Constant |
public static const SHAPE_TRIANGLE:String = triangle
import com.robertpataki.heartcode.ProgressIndicator; var preloader_sp:ProgressIndicator = new ProgressIndicator(); preloader_sp.name = "preloader_sp"; addChild(preloader_sp); preloader_sp.x = stage.stageWidth / 2; preloader_sp.y = stage.stageHeight / 2;
import com.robertpataki.heartcode.ProgressIndicator; import flash.filters.BlurFilter; import flash.filters.GlowFilter; var preloader_sp:ProgressIndicator = new ProgressIndicator(ProgressIndicator.SHAPE_CIRCLE, 40, 1, 0x00ffff, 12, 0.03, true); preloader_sp.name = "preloader_sp"; addChild(preloader_sp); preloader_sp.filters = [new GlowFilter(0x00ffff, 0.6, 8, 8, 2, 2), new BlurFilter(2, 2, 2)]; preloader_sp.x = stage.stageWidth / 2; preloader_sp.y = stage.stageHeight / 2;