I’m not sure how to efficiently describe my problem, but here it goes:
I made a very simple drawing application in flash similar to this one here.
I wanted to save the images the user creates, so I save each action in an array which holds (mouse x position, mouse y position, line width and color).
When the user has finished drawing he/she hits a button and the application converts the recorded actions into a string, f.ex.:
.194,108,3,0|.141,144,3,0.141,145,3,0.141,146,3,0.142,147,3,0
.142,148,3,0.143,149,3,0.144,151,3,0.146,151,3,0.147,151,3,0|
where a “.” denotes a new action and a “|” indicated that the user has released the mouse.
When the user presses the button this information gets sent to a php file via “POST” which then writes it to a text file on the server.
My problem is that the information does not end up correctly in the text file.
Example of a corrupt text file
.73.6,76.8,3,0.74.7,76.8,3,0.74.7,77.85,3,0.74.7,81
.05,3,0.74.7,88.55,3,0.71
The pattern .X,X,X,X.X,X,X,X.… is not there.
I would accept that I had made some programming mistake while exporting the string from flash to php to a text file… **But **if I run the application from Flash (using ctrl+enter) the text file created on the server is **never **corrupt. But if I run the application in a browser either straight from the server or from my computer the text file is always corrupt (I’ve tried both IE and Firefox).
In the same “POST” I also send a url, which always returns to php without errors, doesn’t matter whether I run it in a browser or straight from flash.
I’m completely lost, the only theory I have is that the browser somehow mix up or loose some of the letters I send to the php file.
Any suggestions or similar problems ? Also if anyone thinks posting some of my code might help in solving the problem just ask for which part to post.
Thanks in advance to anyone who actually read this long post 