# FPlayer6 &7 NAN Problem

**URL:** <https://forum.kirupa.com/t/fplayer6-7-nan-problem/117876>\
**Category:** Uncategorized\
**Created:** [July 31, 2004, 6:00am UTC](https://forum.kirupa.com/t/fplayer6-7-nan-problem/117876 "2004-07-31T06:00:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cardjorg](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cardjorg](https://forum.kirupa.com/u/cardjorg)\
**Post date:** [July 31, 2004, 6:00am UTC](https://forum.kirupa.com/t/fplayer6-7-nan-problem/117876/1 "2004-07-31T06:00:56Z")

</div>

Hi guys, :kommie:

I’m making a drag and drop test and using dollar bills and coins and I puted this code in every coin and dollar bill :  
//----start-----  
on(press){  
startDrag(this);  
}  
on(release){  
stopDrag();  
if(this.hitTest(\_root.Harry)){  
\_root.Value1 = 0.25;//this is a quarter coin  
}else{  
\_root.Value1 = 0;  
}  
}  
//—end-----

and on a blue box with an instance name of Harry i puted

//–start–

onClipEvent(enterFrame){  
\_root.TotalValue = \_root.Value1+\_root.Value2+\_root.Value3;//keeps going until \_root.Value 33  
}  
//–end–

and a dynamic text box with the Variable name TotalValue and here is where my problem comes i tested the swf and and the text box said NAN(not a number)  
but then I changed the publishing settings to Flash Player 6 and then the textbox worked  
anyone knows how can i make it work in Flash Player 7

Thanks, 🙂

---

<div class="post-metadata">

**Author:** ![Yeldarb](https://avatars.discourse-cdn.com/v4/letter/y/51bf81/32.png) [@Yeldarb](https://forum.kirupa.com/u/Yeldarb)\
**Post date:** [July 31, 2004, 6:12am UTC](https://forum.kirupa.com/t/fplayer6-7-nan-problem/117876/2 "2004-07-31T06:12:31Z")

</div>

sounds like you have a problem with cases. Flash MX 2004 is case sensitive, and Flash MX is not. For example, Value1 does not equal value1. And if you accidentally did this on one of them, it would be undefined, and you would not be able to add it because “undefined” is in fact “NaN”. Hope this helps 🙂

By the way, there are better ways to do this than writing out all of this on every movieclip, and writing out the entire equation to add them all. If you’re interested in making it more efficient, look up loops and arrays =)

---

<div class="post-metadata">

**Author:** ![cardjorg](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cardjorg](https://forum.kirupa.com/u/cardjorg)\
**Post date:** [July 31, 2004, 6:35am UTC](https://forum.kirupa.com/t/fplayer6-7-nan-problem/117876/3 "2004-07-31T06:35:33Z")

</div>

Thanks Yeldarb but i don’t think is a case problem because when I drag all the money to the blue box it starts working. weird uh 🙂  
but the thing is that i want it to work from the start  
and i’ll use your advise to look up for loops and arrays. 😉

---

<div class="post-metadata">

**Author:** ![cardjorg](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cardjorg](https://forum.kirupa.com/u/cardjorg)\
**Post date:** [July 31, 2004, 7:33am UTC](https://forum.kirupa.com/t/fplayer6-7-nan-problem/117876/4 "2004-07-31T07:33:19Z")

</div>

I found the problem! I’m glad i did but now i feel stupid  
one variable was missing 😛  
Its hard to find a missing variable over 66 of them I have to learn how to use those arrays and loops thank you for your help 🙂
