I’m making a game using flashpunk in flash builder 4.7. Currently I’m trying to implement some music that I made using garageband on my phone. I took the m4a file and converted it to mp3 using adobe audition, then embedded it in my code as I would anything else, initialized the variable in the begin() function and played and looped it. It plays through about 23 seconds of my 1:09 length track, and only about 5 seconds of my 17 second track, then it either cuts off, or loops if I have loop on.
[Embed(source="assets/Guitar Roots.mp3")]
public static const MUSIC_ROOTS:Class;
Variables.mainMenuMusic = new Sfx(Constants.MUSIC_ROOTS);
Variables.mainMenuMusic.play(0.5);
Variables.mainMenuMusic.loop();
I use the above code for embedding and initialization and playing inside the begin() function, and the update function only contains some code for checking for clicks. if I do nothing, and just let it play, it glitches like this. I restarted my computer (several times, forcibly by blue screen) and it still continues. Not sure why it’s doing this with all my files, but I’ve tried a file off the internet and it does seem to work, so I’m not sure why my files are so weird. they play normally in any other program. any thoughts?