0

My problem after building the project in flash builder 4.7 with sdk version 4.0A is as follows:-

1) when i run build-release folder from within flash builder the request from app to server works (the request is initiated in click event).

2) when i run the .html file from projects build-release folder the request is not even initiated in browser network log.

I'm using flash builder 4.7 with sdk 4.0A installed and selected. Since I'm new to actionscript and flash builder sdk, please a detailed answer will be heartly appreciated.

delete request not being sent from browser the code is like:-

public function sendDelete(params:Object):void{
        var request:URLRequest = new URLRequest(url);
        request.method = URLRequestMethod.POST;
        request.contentType = "application/json";
        request.requestHeaders = [new URLRequestHeader('X-HTTP-Method-Override', 'DELETE')];
        request.data = JSON.stringify(params);
        loader.load(request);
    }  

app when run/debug from flash builder the request get issued (seen in browsers network log), but when the app is build and run from build-release folder (i.e. running .html file) the request does not get issued (not seen in browsers network log). But if I remove the line " request.requestHeaders = [new URLRequestHeader('X-HTTP-Method-Override', 'DELETE')];" the request works even from build-release folder.

codemilan
  • 900
  • 2
  • 9
  • 28
  • 1
    Did you got some errors ? If not, try to use a flash player debug version which you can download from [here](http://www.adobe.com/support/flashplayer/debug_downloads.html). If you've got some security errors, take a look [on my answer of this question](http://stackoverflow.com/a/28719316/2256820). – akmozo Sep 29 '15 at 09:16
  • no errors at all, and everything works fine in debug version, but when the project is build into build-release folder one of the functionality for sending request doesn't triggers. – codemilan Sep 29 '15 at 09:28
  • 1
    Could you share your build ( if it's possible of course ), I'll take a look ? – akmozo Sep 29 '15 at 09:30
  • sorry I can't provide you the build it's against my company, but could you tell what could be the possible issues. – codemilan Sep 29 '15 at 09:35
  • 1
    OK, no problem, I understand. So, your project is working fine when you run it from FB, and nothing work when you open it from the release dir !! Really I dont' know exactly what's the problem, may be it's just about flash player. Are you using the same browser in both cases ? And did you see that flash player is loading your swf in the second case ? Could you put a snapshot of what you see in the **Network** tab of the development tools of your browser ( where your swf is not working ), start by opening the development tools then load your page ... – akmozo Sep 29 '15 at 09:48
  • yeah, the .swf is loading properly and all the network calls are working properly but only the edited portion of my question is not working. – codemilan Sep 30 '15 at 08:40
  • 1
    It's really wired, I tested your code and It's working fine. Try to test it separately with a new FB flash project, may be you forgot something in your current project. – akmozo Sep 30 '15 at 17:45
  • thnx @akmozo for quick responses, yah it works when tested through FB, but doesn't work when .html file contained in build-release is run with browser, but if i remove the line "request.requestHeaders = [new URLRequestHeader('X-HTTP-Method-Override', 'DELETE')];" the .html file works, I'm loading all the corelib through .swc file, really I have to make it work by making the request as POST by deleting the line mentioned. Hoping you will back post if caught in this type of problem, i will try to provide you the source-code by removing all the privacies. Once again thnx, happy coding akmozo. – codemilan Oct 01 '15 at 04:50

0 Answers0