AMFPHP Delays

I have been working with Flash AMFPHP and man is it sweet stuff. I modified my own PHP classes that I created for database connectivity, to let me optionally test any function I create in the AMFPHP service using a PHP call instead of going all the way through to Flash to test it. It’s also nice to have this because I can test any PHP errors using the following lines at the top of my code to return any PHP errors I may have thrown in by accident:

ERROR_REPORTING(E_ALL);
ini_set(“display_errors”,”1″);

(Yes, I know I could turn on display_errors in the php.ini, and I tried that. It says that it’s On, but in phpinfo() it says that it’s off. I don’t know why, but the above lines work just as well and are more secure in the long run since I can remove the lines easily.)

Oh, right, the subject of this post… So, another problem I found was a delay when it got all the way through to Flash. I’d attempt a call and it either wouldn’t work at all, or it would delay. Sometimes I had to send the call or click the button twice to get it to respond.

I narrowed that problem down to the NetDebug class that I include and use to test my stuff inside Flash. By removing/commenting the lines that use the NetDebug class, it removes that delay.

I hope someone can learn from my AMFPHP/Flash problems as I go. If you have questions about any of this, as always, feel free to leave a comment. I’ll try to answer to the best of my ability.

Nate Ritter lives in the Pacific Northwest (U.S.), popularized the #hashtag and creates web applications for a living. He also does miles and point hacking to enable cheap travel for his family. More here →

Comments are closed.

 
More in Development, Techie
CSSReboot.com

CSSReboot.com is a nice site, with a great purpose. Makes me feel happy inside.

Close