2 Replies Latest reply on May 29, 2008 7:21 AM by 248275

    Providing installation path to flash via XML

      I created an autorun in flash in which a tree component is assigned to show disc contents, populated by xml file and a button component, which installs the selected item in tree component. Here is the AS:

      var my_tree:mx.controls.Tree;
      var my_xml:XML = new XML();
      my_xml.ignoreWhite = true;
      my_xml.onLoad = function(success:Boolean) {
      if (success) {
      my_tree.dataProvider = this.firstChild;
      } else {
      trace("XML parsing error");
      var listener:Object = new Object();
      listener.change = function(evt:Object) {
      var treeNode:XMLNode = evt.target.selectedItem;
      if (treeNode.attributes.src != undefined) {
      selectCase.my_ldr.contentPath = treeNode.attributes.src;
      selectCase.heading = treeNode.attributes.heading;
      selectCase.description = treeNode.attributes.description;
      selectCase.License = treeNode.attributes.license;
      selectCase.instructions = treeNode.attributes.instructions;
      my_tree.addEventListener("change", listener);
      function installContent(){

      where the function installContent is assigned to the button on on(click) event. Here is the XML data:

      <?xml version="1.0" ?>
      <node label = "Freeware Items">
      <node label = "ABC" src="images/shock.jpg" heading="ABC" description="Essential tool to play some games." instructions="It is necessary to be connected to web to complete installation." license="Freeware" installpath="a_sitch_in_time.exe"/>
      <node label = "Shareware Items">
      <node label= "XYZ" src="images/Flash.jpg" heading="XYZ" description="Deliver rich web content, your only web authoring tool." instructions="Internet not necessary." license="Shareware" installpath="sweets_country.exe"/>

      The problem is, the button does not executes the exe file whether the file is put in the folder "fscommand" or not. Need help. Thanks