| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
ProgressIndicator is a simple progress indicator class which can draw different pre-defined shapes arranged in a circle. I built it from scratch and tried to make it as CPU and memory efficient and easy to use as possible.
You can use the tool to
AS3 Compatible players:
AS2 Compatible players:
The class is very easy to customize. You can choose from a number of different shapes and also set the density, the amount of shapes animated and faded, the speed of the animation, the radius and color. Also, you can add any filters to it to make it cooler.
AS3:
If the constructor is called without any parameters passed it creates an auto-generated indicator.
import com.robertpataki.heartcode.ProgressIndicator; var preloader_sp:ProgressIndicator = new ProgressIndicator(); preloader_sp.name = "preloader_sp"; addChild(preloader_sp); preloader_sp.x = stage.stageWidth * 0.5; preloader_sp.y = stage.stageHeight * 0.5;
The indicator can be customized by passing parameters to the constructor.
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 * 0.5; preloader_sp.y = stage.stageHeight * 0.5;
AS2:
If the constructor is called without any parameters passed it creates an auto-generated indicator and places it on the stage.
import com.robertpataki.heartcode.ProgressIndicator; new ProgressIndicator();
The indicator can be customized by passing parameters to the constructor.
import com.robertpataki.heartcode.ProgressIndicator; import flash.filters.BlurFilter; import flash.filters.GlowFilter; new ProgressIndicator(this, "preloader_mc", ProgressIndicator.SHAPE_CIRCLE, 40, 1, 0x00ffff, 12, 0.03, true); preloader_mc.filters = [new GlowFilter(0x00ffff, 0.6, 8, 8, 2, 2), new BlurFilter(2, 2, 2)]; preloader_mc._x = Stage.width * 0.5; preloader_mc._y = Stage.height * 0.5;
If you don't know where to start see the HeartCode_QuickStartGuide_ProgressIndicator.pdf file for some help.
ProgressIndicator was created by Robert Pataki.
(The MIT License)
Copyright (c) 2010-2011 Robert Pataki heartcode@robertpataki.com;
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Back | FazBrowse Home | New Git URL |