Question

I have a problematic situation that I wish to expose you because it contains some opposites constraints. Maybe someone will have an idea on how to unlock my problem.

I'm going to make a mobile application with ActionScript 3 and Air for iOS and Android. This application has to download zip file which it uses to display text, bitmap and sound. This last one is the problem.

After some research, one of the best way I found to check a zip file is FZip, but it allows us to get data from zip on a ByteArray form. And a Sound can't be converted from ByteArray. ( That's what a lots of results about it appear to say. )

One of the solution proposed is to put the ByteArray of a sound and put it in a SWF. Then take the SWF from the zip to get the Sound. I can't do that because this zip will be uploaded from a admin interface used by anybody. I can't force them to use Flash.

I have few potential direction where I ask for your advices :

• Use Code or Native Extension ( iOS and Android ) to check a zip without files read in ByteArray

• Convert a ByteArray into Sound without have to pass it in a SWF

• Dynamicly create a SWF with the ByteArray of a Sound

• In the last possibility, another way to drag and download few files together which can be consulted in another format than ByteArray ( Like a iOS Bundle but with android too )

Thanks a lot to help me,

Was it helpful?

Solution

You can simply write the ByteArray on a local mp3 (or mp4) file and then play it, to write a ByteArray to file see documentation here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top