0 Replies Latest reply on Sep 4, 2009 1:16 PM by acrocosm

    Requesting data from a remote domain

    acrocosm

      Ok, an intro first then the problem...


      I'm developing an e-card system in AC2. The system mainly consists of two flash movies and is supported by PHP scripts and a mysql database for data storage.

      The first part is the create/edit screen where the users can upload a photo, mask any desired area and apply some simple transformations such as size, rotation, brightness. They can also select a card (an animated flash movie) and preview the animation and finally type a message for the recipient.

      The other part is the result screen where the finalised card is presented and the user can then email a link to it to other people or grab some code to embed it on another site. The link will point exactly to this page. An example of the embed code is the following:

      Code:
      <div style="width:444px">
      <object width="444" height="493">
      <param name="movie" value="http://somedomain.com/card_shell_v0.7b.swf" />
      <param name="AllowScriptAccess" value="always" />
      <param name="flashVars" value="hashString=Sbq23isGvmEalxraVvsN" />
      <embed src="http://somedomain.com/card_shell_v0.7b.swf" type="application/x-shockwave-flash" allowfullscreen="true" width="444" height="493"  AllowScriptAccess="always" flashvars="hashString=Sbq23isGvmEalxraVvsN"></embed>
      </object>
      </div>

      The hash string is used to retrieve the details of the card and the shell movie will build it for the viewer.



      Everything works fine apart from when you embed the card to a site on another domain. If used on a page at the same domain it does load up fine and retrieve the data from the database but from a remote domain it freezes up and the browser comes up with the typical message "a script on this movie is making flash player run slowly... abort the script... etc"

      I tried using a crossdomain policy file where I'm allowing access from any domain, I thought this is a sequrity issue but this didn't work. I had a look at the shim movie but since it's useful for data transaction between two movies from different domains and I'm just calling one, even though remotely, it doesn't apply to my case.



      I bet it's a simple solution. Any help, even though it just points me to possible directions I should investigate, is highly appreciated. At the moment my mind is just pulp
      Thnx