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

Animation looping problem #216

Open
ghost opened this issue Dec 23, 2011 · 6 comments
Open

Animation looping problem #216

ghost opened this issue Dec 23, 2011 · 6 comments

Comments

@ghost
Copy link

ghost commented Dec 23, 2011

FlxSprite's looping Boolean is currently doing nothing because this in FlxSprite::play()

if(!Force && (_curAnim != null) && (AnimName == _curAnim.name) && (_curAnim.looped || !finished)) return;

Should be this:

if(!Force && (_curAnim != null) && (AnimName == _curAnim.name) && (!_curAnim.looped || !finished)) return;

With this fix a non-looping animation will actually not loop. :)

@IQAndreas
Copy link

Is that change supposed to be in FlxSprite::play(), FlxSprite::updateAnimation(), or both? (Both have the chunk (_curAnim.looped || !finished) in them)

@ghost
Copy link
Author

ghost commented Dec 24, 2011

FlxSprite::play().

IQAndreas pushed a commit to IQAndreas-testprojects/IQAndreas-flixel that referenced this issue Dec 25, 2011
Non-looping animations now loop properly
AdamAtomic#216

I'm tired, and there are too many "ands", "ors", and "nots" for me to
check the answer in my head, so I trust Camasthecat's fix. ;)
@test84
Copy link

test84 commented Feb 24, 2012

Confirm, it's working.

@ghost
Copy link
Author

ghost commented Feb 25, 2012

Goody

@IQAndreas
Copy link

There was some discussion regarding this issue on the FlixelCommunity branch, and it seems like the function is actually working the way it should.
FlixelCommunity#78

@camasthecat - could you double check the code you were using if this was the case? If it's still not working properly, perhaps you could upload the code you were using and we can take a look at it?

@ghost
Copy link
Author

ghost commented Sep 17, 2012

Okay I don't have access to flashbuilder or anything right now, so I'm not sure, but it seems like maybe the fix should be in FlxSprite::updateAnimation()?

I'll check this out later...

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

No branches or pull requests

2 participants