# Multiply values from an XML document

**URL:** <https://forum.kirupa.com/t/multiply-values-from-an-xml-document/206624>\
**Category:** Uncategorized\
**Created:** [November 9, 2006, 9:44pm UTC](https://forum.kirupa.com/t/multiply-values-from-an-xml-document/206624 "2006-11-09T21:44:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarretgabel](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jarretgabel/32/2991_2.png) [@jarretgabel](https://forum.kirupa.com/u/jarretgabel)\
**Post date:** [November 9, 2006, 9:44pm UTC](https://forum.kirupa.com/t/multiply-values-from-an-xml-document/206624/1 "2006-11-09T21:44:33Z")

</div>

Oh man people. I’m stuck and have been pulling my hair out for hours. PLEASE HELP!!!

I have set up an XML document and and array inside flash to read the values into. No problems so far… The array looks like this: \_global.cal[0];

When i get the value of \_global.cal[0] , i get a number… in this case its 150. no problems here. but when i try to multiply that number by 5 (\_global.cal[0]\*5) I get an NaN… So i tried Number(\_global.cal[0]) but nothing… along with just about every combination of using int() or NUmber() that i could.

go to [[COLOR=#333333]http://www.jarretgabel.com/vending[/COLOR]](http://www.jarretgabel.com/vending) , click through the dairy button, and you’ll see the tests that i am running to figure this out… it’s really frustrating.

I’m initializing my arrays like this:  
\_global.cal = new Array(totalslides);

setting my array up with this:  
\_global.cal\* = counter.firstChild.nextSibling.nextSibling.nextSib ling;

and testing with these:  
extra = \_global.cal[0];  
extraA = Number(\_global.cal[0]);  
extraB = \_global.cal[0]\*5;  
extraC = Number(\_global.cal[0])\*5;  
extraD = Number(\_global.cal[0]\*5);  
but only first one returns a value of 150…

I have no idea what i’m doing wrong… please help!
