# Email button from XML

**URL:** <https://forum.kirupa.com/t/email-button-from-xml/227906>\
**Category:** flash\
**Created:** [June 3, 2007, 7:10pm UTC](https://forum.kirupa.com/t/email-button-from-xml/227906 "2007-06-03T19:10:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmarvaso](https://avatars.discourse-cdn.com/v4/letter/v/df788c/32.png) [@vmarvaso](https://forum.kirupa.com/u/vmarvaso)\
**Post date:** [June 3, 2007, 7:10pm UTC](https://forum.kirupa.com/t/email-button-from-xml/227906/1 "2007-06-03T19:10:15Z")

</div>

im trying to load an email address from xml into a button…when its clicked, i want to use “mailto:” to initiate an email to the address in the xml file. simple right?

my erroneous AS is as follows:

```auto

myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success) {
if (success) {
var p:Array = this.firstChild.childNodes;
i = 0;
contact_txt.text = p*.attributes.contact;
 
**email_mc.onRelease = function(){** 
**getURL("mailto:" + attributes.contact);**
 **}**
 
 }
}
myXML.load("emailtest.xml");
 

```

ive attached the fla and the xml too if that helps at all.  
theres gotta be a simple solution but im stumped. :bored:

ANY help is appreciated!
