need to know if possible to add links to sound files in an xml file that loads images to flash?

How do we edit n xml file so a sound will play with a photos?  I understand it is bad and not a good idea to auto play sound  but we have a client that demands this :(
<photo>
				<thumb src="/img/images/2.jpg" />
				<img src="/img/images/2big.jpg" />
				<caption text="Caption 2"/>
				<desc> <![CDATA[<h1>Description Description</h1> <br>Lorem ipsum dolor sit amet, 
 
consectetuer adipiscing elit. Praesent euismod nunc id ligula. Vivamus ac justo. Morbi imperdiet. Lorem ipsum dolor 
 
sit amet, consectetuer adipiscing elit. Pellentesque est eros, viverra quis, pellentesque nec, elementum id, mi. 
 
Nulla malesuada. Proin blandit tincidunt neque. <br><br><a href="event:BACK">Back</a> <a 
 
href="event:http://www.google.com"> More</a> ]]> </desc>
			</photo>

Open in new window

webguy62Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blue-genieCommented:
is your sound from a local folder, off a server, imported into flash?
are you using AS2 or AS3?

the logic will be along these lines
simply add another tag - putting it at the end won't mess up existing code

<img soundbg url="blah/blah.mp3"/>
currently the code you call to load the image, add code to get the sound to play
based on answer to first 2 questions. use Sound.attachSound/NetStream.attachSound() etc to play.
0
webguy62Author Commented:
I m using AS3.  where do I add this code?
0
blue-genieCommented:
you're going to add the node to the xml file.
where you're currently loading the images, you'll have some code pulling the image info from the xml.
add code there to pull the sound file info store it in a variable

where you load the image, create the sound object and tell it which sound to play / attach / load from the variable you've just saved.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
webguy62Author Commented:
only partially becuae I am a beginner but I learned from the example given
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.