Skip to content
This repository has been archived by the owner on May 1, 2019. It is now read-only.

qertis/cc_xml_animation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

cc_xml_animation

Cocos2d Adobe Flash Sprite Animation

Example

var self = this;

var animationSprite = new cc.Sprite();
animationSprite.setPosition(cc.p(200, 200));
animationSprite.setAnchorPoint(cc.p(0.5, 1));

// put window.res animation_xml file
var freakAnimation = new cc.Class.XMLAnimation(res['animation_xml']);
freakAnimation.onLoaded = function () {
  var frames = freakAnimation.getFrames();
  var animation = new cc.Animation(frames, 0.05);

  animationSprite.runAction(new cc.RepeatForever(new cc.Animate(animation)));
  self.addChild(animationSprite, 1);
};

Releases

No releases published

Packages

No packages published