Link to home
Start Free TrialLog in
Avatar of webguy62
webguy62

asked on

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

Avatar of blue-genie
blue-genie
Flag of South Africa image

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.
Avatar of webguy62
webguy62

ASKER

I m using AS3.  where do I add this code?
ASKER CERTIFIED SOLUTION
Avatar of blue-genie
blue-genie
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
only partially becuae I am a beginner but I learned from the example given