4 Replies Latest reply on May 23, 2006 9:03 AM by exPluda?

    crossDomain help

    exPluda? Level 1
      Hello,

      I can't make this work, and I think this is a problem of crossDomain config.

      The goal

      be able to upload images from my computer to my server (this can be done in a pure html/php process, so I guess it can be possible in flash too)

      In flash I have,

      System.security.loadPolicyFile(" http://MyServer.com/crossdomain.xml");
      import flash.net.FileReference;

      the crossDomains is like

      <?xml version="1.0"?>
      <!DOCTYPE cross-domain-policy SYSTEM " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
      <!-- Policy file for http://www.esquisso.com -->
      <cross-domain-policy>
      <allow-access-from domain="www.MyServer.com/php/" />
      <allow-access-from domain="www.MyServer.com/pics/" />
      </cross-domain-policy>

      I'm allowing access to folder php and folder pics, write?

      Why doesn't this work?

      Many thanks,
        • 1. Re: crossDomain help
          abeall Level 3
          I don't know much about this, but I think cross-domain is intended for network-to-network activity, not as much for local-to-network. However, it doesn't look like your cross domain policy provides for a local machine anyway, just two server folders.

          To use local Flash to access network, I think with Flash 8 you must create a registry on the local machine. Fun stuff.
          • 2. Re: crossDomain help
            exPluda? Level 1
            Hello, thanks for reply

            < To use local Flash to access network, I think with Flash 8 you must create a registry on the local machine. Fun stuff. >

            And how do I do that?
            This is much more complex that I was thinking.

            Thanks
            • 3. Re: crossDomain help
              abeall Level 3
              > This is much more complex that I was thinking.
              I know the feeling.
              I remember spending several hours researching and reading docs, and it seems everybody is confused. Part of it may be the fact that security behavior is different in different SWF versions as well as Players, which multiplies for one gigantic mess.

              Check this out:
              http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=13530cdd

              From the paragraph labeled "Developers":
              Author/Developers may be able to modify their content so that users don't need to take any action. If your content does not access any local files, it can be modified to interact with the network only. This can be done using the standalone tool provided, called the Local Content Updater or by using Macromedia Flash 8 to publish your SWF using the "Allow local file to access the network" setting.

              If your content must access both the local file system and the network, the user must indicate that they trust the file. This can either be done interactively through the settings manager, or by installing a trust file. For existing content, the simplest approach will probably be to indicate that users should use the settings manager to make a file (or directory) trusted. For new content, an author might consider installing a trust file at the time when the content is installed locally-that way the user is not required to take any action. For the complete description of how to "trust" content or the Local File Security please see, Security Changes in Flash Player 8

              which takes you here:
              http://www.adobe.com/devnet/flash/articles/fplayer8_security.html

              ...it always seems endless trying to figure this out.
              • 4. Re: crossDomain help
                exPluda? Level 1
                Hello,

                I had read those already, and what I've learned so far is that IT IS possible to make local machine running as an embeded swf into html talk with webservers.

                You need in fact to use the crossDomain feature to make this possible and you must allow your public ip to access the webserver you want.

                In my case it doesn't worth the efort, but I think this info can be usefull to someone

                Pluda