I am needing to animate a bug moving across a screen, with its legs moving. Can someone point me in the right direction for that? Thanks
Animation
(5 posts) (2 voices)-
Posted 8 months ago #
-
First make the frames for the bug's legs moving, then put them in an SPMovieClip and tween your bug.
Posted 8 months ago # -
Thanks, I can't figure out how to get the movie to work. Here is what I have.
SPTexture *ant = [SPTexture textureWithContentsOfFile:@"ant.png"];
SPTexture *antmove = [SPTexture textureWithContentsOfFile:@"antmove.png"];SPMovieClip *antAni = [[SPMovieClip alloc] initWithFrame:ant fps:2];
[antAni addFrame:antmove];[antAni play];
antAni.loop = YES;
[self.juggler addObject:antAni];Any ideas?
Posted 8 months ago # -
Just like any SPDisplayObject, the movie clip must be added to a parent for it to display. Call this before adding it to the juggler.
[self addChild:antAni];
I also recommend that you read through the Sparrow manual on the wiki since it explains all this and more.
Posted 8 months ago # -
OK, thank you.
Posted 8 months ago #
Reply
You must log in to post.