View Full Version : Flash Slide show quandry

11-01-2004, 12:39 AM
This is more of a theoretical question as I haven't actually started this project yet.

One of my clients asked my to build a slide show in Flash that will contain roughly 30-40 jpegs. Each frame will contain a transition where a main jpeg will fade in and a smaller inset jpeg will fade in a second or 2 later on a layer above. There will also be a spoken word soundtrack and music that has not been recorded yet. At this point, I do have a detailed storyboard of all of the jpeg image transitions?

I am not making a lot of money on this project so I am trying to come up with a way to build my .fla file so it will show the overall flow if the slide show with the transitions, but not create a lot of extra work once the soundtrack is added (for example, I am hoping not to have to shift the timelines or positions of all 30-40 jpeg transitions to adjust for the duration of the soundtrack).

How would the experts approach this project so that adjustments could be made efficiently later?

11-01-2004, 01:29 AM
i'm a huge fan of xml. if you know that duration of each audio clip you can add it to the attributes of each image node.

///XML code
<image filepath="images/image1.jpg" audio="audio/spoken_word1.mp3" duration="3000"/>
..and then during parsing of the xml
//AS code
imageArray = new Array();
for(i = 0; i < galleryLength; i++){
theImage = gallery.childNodes[i].attributes.filepath;
theAudio = gallery.childNodes[i].attributes.audio;
theTime = gallery.childNodes[i].attributes.duration;
image[i] = ({url:theImage, audio:theAudio, duration:theTime});

...then load the first image set an interval to load it out at duration and start loading the next in once that interval is cleared, set the interval for the second pic to fade out with it's duration,... etc
it's the cleanest most efficient way i can think of. the tricky part is that setInterval is used in milliseconds, so you'd have to break out the calculator to convert the time of the audio duration. you can just open audio clip in iTunes or musicmatch and check out the time duration.

hope it helps