How to load spritesheet from SD card in AndEngine
I am new to AndEngine. I'm trying to play an animation by using the spritesheet(generated using TexturePacker) and I successfully animated by referring this question (Load Animation with Texture Packer in andengine)
Q 1. How to load spritesheet and xml files from the SD card. (In above example spritesheet and xml files are loading from the Asset folder).
Q 2. I want to add sound to the animation. Is there is a way to do it?
Havent tried this but you have the ability to set the base path for your assets usingBitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/"); Try changing from gfx to the path on your SD card.
Yes, you can add sounds
Drop your sound files (ogg) into res\raw folder and use the following code
MediaPlayer mp = MediaPlayer.create(getApplicationContext(), soundType); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); mp.start();