Jump to content

Lag on movieClip.play()


trsh
 Share

Recommended Posts

I'm loading a huge animation spritessheet ~5000x4000.

 

1) Asset loader

PIXI.loader                .add('assets/dance.json')............ 

 2) Adding to stage

 var frames = [];            for (var i = 0; i < xxx; i++) {                var val = pad(i, 3);                frames.push(PIXI.Texture.fromFrame('xxx' + val + '.png'));            }            xxx = new PIXI.extras.MovieClip(frames);            xxx.loop = true;            xxx.visible = false; stage.addChild(xxx);

3) At some point I want to make it visible to user and start playing

deerDance['movie'].visible = true;deerDance['movie'].play();

When It happens there is and half-second or more a LAG (fps drop or rather everything stops in the scene) and then it plays very well with good fps. 

Is there any way to avoid this? Pre..load..something. So when it plays it goes smooth?

 

Best, janis

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...