0

For my flex apps deeplinking, I use swfaddress 2.4. It works before but now problem occurred when I migrate my flex apps to be hosted on Amazon S3 bucket.

I have done this:

  • policy file set on each domain that the app will access to load assets/data
  • allowScriptAccess is set to always
  • the policy files are loaded (via loadPolicyFile) when the apps is initiated
  • allowDomain (and allowInsecureDomain) also been set

The problem:

  • when calling SWFAddress.setValue(), the address on browser address bar is never been changed. When debug, the _value in swfaddress.js is correctly holding the value that been passed
  • this breaks browser history (back button in broswer and the apps can't be used)
  • manually enter a query into adddress bar throws this error:

    Uncaught Error: Error in Actionscript. Use a try/catch block to find error.
    

    and

    Uncaught Error: Error calling method on NPObject
    

    which is from the function _swfChange in line: obj[setter](value); where setter is the setSWFAddressValue callbacks in SWFAddress.as. So, I had even made the SWFAddress.as to execute _initialize function where it adds the callbacks

    • whe i put the try..catch at the problematic line, it goes into the infamous infinite-loop swfaddress problem. Adding a fix to that like recommended, now the apps didn't change the view state

Thanks in advance.

//btw, it's similar to this unsolved probleem: Amazon S3 and swfaddress

Community
  • 1
  • 1
  • adding try..catch in `_setValue` solved the app hanged problem.. but the back function and manually edit the query in adress bar will not change the app view state(as the `_swfChange` is now not notify the app)... using BrowserManager will throw the above error too... looks like js can't communicate with app but the app can communicate with js – user2088014 Feb 20 '13 at 15:55
  • btw, try..catch is showing nothing when i log the error message in the catch statement to console log – user2088014 Feb 20 '13 at 16:02

0 Answers0