2 Replies Latest reply on Jul 17, 2007 6:42 AM by Kal*

    SecurityError: Error #2148: issue

    Bob28
      I am getting a SecurityError: Error #2148: when I try to run an application where I created a component from Flash CS3 which communicates with a Flash Media Server to play an FLV file. The full message is as follows:

      SecurityError: Error #2148: SWF file http://localhost:8084/flex/nmDeploy/nmSite/nmSite.swf cannot access local resource C:\Program Files\Macromedia\Flash Media Server 2\applications\videoApp\streams\_definst_\dChild-JaRuleJloAkeys-WhatsGoingOn.flv. Only local-with-filesystem and trusted local SWF files may access local resources.
      at flash.net::NetStream/play()
      at fl.video::VideoPlayer/ http://www.adobe.com/2007/flash/flvplayback/internal::_play()
      at fl.video::VideoPlayer/ http://www.adobe.com/2007/flash/flvplayback/internal::_setUpStream()
      at fl.video::VideoPlayer/ http://www.adobe.com/2007/flash/flvplayback/internal::_load()
      at fl.video::VideoPlayer/load()
      at fl.video::FLVPlayback/::doContentPathConnect()
      I went onLine and found a recommendation to add the following information to the "Additional compiler arguments:"
      -use-network=false

      Even with this statment included I still receive the error message. Any recommendation on how to resolve this issue would be greatly appreciated.

      Thanks in advance,

      Bob
        • 1. Re: SecurityError: Error #2148: issue
          Bob28 Level 1
          Hello,

          I made a discovery, the problem only occurs when I try to play a FLV file in my component when the application is configured to use Flex Data Services. Although it is interesting to see the stream playing successfully my requirements need to use the Flex Data Services facility to communicate to my backend JAVA application and DB2 database. I am currently trying to use the new version of Flex data Services (Life Cycle Data Services) LCDS. Does anyone know of a resolution to deal with SecurityError: Error #2148 in a Flex Data Service Configuration?
          • 2. SecurityError: Error #2148: issue
            Kal*
            Thanks to Jeremy. I found a post on solution at http://groups.google.com/group/riadev/browse_thread/thread/85cc05c49c5ec50a/9a50ac7d94defe e8

            This is probably because all flex swfs are using local-with-network as the
            default sandbox, hence it won't have access to the local files (including
            images), one suggested solution is to add extra compiler argument:

            1. Right click on project > properties > flex compiler
            2. add this "-use-network=false" to "additional compiler arguments" field
            3. then recompile the swf

            See if this solve the security problem.
            Jeremy.