A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Can MX pull data from outside the domain the swf is on?

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    251
    I know you couldn't do this with Flash 5 before as it was a security issue. Can you do it with MX?

  2. #2
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    NO. (Did no test on it, but I'm almost sure)

    Fredi

  3. #3
    Member
    Join Date
    Oct 2000
    Posts
    92
    not tested.

    System.security.allowDomain("myOtherServer.com");

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Posts
    251
    oh boy, me thinks me needs to get a Flash MX book. Any suggestions?

  5. #5
    Senior Member
    Join Date
    Apr 2001
    Posts
    251
    It's so cool you can load jpgs from whereever.

  6. #6
    Information Architect Subway's Avatar
    Join Date
    Feb 2000
    Location
    Switzerland
    Posts
    4,779
    Originally posted by Naked inc.
    not tested.

    System.security.allowDomain("myOtherServer.com");
    Now - that's a security hole.

    Anyone tested it?

    Fredi

  7. #7
    Senior Member
    Join Date
    Jun 2001
    Posts
    160
    If this is true, all the evil minds just started working overtime.


  8. #8
    Moderator
    Join Date
    Aug 2000
    Posts
    1,455
    Hiya,

    Code:
    System.security.allowDomain("myOtherServer.com");
    ...is used to create a tunnel through which SWFs from different domains can communicate through LocalConnection(). This ActionScript is used on the receiving Movie and will allow movies from the specified domain(s) to communicate with it!

    Regards,

    Steve

  9. #9
    Senior Member
    Join Date
    Apr 2001
    Posts
    251
    ok, so you have to have access to both domains. This is very nice.

  10. #10
    Moderator
    Join Date
    Aug 2000
    Posts
    1,455
    The good news is that loadMovie() is no longer under the strict security restrictions. You can happily use loadMovie() to load SWF and JPG files from other domains.

    However, I believe that you cannot then use the original movie to modify details of the loaded (child) SWF unless that movie gives express permission using the aforementioned System.security.allowDomain() call.

    There's a full whitepaper on the security settings of Flash MX here: http://download.macromedia.com/pub/f...s/security.pdf

    Regards,

    Steve

  11. #11
    Senior Member
    Join Date
    Mar 2000
    Posts
    111
    from the errata on MX manual (@ http://www.macromedia.com/support/fl...errata03.html)

    System.security.allowDomain
    Availability:

    Flash MX

    Usage:


    System.security.allowDomain(domain1, domain2,....domainN)

    Description:

    Allows Flash MX movies in the identified domains to access objects and variables in the Flash MX movie that calls the allowDomain command.

    Example:

    The domains can be formatted in the following ways: domain.com, http://domain.com, or http://IPaddress.

    Scenario:

    <http://www.macromedia.com/MovieA.swf> loads <http://www.shockwave.com/MovieB.swf>. MovieA.swf contains the command System.security.allowDomain("shockwave.com") . Therefore MovieB.swf will be able to access MovieA.swf's objects and variables.



  12. #12
    Senior Member
    Join Date
    Jun 2001
    Posts
    160
    woo hoo.

    Just got 3 oranges on NetBreeds sig!

    Hey, is there a tutorial on how to make spinning reels for a slot machine? I need to do one.

    Thanks


  13. #13
    Member
    Join Date
    Oct 2000
    Posts
    64
    slot machine...does that mean that security critical apps like casino games (ah yeah...slot machine!) are no longer a big problem when created with flash?(security issue)
    any practical ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center