I spent all day yesterday trying to create pause/play functionality for an external audio .swf, loaded either with loadMovie or loadMovieNum. I know this should be simple, in fact I did about three different online tutorials trying to get this to work.
I started out basing my file on a class project from about six years ago, building an mp3 player in Flash. It was pretty simple and I thought adapting it would be easy. At the time, I believe we were given the audio .swf files, one for “Just the Two of Us” and the other was “We Built This City”.
These two .swfs work fine with simple play/pause buttons, no problem. The first thing I noticed was that these two files are SMALL, like 500k, but they are full length songs. The swf’s are not reference files, as the songs play even when I move them out of the folder where the original mp3’s reside.
When I created .swfs myself (import the mp3 file into Flash, publish as a .swf) they were much bigger, 4mb or so, and the other thing was that they WOULD NOT respond to any pause/play controls. I tried writing the code at least a dozen ways, tried numerous tutorials, etc. but I couldn’t get a simple pause button to work.
I tried running the small .swf’s through a decompiler to see if there was other code at issue, but it decompiled into a sound file and a play() and stop() command and that was all.
I know this is a simple one, but I am stumped. I feel like I’m overlooking something pretty basic.