Jump to content

Adding PIXI.extras.MovieClip(frames) causes parent to be undefined.


neonwarge04
 Share

Recommended Posts

Hi, 

I have this following code: 

function SwordsMan(stage){  this.mStage = stage;  this.mAnimFrames =    [        PIXI.Texture.fromFrame("0.png")      , PIXI.Texture.fromFrame("1.png")      , PIXI.Texture.fromFrame("2.png")      , PIXI.Texture.fromFrame("3.png")      , PIXI.Texture.fromFrame("4.png")      , PIXI.Texture.fromFrame("5.png")    ];  this.mMovieClip = new PIXI.extras.MovieClip(this.mAnimFrames);  this.mMovieClip.animationSpeed = 1.0;  this.mMovieClip.play();  this.mStage.addChild(this.mMoveClip);}SwordsMan.prototype ={  constructor : SwordsMan  , update : function(elapsed)  {  }}

I am following this tutorial to try out PIXI animation: http://pixijs.github.io/examples/index.html?s=basics&f=spritesheet.js&title=SpriteSheet%20Animation|

Unfortunately, upon trying this out I getting this following error:

Uncaught TypeError: Cannot read property 'parent' of undefined

This occurs at pixi.js 6774. How can I fix this?

Thank you!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...