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?

Answers


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();

Need Your Help

puting variables of an array in a row of another array in Matlab

arrays matlab matrix

as i said in topic name, i want to put variables of 3 arrays in a row of another array.

Python: How do I read and parse a unicode utf-8 text file?

python xml unicode parsing codec

I am exporting UTF-8 text from Excel and I want to read and parse the incoming data using Python. I've read all the online info so I've already tried this, for example: