# Flash Variables Issues. display correct value in flash but fails in php. NaN issue

**URL:** <https://forum.kirupa.com/t/flash-variables-issues-display-correct-value-in-flash-but-fails-in-php-nan-issue/331449>\
**Category:** Uncategorized\
**Created:** [August 3, 2013, 1:03pm UTC](https://forum.kirupa.com/t/flash-variables-issues-display-correct-value-in-flash-but-fails-in-php-nan-issue/331449 "2013-08-03T13:03:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajoo](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@ajoo](https://forum.kirupa.com/u/ajoo)\
**Post date:** [August 3, 2013, 1:03pm UTC](https://forum.kirupa.com/t/flash-variables-issues-display-correct-value-in-flash-but-fails-in-php-nan-issue/331449/1 "2013-08-03T13:03:33Z")

</div>

[COLOR=#282828][FONT=helvetica]Hi guys back again with another head swirler, at least for me. Needless to say I have been trying to figure it out for 2 days now. And I was sure I cud do it without help but guess it was a very sly one who refused to budge. [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]So i have a Flash layer called **TIMER** where I have the code to display the timer and this layer also processes the time code where it uses variables like **myMinute** and **mySeconds**. It uses these two to store the time and then uses these to find the time elased till a BUTTON is pressed. [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]This button triggers the handler **(onPress())** which has a function say send\_values() to create a set of values to send to the php. The function**send\_values()** is described / written in the **Actions Layer**. Inside this layer, the two variables **mySeconds** and \*\*myMinutes \*\*are used to send the time to php using a variable **lv1.time\_in\_seconds = myMinites\*60+mySeconds;** like this lv1.send(path+“data.php”, “\_blank”, POST" ).[/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]======= DEFINED IN FLASH========[/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]var mysec:Number=mySeconds;  
var mymin:Number=myMinute;  
var vTimNsec=mymin\*60+mysec;

[/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]========= SENT TO PHP ===========[/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]lv1.v\_sums\_correct = mymin;[/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]lv1.v\_time\_in\_seconds = mysec;[/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]lv1.v\_delay\_digit\_ms = vTimNsec;[/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]If I run this in the Flash (2.0) IDE and trace the values OR display the values in a dynamic text box, I am shown the correct values. [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]BUT if i run this from a localhost with the flash embedded in the HTML file I get values [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica][COLOR=#000000][FONT=Times New Roman]vis\_sum\_corr = undefined // This is mymin[/FONT][/COLOR]  
[COLOR=#000000][FONT=Times New Roman]vis\_sum\_tme = undefined // This is mysec[/FONT][/COLOR]  
[COLOR=#000000][FONT=Times New Roman]vis\_dig\_dely = NaN // This is ([/FONT][/COLOR]mymin\*60+mysec)[/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]So the values displayed in Flash are displayed absolutely correct and the moment I send them to PHP they are changed to undefined and NaN. [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica]Can someone please guide me what could be wrong here. I have gone nuts trying. Desperately need some gurus to sort this out. [/FONT][/COLOR]  
[COLOR=#282828][FONT=helvetica] [/FONT][/COLOR]
