# Kool trick

**URL:** <https://forum.kirupa.com/t/kool-trick/160797>\
**Category:** Uncategorized\
**Created:** [August 29, 2005, 4:36pm UTC](https://forum.kirupa.com/t/kool-trick/160797 "2005-08-29T16:36:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![krs4kirupa](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@krs4kirupa](https://forum.kirupa.com/u/krs4kirupa)\
**Post date:** [August 29, 2005, 4:36pm UTC](https://forum.kirupa.com/t/kool-trick/160797/1 "2005-08-29T16:36:29Z")

</div>

## hi all. here is what I am trying to do. I have 4 MCs in the \_root - then i load an xml file. when loaded i pick out attribute values and assign to the dynamic text fields i have within MCs. Then again I verify the xml node attribute for boolian value. if the attriute value is true in xml then i change the MC color to green and make it cliciable. If the attribute value is false in xml, then I change the MC color to yellow. pretty cool huh. i am having trouble. can you help me please. here is halfway script…

## art\_xml = new XML(); art\_xml.ignoreWhite = true; art\_xml.onLoad = function() { var artElement = this.firstChild; \_root.b1.bid\_txt.text = artElement.attributes.bid;//b1 is MC and bid\_txt //is dynamic text field within MC b1 if (artElement.attributes.sta == “AV”) { myClr = new Color(\_root.b1); myClr.setRGB(0x009900); reserveNow(); } else { myClr = new Color(\_root.b1); myClr.setRGB(0x990000); } \_root.bidTxt.bidTxt.text = artElement.attributes.bid; function reserveNow(){ this.onPress = getURL(“[http://localhost/site/kickme.asp?id=](http://localhost/site/kickme.asp?id=)”+artElement.attributes.bid, “POST”); }; }; art\_xml.load(“art3.xml”);

the trouble is making the MC clickable in xml value is true.  
krs
