Package | dragonBones.objects |
Class | public class SkeletonData |
Inheritance | SkeletonData Object |
See also
Property | Defined By | ||
---|---|---|---|
animationNames : Vector.<String> [read-only]
All Animation instance names belonging to this Skeletondata instance. | SkeletonData | ||
armatureNames : Vector.<String> [read-only]
All Armature instance names belonging to this Skeletondata instance. | SkeletonData | ||
frameRate : uint [read-only]
The frameRate of this Skeltondata instance. | SkeletonData | ||
name : String [read-only]
the name of this Skeletondata instance. | SkeletonData |
Method | Defined By | ||
---|---|---|---|
Creates a new SkeletonData instance. | SkeletonData | ||
dispose():void
Clean up all resources used by this SkeletonData instance. | SkeletonData | ||
getAnimationData(name:String):AnimationData
Get the AnimationData instance with this name. | SkeletonData | ||
getArmatureData(name:String):ArmatureData
Get the ArmatureData instance with this name. | SkeletonData | ||
getDisplayData(name:String):DisplayData
Get the DisplayData instance with this name. | SkeletonData |
_animationDataList | property |
dragonBones_internal var _animationDataList:DataList
_armatureDataList | property |
dragonBones_internal var _armatureDataList:DataList
_displayDataList | property |
dragonBones_internal var _displayDataList:DataList
_frameRate | property |
dragonBones_internal var _frameRate:uint
_name | property |
dragonBones_internal var _name:String
animationNames | property |
animationNames:Vector.<String>
[read-only] All Animation instance names belonging to this Skeletondata instance.
public function get animationNames():Vector.<String>
armatureNames | property |
armatureNames:Vector.<String>
[read-only] All Armature instance names belonging to this Skeletondata instance.
public function get armatureNames():Vector.<String>
frameRate | property |
frameRate:uint
[read-only] The frameRate of this Skeltondata instance.
public function get frameRate():uint
name | property |
name:String
[read-only] the name of this Skeletondata instance.
public function get name():String
SkeletonData | () | Constructor |
public function SkeletonData()
Creates a new SkeletonData instance.
dispose | () | method |
public function dispose():void
Clean up all resources used by this SkeletonData instance.
getAnimationData | () | method |
public function getAnimationData(name:String):AnimationData
Get the AnimationData instance with this name.
Parameters
name:String — The name of the AnimationData instance to retreive.
|
AnimationData — AnimationData The AnimationData instance by that name.
|
getArmatureData | () | method |
public function getArmatureData(name:String):ArmatureData
Get the ArmatureData instance with this name.
Parameters
name:String — The name of the ArmatureData instance to retreive.
|
ArmatureData — ArmatureData The ArmatureData instance by that name.
|
getDisplayData | () | method |
public function getDisplayData(name:String):DisplayData
Get the DisplayData instance with this name.
Parameters
name:String — The name of the DisplayData instance to retreive.
|
DisplayData — AnimationData The DisplayData instance by that name.
|
Download the example files here:
This example parse the 'Dragon1.swf' data and stores its SkeletonData into the local variable named skeleton.
package { import dragonBones.Armature; import dragonBones.factorys.BaseFactory; import flash.display.Sprite; import flash.events.Event; import dragonBones.objects.SkeletonData; public class DragonAnimation extends Sprite { [Embed(source = "Dragon1.swf", mimeType = "application/octet-stream")] private static const ResourcesData:Class; private var factory:BaseFactory; private var armature:Armature; public function DragonAnimation() { factory = new BaseFactory(); factory.addEventListener(Event.COMPLETE, handleParseData); var skeleton:SkeletonData = factory.parseData(new ResourcesData(), 'Dragon'); } } }