We help IT Professionals succeed at work.

How do I add sound clip to my slideshow?  Is it possible?

I have created a slideshow in Flash CS3 using a great template from here:

http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm 

and customized a bit-works great.  Wanted to add a sound clip.  When I add the clip (MP3) to my project, I hear it when I test locally, but once I publish to the web, I cannot hear anything.  (All files are in the same directory.) Also tried creating a second swf with just the sound, but could not get it to work in my html - no errors, but no luck.  Am attaching the script from my Flash project.  Am a true BEGINNER, so need things explained like I know nothing (which is almost true! :)
function loadXML(loaded) { 
if (loaded) { 
xmlNode = this.firstChild; 
image = []; 
description = []; 
total = xmlNode.childNodes.length; 
for (i=0; i<total; i++) { 
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; 
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; 
} 
firstImage(); 
} else { 
content = "file not loaded!"; 
} 
} 
xmlData = new XML(); 
xmlData.ignoreWhite = true; 
xmlData.onLoad = loadXML; 
xmlData.load("Christmas2007.xml"); 
///////////////////////////////////// 
listen = new Object(); 
listen.onKeyDown = function() { 
if (Key.getCode() == Key.LEFT) { 
prevImage(); 
} else if (Key.getCode() == Key.RIGHT) { 
nextImage(); 
} 
}; 
Key.addListener(listen); 
previous_btn.onRelease = function() { 
prevImage(); 
}; 
next_btn.onRelease = function() { 
nextImage(); 
}; 
auto_btn.onRelease = function() {
      myAuto = setInterval(nextImage, 5000);
};
stop_btn.onRelease = function() {
      clearInterval(myAuto);
}
///////////////////////////////////// 
p = 0; 
this.onEnterFrame = function() { 
filesize = picture.getBytesTotal(); 
loaded = picture.getBytesLoaded(); 
preloader._visible = true; 
if (loaded != filesize) { 
preloader.preload_bar._xscale = 100*loaded/filesize; 
} else { 
preloader._visible = false; 
if (picture._alpha<100) { 
picture._alpha += 10; 
} 
} 
}; 
function nextImage() { 
if (p<(total-1)) { 
p++; 
if (loaded == filesize) { 
picture._alpha = 0; 
picture.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
picture_num(); 
} 
}  else { 
p = 0;
firstImage();
} 
}   
 
function prevImage() { 
if (p>0) { 
p--; 
picture._alpha = 0; 
picture.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
picture_num(); 
} else {
	p = (total-1);
	picture._alpha = 0; 
	picture.loadMovie(image[p], 1); 
	desc_txt.text = description[p]; 
	picture_num(); 
}
}
function firstImage() { 
if (loaded == filesize) { 
picture._alpha = 0; 
picture.loadMovie(image[0], 1); 
desc_txt.text = description[0]; 
picture_num(); 
} 
} 
function picture_num() { 
current_pos = p+1; 
pos_txt.text = current_pos+" / "+total; 
}

Open in new window

Comment
Watch Question

Commented:
Thanks anyway, I think I got it.  In the properties box for my sound clip, the default setting for "sync" is Event.  I changed that setting to Start, and although it takes a little while to load, I get my sound from my website.

P.S.  How do I close a question?

Commented:
Closed, 400 points refunded.
Vee_Mod
Community Support Moderator

Explore More ContentExplore courses, solutions, and other research materials related to this topic.