SWF no se puede conectar a DB (usando AMFPHP) mientras se ejecuta a través del navegador, pero en modo de depuración funciona bien

its few days i'm stock with a issue using amfphp 2 in my actionscript project.

i have an actionscript project which gets the data from db through amfphp, when i run the complied swf in debug mode or just run through flash player it works fine , but once i wrap it with html and open it through browser it never gets the data from db, dose any body can help me what is going on ?

i have added these lines at the first of the project , but still through browser ( i've tried , Chrome, Firefox and safari) it cannot connects to db.

        Security.allowDomain("*");          
        Security.allowInsecureDomain("*");

Muchas Gracias

preguntado el 10 de marzo de 12 a las 08:03

1 Respuestas

first of all, download the debugger Flash Player extension for your browser. When running Flash content in debugger it will tell you what errors occur.

http://www.adobe.com/support/flashplayer/downloads.html#fp11

Also, I'd suggest to check out the Crossdomain policy file on the server you're trying to communicate with. To be able to communicate with any servers from Flash Player you need to allow it on the server by using a crossdomain.xml file.

http://kb2.adobe.com/cps/142/tn_14213.html

Buena suerte, rob

respondido 10 mar '12, 12:03

Thanks Rob for the suggestions, i did the steps you mentioned , but i dono why its still not working . the crossdomain file also which i put in the server is like this : <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="*" secure="false" /> </cross-domain-policy> the application works fine when i run the swf file with flash player (out of browser) , but only once i open it through browser it cannot get the data from db - Delavega

Have you installed the debugger player for your browser? If so, does it throw any errors when you run the app? - robertp

Thanks Rob, i Could solve the problem by changing the crossdomain file content to this : <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "adobe.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <site-control permitted-cross-domain-policies="all"/> <allow-access-from domain=""/> <allow-http-request-headers-from domain="" headers="SOAPAction"/> </cross-domain-policy> im still not sure why it happend to not working with previous syntax but anyway thanks for your help :) - Delavega

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.