2 Replies Latest reply on Jan 1, 2007 2:41 AM by Pungy

    SecurityError: Error #2148

      I'm having problems with (1) understanding why this error (show below) happens, and (2) what I have to do to correct it. Note: this error occurs when i try to view a video file after I haved moved my app to a new folder, or other part of my filesystem...

      SecurityError: Error #2148: SWF file file:///C:/flex_apps/bin/displaydata.swf cannot access local resource file:///C:/flex_apps/bin/01.flv. Only local-with-filesystem and trusted local SWF files may access local resources.
      at flash.net::NetStream/play()
        • 1. Re: SecurityError: Error #2148
          cws14 Level 1
          Hi, I'm not sure if this will actually help you Pungy, since you posted awhile ago and may have already found the answer, but I'll post it anyways in hopes of helping others.

          I came up with the same problem/error when moving my files to another location, I got the #2148 Security error, the solution that worked for me is add this "-use-network=false" compiler directive to the compiler flags when you compile your flex app (either on the command-line, or if you are using flex builder, go to Project Menu > properties > Flex Compiler and add that tag to the "additional Compiler arguments" section.

          Now I have no idea what the ramifications of this directive are in the long run, but it's worked for me so far.

          Hope this Helps!
          - c
          • 2. Re: SecurityError: Error #2148
            Pungy Level 1
            Thanks for your reply and help, ... I've added this attribute and value to my compiler in flex builder a while ago (I cannot remember now where I found this but it took a while) and it seem to have fixed it. So far it's worked fine as I'm nearly finished a flex app where users can navigate the flex UI and run flv files off a CD.

            Kind Regards and thanks again for your help.