Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to play a section in a MovieClip #298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tsangwailam
Copy link

Now, Movieclip only allow play and loop all frames. I have add ability to play only a section in the Movieclip. You can use play( startFrame, sectionLength) to play a section within the movieclip.

If you have a animation with different state, you can use only one Moveclip to represent all states. So, no need to use different move clip for different state. Best if you have a character with different animation.

@PrimaryFeather
Copy link
Contributor

Thanks for the pull request! I'll have to look at this in detail -- I had lots of problems with the movie clip lately (dispatching COMPLETE events in all possible situations, etc.), so I have to be 100% sure everything works fine. ;-)

@tsangwailam
Copy link
Author

It is change with the last version of your commit. But i think it have some redundancy of my code. I may have some more optimise on it.

@LorenzGit
Copy link

That would indeed be useful!
I was actually imagining something like this:

var mc:MovieClip = new MovieClip();
mc.addAnimation(vectorOfTextures, "animation1");
mc.addAnimation(vectorOfTextures, "animation2");

mc.play("animation1"); //or mc.play("animation2");

@ericsoco
Copy link

Note: there may be some overlap with the "bounce" loop and reverse playback I implemented in this pull request: #343

All these features sound useful, I think we have to wait for Daniel to find time for this due to both the complexity in MovieClip and the frequency of its use (needs thorough testing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants