78287

Passing params to an external swf via loader

Question:

I have a map of the US acquired from <a href="http://www.backspace.com/mapapp/" rel="nofollow">here</a> (called U.S. Map). I am currently generating XML from inside an ActionScript file, and would then like to display this map using my generated XML as the argument. According to <a href="http://www.backspace.com/mapapp/configure.html#embed" rel="nofollow">this</a>, to do this in html would require the following declaration:

world.swf?data_file=pathname/filename.xml

How can I replicate this behavior using the Loader from ActionScript? Right now I have:

var ldr:Loader = new Loader(); var url:String = "us/us.swf?data_file=senate.xml"; var urlReq:URLRequest = new URLRequest(url); ldr.load(urlReq); addChild(ldr);

I'd like to note that I've already seen <a href="https://stackoverflow.com/questions/426143/passing-paramaters-to-a-swf-via-loader" rel="nofollow">this</a>. However, it doesn't seem to be able to solve my problem, since I can't edit the US Map swf.

Answer1:

It sounds like what you want is URLVariables:

var variables : URLVariables = new URLVariables(); variables.data_file = "senate.xml"; urlReq.data = variables;

Recommend

  • Shiny R Zip multiple PDFS for download
  • Sorting date data in pandas Series
  • Reading a particular line by line number in a very large file
  • Convert a list to a string and back
  • Plotting a 3d data read from a file using mayavi
  • How do I get rid of this RunTimeError when trying some code out of Chapter 12 of the Beginning Ruby
  • How to identify line modifications separately from deletions in git log
  • How to identify line modifications separately from deletions in git log
  • FileReference vs File?
  • Add dynamic html to fancy box
  • jQuery Sound
  • Unwanted border appearing on video element [closed]
  • Why `Failed to execute 'pushState' on 'History'` when using `Link` from react-ro
  • SWIG ImportError: undefined symbol: _Py_RefTotal
  • Why Netbean ignore PHPUnit testsuite from the XML config?
  • Can an iframe pop up a Lightbox-style box?
  • What is the likely cause of a net::ERR_CONNECTION_ABORTED when uploading a file to Spring
  • Watson Conversation - Why is the ANYTHING ELSE node not chosen
  • pickle.PicklingError: args[0] from __newobj__ args has the wrong class with hadoop python
  • What Makes These Two Array Adds Different?
  • Using $compile in a directive triggers AngularJS infinite digest error
  • NUnit 3.0 TestCase const custom object arguments
  • how to upload multiple files in c# windows application
  • rspec simple example getting error on request variable in integration test
  • d3 v4 drag and drop with TypeScript
  • How to attach a node.js readable stream to a Sendgrid email?
  • Why does access(2) check for real and not effective UID?
  • Exception “firebase.functions() takes … no argument …” when specifying a region for a Cloud Function
  • How to install a .deb file on a jailbroken iphone programmatically?
  • Handling un-mapped Rest path
  • Illegal mix of collations for operation for date/time comparison
  • Spray.io: When (not) to use non-blocking route handling?
  • Where to put my custom functions in Wordpress?
  • R: gsub and capture
  • How to get icons for entities from eclipse?
  • Proper way to use connect-multiparty with express.js?
  • Load html files in TinyMce
  • JaxB to read class hierarchy
  • reshape alternating columns in less time and using less memory
  • How to Embed XSL into XML