Creating a Web Poll in Flash MX 2004: Pt. 2 Support Product Page

This topic was archived

asp.net overwriting values

Asked 29 Dec 2004 01:14:45
1
has this question
29 Dec 2004 01:14:45 Louis Pitoni posted:
Hi there, I am hoping that sas can help me out here. I am trying to use the poll. You can view it at www.scottmillerstyle.com/deletedelete/poll.swf you may notice that each time you vote the .txt file is overwritten with a NaN for one response and a 1 for another and then the most recent vote it shown but not recorded. If you have any suggestions, please let me know. Thank-you. Louis.

Replies

Replied 29 Dec 2004 02:16:39
29 Dec 2004 02:16:39 Sas Jacobs replied:
Hi Louis

Good to hear from you again! I hope all is well in New York.

I tested out your poll and noticed an NaN value associated with the response 'Perfect'. NaN happens when a non-number is treated like a number in Flash. I also noticed some problems updating the counts.

Can you post your fla and asp.net file so I can have a look?

Cheers

Sas
Replied 29 Dec 2004 04:40:30
29 Dec 2004 04:40:30 Louis Pitoni replied:
Hi Sas,
Things are going pretty well. I am impressed that you remember me! Thanks for your quick reply. I will post links to the files here. I assume that the permissions do not need to be changed? Again thanks for your help!

Louis

This is not an asp.net server, don't know if that matters for viewing the .aspx file.
www.neverstatic.com/Sas/Sas.rar
www.neverstatic.com/Sas/updateTextFile.aspx
www.neverstatic.com/Sas/poll.fla
Replied 11 Jan 2005 06:51:09
11 Jan 2005 06:51:09 Sas Jacobs replied:
Hi Louis

I thought I'd provide a quick summary of the problems we've identified so far in case anyone else is reading this thread.

Firstly, the data in the text file wasn't loading correctly because you'd added a return after the last numeric value. When Flash was determining the numeric value, it was confused by the return character in the text file so returned NaN (not a number) when it tried to add 1.

Secondly, in your Flash file, you didn't include the full server path in the file. It needs to read

SendText.sendAndLoad("localhost/poll/updateTextFile.aspx", ReceiveReply);
(or whatever your full server path is)

not

SendText.sendAndLoad("updateTextFile.aspx", ReceiveReply);

as you had added.

Cheers

Sas

Reply to this topic