Werkin’ on a project this weekend where separating the audio to a level wasn’t an option because I needed the code to be simple. It was a simple slideshow with synced (streamed) audio, and the deadline was tight. The problem, though, was each test movie took a long time. Eventually, I’d change the audio compression to RAW just so the compile times were better, but a 4 meg mp3 even at RAW compression still took about 10-20 seconds on my 800 p2.
I managed to get the main interface and all it’s parts to be consolidated into one SWC. This was really nice as I could reuse it in other movies simply for it’s interface, since unless you setup event listeners, it didn’t do anything.
Frustrated post project on how to make things more efficient, I tried to do some SWC tests this morning with audio. First thing I forgot was that SWC’s, are in essence, SWF’s. Flash will merge them with the SWF your compiling too. Since an MP3/Audio file that is merged with the timeline, and only the timeline won’t export into your final movie. Thus, it gets compressed twice. So, I set its linkageID, and tried that. Even though the same 1 meg SWF went from 3 minutes (mp3 64 bit Best) to 3 seconds, the audio kept getting recompressed. Not really sure why, since I set the audio via the mp3 itself in the source FLA, and didn’t have override audio compression settings checked in the Publish settings.
At any rate, what I did conclude is that for anything I can consolidate into an SWC greatly expedites my development time, whether for programming projects or others. Besides, most non-programming projects have a plethora of library media of graphics, bitmaps, text, ect, and it’s nice to have just one symbol to deal with. The time savings in compiling from using SWC’s for non-programmatic content is definitely worth investing time in to learn and test them out. Multiply 3 minutes by how many times I typically do a test movie in a typical development session, and then change that number to 3 seconds… you can see how much more efficient you can get if you implement this solution across the board.