ajoo Posted August 4, 2013 Share Posted August 4, 2013 Hi guys and let me say this that i desperately need help on this seemingly no problem at all !! Ya so I am 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 I was totally wrong & this is proving to be a most sly problem, one that refused to budge. 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 to hold minutes and seconds. It uses these two to store the time and then uses these to find the time elased till a BUTTON is pressed. 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" ). ======= DEFINED IN FLASH======== var mysec:Number=mySeconds; // 20 var mymin:Number=myMinute; // 2 var vTimNsec=mymin*60+mysec; // 140 ========= SENT TO PHP =========== lv1.v_time_in_seconds = mysec; lv1.v_sums_correct = mymin; lv1.v_delay_digit_ms = vTimNsec; If I run this in the Flash (2.0) IDE and trace the values (DEFINED IN FLASH) OR display the values in a dynamic text box, I am shown the correct values. Then I send these values to PHP thru the array lv1 using the command lv1.send(path+"data.php", "_blank", POST" ); Now if i run this from a localhost with the flash embedded in the HTML file I get values vis_sum_corr = undefined // This is myminvis_sum_tme = undefined // This is mysecvis_dig_dely = NaN // This is (mymin*60+mysec) Ok another thing that I did was that i checked the values of the variables in Flash with isNaN function and it gave me FALSE !! 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. Has me totally zapped. Ok another thing that i checked. If i replace the variable values by numeric constants as below, ======= DEFINED IN FLASH======== var mysec:Number= 20; var mymin:Number= 2; var vTimNsec= 140; and send these to PHP, IT DISPLAYS THE CORRECT VALUES !!!!!!!!!! Can someone please guide me what is going on here and what could be going wrong. I have gone nuts trying. Desperately need some gurus to sort this out. Please help !!! Thanks all. Quote Link to comment https://forums.phpfreaks.com/topic/280812-passing-the-variables-fails-me-completely-desperately-need-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.