7 Replies Latest reply on Feb 21, 2012 1:02 AM by DirtySnipe007

    Button to file url works in preview but not when published

    DirtySnipe007

      I have a strange issue with flash.

       

      I have created a dynamic user interface which pulls urls from an xml file.

       

      Heres the structure

       

      Main movie

           care_btn movie

          

       

      action script for main movie is as follows

      links_xml = new XML();

      links_xml.ignoreWhite = true;

      links_xml.onLoad = function(success) {

          if (success) {

              trace("XML: " + links_xml);

              totalLinks = links_xml.firstChild.childNodes.length;

              trace("TOTAL LINKS: " + totalLinks + newline);

              /*

              //loop through XML to check values..

              for (i = 0; i < totalLinks; i++) {

              trace("LINK " + i + " DETAILS:");

              this[urlVar +i] = [links_xml.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue];

              urlvar1 = links_xml.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;

              trace("URL: " + this[urlVar+i]);

              _root[altVar+i] = links_xml.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;

              trace("ALT: " + _root[altVar+i]);

              _root[titleVar+i] = links_xml.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue;

              trace("TITLE: " + _root[titleVar+i]);

              trace("-------------------------------------");

             

              */

              //assign URL values to variables

              urlVar1 = links_xml.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;

              trace("URL1 = " + urlVar1);

              urlVar2 = links_xml.firstChild.childNodes[1].childNodes[0].firstChild.nodeValue;

              trace("URL2 = " + urlVar2);

              urlVar3 = links_xml.firstChild.childNodes[2].childNodes[0].firstChild.nodeValue;

              trace("URL3 = " + urlVar3);

          }else {

              trace("error loading xml");

          }

      };

      links_xml.load("links.xml");

       

      action script for the button is as follows

          

      on(press){

      getURL(_root.urlVar1);

      }

       

      The output when i preview displays the link ok

       

      URL1 = K:\Site Shared Student Data\

       

      and when i click on the button in the preview it opens the directory in windows explorer fine.

       

      But when i publish the movie and run the index.html file nothing happens when i click on the button.

       

      I have tried it in both ie8-9 and ff and nothing works.

       

      here is the index file

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

          <head>

              <title>flash</title>

              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

              <style type="text/css" media="screen">

              html, body { height:100%; background-color: #ffffff;}

              body { margin:0; padding:0; overflow:hidden; }

              #flashContent { width:100%; height:100%; }

              </style>

          </head>

          <body>

              <div id="flashContent">

                  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="800" height="600" id="flash" align="middle">

                      <param name="movie" value="flash.swf" />

                      <param name="quality" value="high" />

                      <param name="bgcolor" value="#ffffff" />

                      <param name="play" value="true" />

                      <param name="loop" value="true" />

                      <param name="wmode" value="window" />

                      <param name="scale" value="showall" />

                      <param name="menu" value="true" />

                      <param name="devicefont" value="false" />

                      <param name="salign" value="" />

                      <param name="allowScriptAccess" value="sameDomain" />

                      <!--[if !IE]>-->

                      <object type="application/x-shockwave-flash" data="flash.swf" width="800" height="600">

                          <param name="movie" value="flash.swf" />

                          <param name="quality" value="high" />

                          <param name="bgcolor" value="#ffffff" />

                          <param name="play" value="true" />

                          <param name="loop" value="true" />

                          <param name="wmode" value="window" />

                          <param name="scale" value="showall" />

                          <param name="menu" value="true" />

                          <param name="devicefont" value="false" />

                          <param name="salign" value="" />

                          <param name="allowScriptAccess" value="sameDomain" />

                      <!--<![endif]-->

                          <a href="http://www.adobe.com/go/getflash">

                              <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />

                          </a>

                      <!--[if !IE]>-->

                      </object>

                      <!--<![endif]-->

                  </object>

              </div>

          </body>

      </html>