actionscript 3 - sendToURL not working in flashplayer 14 -



actionscript 3 - sendToURL not working in flashplayer 14 -

this piece of code working in flashplayer 11 it's not working in flashplayer 14.

as3 code :

private function savepdf(pdfbinary:bytearray, urlstring:string):void{ try{ //result comes binary, create new url request , pass server var header:urlrequestheader = new urlrequestheader("content-type", "application/octet-stream"); var sendrequest:urlrequest = new urlrequest(urlstring); sendrequest.requestheaders.push(header); sendrequest.method = urlrequestmethod.post; sendrequest.data = pdfbinary; sendtourl(sendrequest); } grab (e:error) { // handle error here trace("error in savepdf "+e.message); trace("stacktrace : "+e.getstacktrace()); } }

and these errors got :

error in savepdf error #3769: security sandbox violation: simple headers can used navigatetourl() or sendtourl(). stacktrace : securityerror: error #3769: security sandbox violation: simple headers can used navigatetourl() or sendtourl(). @ global/flash.net::sendtourl() @ export2publish/savepdf()[my_project_dir\src\export2publish.mxml:158] @ export2publish/generatepdf()[my_project_dir\src\export2publish.mxml:386] @ export2publish/geturl()[my_project_dir\src\export2publish.mxml:138] @ export2publish/___export2publish_application1_creationcomplete()[my_project_dir\src\export2publish.mxml:3] @ flash.events::eventdispatcher/dispatcheventfunction() @ flash.events::eventdispatcher/dispatchevent() @ mx.core::uicomponent/dispatchevent()[my_framework_dir\src\mx\core\uicomponent.as:9051] @ mx.core::uicomponent/set initialized()[my_framework_dir\src\mx\core\uicomponent.as:1167] @ mx.managers::layoutmanager/dophasedinstantiation()[my_framework_dir\src\mx\managers\layoutmanager.as:698] @ function/http://adobe.com/as3/2006/builtin::apply() @ mx.core::uicomponent/calllaterdispatcher2()[my_framework_dir\src\mx\core\uicomponent.as:8460] @ mx.core::uicomponent/calllaterdispatcher()[my_framework_dir\src\mx\core\uicomponent.as:8403]

any prepare issue ?

you can start using try , catch :

try { sendtourl(request); } grab (e:error) { // handle error here }

if problem not visible on dev environment, recommand install flash debug player can download here : flash player downloads see kind of error code fire.

if code fine, in dev , prod environment, should debug server side script.

actionscript-3 flex actionscript flex3

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -