FLAG 3.0 GET

Tile Sprite

Simply put, a Tile Sprite is a tile that has frames of animation. Tile Sprites are created using POLE and can be manipulated using FLAG and WIND.

Class

FLAGTILESPRITE

Called by FLAG.TileSprite

FLAG.TileSprite( instanceName:String ); Parameters instanceName:String --- The name of a Tile Sprite instance in the Scene Example
FLAG.TileSprite("myTileSprite");
Extend Class Example
FLAGTILESPRITE.prototype.myFunction = function(){
console.log("I added to the FLAGTILESPRITE Class");
};

Properties

animation:Number --- Index of Tile Sprite animation col:Number --- Column of Tile Sprite frame:Number --- Frame number of the Tile Sprite that is being rendered layer:Number --- Layer the Tile Sprite is being rendered on loop:Boolean --- Should the Tile Sprite's animation loop loopCount:Number --- How many animation loops before stopping, null if infinite loops:Number --- A counter for how many loops have occured name:String --- Name of the Tile Sprite instance in the Scene pIndex:Number --- Index of Tile Sheet playing:Boolean --- True if the Tile Sprite's animation is playing row:Number --- Row of Tile Sprite

Methods

Get Animation

Returns an object containing animation information for the Tile Sprite.

FLAG.TileSprite("myTileSprite").getAnimation( ); Example
console.log(FLAG.TileSprite("myTileSprite").getAnimation().name);

Play

Sets the Tile Sprite's animation to play.

FLAG.TileSprite("myTileSprite").play( );

Set Animation

Sets the animation of the Tile Sprite.

FLAG.TileSprite("myTileSprite").setAnimation( animation:String || Number ); Parameters animation:String || Number --- Name or index of animation for Tile Sprite Example
FLAG.TileSprite("myTileSprite").setAnimation("LightsOn");

Set Frame

Sets the frame of the Tile Sprite.

FLAG.TileSprite("myTileSprite").setFrame( frame:String || Number ); Parameters frame:String || Number --- "startFrame" or "endFrame" or number of frame for Tile Sprite Example
FLAG.TileSprite("myTileSprite").setFrame(0);

Stop

Sets the Tile Sprite's animation to stop.

FLAG.TileSprite("myTileSprite").stop( );
POLE WIND