2 Replies Latest reply on Oct 20, 2006 2:31 AM by henk_jan

    Flex and SCORM / LMS

    Henk Jan Baard
      Hallo all,
      Does anyone have some experience with creating sco's for LMS systems?
      I made a test flex app but can't get it to work. To create a SCO I use Reload Editor and then test it. I get the following error:

      SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file://F:\Ontwikkeling\SCORM\flexSco\scoTest.swf cannot access file://F:\Ontwikkeling\SCORM\flexSco\scoTest.html.
      at flash.external::ExternalInterface$/flash.external:ExternalInterface::_initJS()
      at flash.external::ExternalInterface$/call()
      at scoTest/::init()
      at scoTest/___Application1_creationComplete()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/set initialized()
      at mx.managers::LayoutManager/::doPhasedInstantiation()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/::callLaterDispatcher2()
      at mx.core::UIComponent/::callLaterDispatcher()

      When i test mij app in flex builder it works fine.
      Does anyone know what I do wrong?

      By the way this is mij flex code:

      import flash.external.ExternalInterface;
      private function init():void {
      if(ExternalInterface.available) {
      txtVersion.text = ExternalInterface.call("testcall", "cmi._version");
      }
      }
        • 1. Re: Flex and SCORM / LMS
          SmackHack
          Hi Henrik,

          I'm a newbee so keep that in mind.


          You are getting a Securety Sandbox violation. Meaning that you are trying to access something that the SWF file by default is not allowed to.

          When a Flex application accesses an external resource, two factors apply:

          Is the user authorized to access this resource?
          Can the client load the resource, or is it prevented from loading the resource, because of its sandbox limitations?
          The following basic security rules always apply by default:

          Resources in the same security sandbox can always access each other.
          SWF files in a remote sandbox can never access local files and data.

          Much of Flash Player security is based on the domain of origin for loaded SWF files, media, and other assets. A SWF file from a specific Internet domain, such as www.example.com, can always access all data from that domain. These assets are put in the same security grouping, known as a security sandbox. For example, a SWF file can load SWF files, bitmaps, audio, text files, and any other asset from its own domain. Also, cross-scripting between two SWF files from the same domain is permitted, as long as both files are written using ActionScript 3.0. Cross-scripting is the ability of one SWF file to use ActionScript to access the properties, methods, and objects in another SWF file. Cross-scripting is not supported between SWF files written using ActionScript 3.0 and files using previous versions of ActionScript; however, these files can communicate by using the LocalConnection class.

          Check out the following link

          hope it helped.
          Good luck
          SH
          • 2. Re: Flex and SCORM / LMS
            henk_jan
            Thanks for replying!

            I found the solution in the fact that I tested mij SCO localy. When I tested it in a real LMS (on a server) everything works fine. Where now looking for a way to set the security settings more mild to overcome this problem when we want to try it localy.