4 Replies Latest reply on May 26, 2010 8:13 AM by rj.owen@effectiveui.com

    when i create a new project, my application cannot find textLayout_1.0.595, is this a bug??

    cyber0897

      hey guys, so this is the second time this has happened, im not sure what i did the first time to fix the error but when i create a new project and create a textinput box in there, i get the following error,

       

      "SecurityError: Error #2148: SWF file file:///Users/tkanagala/web projects/flex 4/podcast/bin-debug/podcast.swf cannot access local resource file:///Users/tkanagala/web%20projects/flex%204/podcast/bin-debug/textLayout_1.0.0.595.sw f. Only local-with-filesystem and trusted local SWF files may access local resources."

       

       

      any ideas why??

        • 1. Re: when i create a new project, my application cannot find textLayout_1.0.595, is this a bug??
          Jason San Jose Adobe Employee

          Sounds like that location isn't one of the defaults added to the trust file. Update your trust file http://livedocs.adobe.com/flex/3/html/help.html?content=05B_Security_03.html.

           

          Jason San Jose

          Software Engineer, Flash Builder

          1 person found this helpful
          • 2. Re: when i create a new project, my application cannot find textLayout_1.0.595, is this a bug??
            Peter deHaan Level 4

            Not sure why you'd see that, but I imagine you could get around it by disabling RSLs and merging the framework code.

             

            Project > Properties > Flex Build Path > Framework linkage --> Merged into code

             

             

            Peter

            • 3. Re: when i create a new project, my application cannot find textLayout_1.0.595, is this a bug??
              cyber0897 Level 1

              hey guys... thanks soo much for replying so fast... i did what you suggester peter, it seems to have fixed that error but i now get "faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP'" error but i suspect that has more to do with my http service.

               

              long time ago someone told me that changing the framework linkage to merged into code could be potentially dangerous for security or something, is this true??

              • 4. Re: when i create a new project, my application cannot find textLayout_1.0.595, is this a bug??
                rj.owen@effectiveui.com

                I get the same error.  This isn't something you should have to update a policy file for - it seems like a flash builder error in the way it generates the library swf.  The steps I took were:

                 

                - create a new application

                - type some basic demo app code or paste in code.  In my situation I pasted in some charting examples from the docs (appended to the end)

                - click "run"

                - the error appears:

                 

                SecurityError: Error #2148: SWF file file://localhost/Users/rj.owen/Documents/ProjectFiles/TIAA-CREF/code/tiaa-eii/production/ ChartingTests/bin-debug/ChartingTests.swf cannot access local resource file://localhost/Users/rj.owen/Documents/ProjectFiles/TIAA-CREF/code/tiaa-eii/production/ ChartingTests/bin-debug/textLayout_1.0.0.595.swf. Only local-with-filesystem and trusted local SWF files may access local resources.

                at flash.net::URLStream/load()

                 

                I'll go post on JIRA as well.

                 

                the code I used was:

                <?xml version="1.0" encoding="utf-8"?>

                <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                   xmlns:s="library://ns.adobe.com/flex/spark"

                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">

                 

                <fx:Script>

                <![CDATA[

                 

                import mx.collections.ArrayCollection;

                 

                [Bindable]

                public var stockDataAC:ArrayCollection = new ArrayCollection( [

                {date: "2005, 7, 27", close: 41.71},

                {date: "2005, 7, 28", close: 42.21},

                {date: "2005, 7, 29", close: 42.11},

                {date: "2005, 8, 1", close: 42.71},

                {date: "2005, 8, 2", close: 42.99},

                {date: "2005, 8, 3", close: 44} ]);

                 

                public function myParseFunction(s:String):Date {

                // Get an array of Strings from the comma-separated String passed in.

                var a:Array = s.split(",");

                // Create the new Date object. Subtract one from

                // the month property because months are zero-based in

                // the Date constructor.

                var newDate:Date = new Date(a[0],a[1]-1,a[2]);

                return newDate;

                }

                ]]>

                </fx:Script>

                 

                <mx:Panel title="DateTimeAxis Example" height="100%" width="100%">

                 

                <mx:LineChart id="mychart" height="100%" width="100%"

                  paddingRight="5" paddingLeft="5"

                  showDataTips="true" dataProvider="{stockDataAC}">

                 

                <mx:horizontalAxis>

                <mx:DateTimeAxis dataUnits="days" parseFunction="myParseFunction"/>

                </mx:horizontalAxis>

                 

                <mx:verticalAxis>

                <mx:LinearAxis baseAtZero="false" />

                </mx:verticalAxis>

                 

                <mx:series>

                <mx:LineSeries yField="close" xField="date" displayName="AAPL"/>

                </mx:series>

                </mx:LineChart>

                 

                </mx:Panel>

                </s:Application>