1 Reply Latest reply on Nov 20, 2008 3:42 AM by sielco

    Stuck with Javascript restrictions

    sielco Level 1
      Hi, I am developing a desktop application in flex to convert older style html based content to XML. The structure and paths for the content is contained in javascript arrays held in a single file but there are lots of these files to go through in different locations, hence the need for an application.
      What I need to do is load in the javascript (dynamically) so I can read the array values within an HTMLLoader and then convert the arrays to XML however the javascript security restrictions are blocking me at every turn and is driving me nuts.
      I am now down to reading the javascript file in as a text file and doing text crunching to build the arrays for XML conversion but I am getting unstuck with this too.
      Someone please tell me that there is a simple way to read in a text file into a string? Or better still a tuitorial that explains the javascript security work around (using IFrames) that is actually easy to follow.
      Thanks in advance.
        • 1. Re: Stuck with Javascript restrictions
          sielco Level 1
          Hi, I used the readMultiByte functionality to pull in the javascript file as a string and then dynamically created an HTML wrapper using the HTMLLoader and loadString function. So far this is allowing me to move forward and does not force me to have all the javascripts to be converted sitting inside the application sandbox.