weavejester Posted November 21, 2016 Share Posted November 21, 2016 I've been trying to work out how to set the frame rate for a MovieClip animation. I assume this is where the animationSpeed property comes in, but the API documentation is rather vague: Quote animationSpeednumber The speed that the MovieClip will play at. Higher is faster, lower is slower What does this mean in terms of frames per second? If I want an animation to play at, say, 15 FPS, what value should the animationSpeed property be? Quote Link to comment Share on other sites More sharing options...
themoonrat Posted November 21, 2016 Share Posted November 21, 2016 By default, I believe it plays animations assuming 60fps. You can control the time for each frame however, by changing slightly how you create one For example, if you wanted a 10fps animation, instead of let textures = [texture1, texture2, texture3, texture4, texture5]; let coolAnimation = new MovieClip(textures); coolAnimation.animationSpeed = 0.166; You can do let textures = [ {texture: texture1, time: 100}, {texture: texture2, time: 100}, {texture: texture3, time: 100}, {texture: texture4, time: 100}, {texture: texture5, time: 100} ] let coolAnimation = new MovieClip(textures); weavejester 1 Quote Link to comment Share on other sites More sharing options...
weavejester Posted November 23, 2016 Author Share Posted November 23, 2016 Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.