3 Replies Latest reply on Nov 26, 2006 6:23 AM by Peter Lorent

    Security Sandbox Problems

    neilneil2000
      Hi, I am a bit new to the whole actionscript thing but am trying to include something on my website with buttons which can load swf files into it. This works fine with locally hosted files using

      this.createEmptyMovieClip("Space",2);
      setProperty(Space, _x, 0);
      setProperty(Space, _y, 100);
      loadMovie(" http://thaone.is-a-geek.net/Images/Buggy.swf", Space);

      for instance, however I am trying to allow a video from youtube.com to appear in the "Space" movie clip using the following syntax:

      loadMovie(" http://www.youtube.com/p.swf?video_id=uBUNeDtcW2Q&eurl=&iurl=http%3A//sjl-static4.sjl.yout ube.com/vi/uBUNeDtcW2Q/2.jpg&t=OEgsToPDskIo4IP0ppjJgAKgafWqJlLy", Space);

      but it doesn't work properly. I have tried adding the following but that makes no difference.

      System.security.allowDomain("*");
      System.security.allowInsecureDomain("*");

      When I press Ctrl+Return the page loads ok and when I click the corresponding button the video does appear but I can't get it to run and the following error message appears:

      *** Security Sandbox Violation ***
      Connection to null halted - not permitted from http://www.youtube.com/p.swf?video_id=uBUNeDtcW2Q&eurl=&iurl=http%3A//sjl-static4.sjl.yout ube.com/vi/uBUNeDtcW2Q/2.jpg&t=OEgsToPDskIo4IP0ppjJgAKgafWqJlLy
      -- Remote SWFs may not access local files.
      *** Security Sandbox Violation ***
      SecurityDomain ' http://www.youtube.com/p.swf?video_id=uBUNeDtcW2Q&eurl=&iurl=http%3A//sjl-static4.sjl.yout ube.com/vi/uBUNeDtcW2Q/2.jpg&t=OEgsToPDskIo4IP0ppjJgAKgafWqJlLy' tried to access incompatible context ' http://sjl-static4.sjl.youtube.com/vi/uBUNeDtcW2Q/2.jpg'

      Any ideas?