# Adding sound via XML

**URL:** <https://forum.kirupa.com/t/adding-sound-via-xml/176411>\
**Category:** flash\
**Created:** [January 23, 2006, 11:29pm UTC](https://forum.kirupa.com/t/adding-sound-via-xml/176411 "2006-01-23T23:29:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bladegem](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bladegem](https://forum.kirupa.com/u/bladegem)\
**Post date:** [January 23, 2006, 11:29pm UTC](https://forum.kirupa.com/t/adding-sound-via-xml/176411/1 "2006-01-23T23:29:51Z")

</div>

I’m attempting to add a different sound clip for each image in the Portfolio example ([http://www.kirupa.com/web/xml/examples/portfolio.htm](http://www.kirupa.com/web/xml/examples/portfolio.htm)). Can I do this by adding a “sound” attribute to each element in the XML file?

And how do I attach a sound to a clip or button in my main Actions layer? The example code I’ve seen only attaches sound in the button’s personal Actions.
