开发者

Create Animation using set of Images and sound

I have a set of images for an animation and sound file. but i don't know how create this animation and play sound in background with animation. also i want to开发者_C百科 change(increase/decrease) the frame rate of the animation as well as sound with seekbar change in progress. please help!!!!


Check out these 2 tutorials:

  • How to paint, animate, loop en remove a Sprite
  • How to add sound effect to you game

( Both with a Eclipse project download )

Addition after comment :-)

to change the framerate check the Initialize of the Sprite class:

public void Initialize(Bitmap bitmap, int height, int width, int fps, int frameCount, boolean loop) {}

If you add a sprite like so:

AnimatedSprite a = new AnimatedSprite();
b = BitmapFactory.decodeStream(res.openRawResource(R.drawable.explosion));
a.Initialize(b, 120, 160, 24, 20, true);
                          ^framerate 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜