3 Replies Latest reply on Jan 24, 2011 7:00 AM by kglad

    Help with working script that won’t convert på higher version player (As2)

    mobius60

       

      HI have an issue with a file that was created some time ago to Fplayer v6 and when I now “upgrade” it to 8-9 or 10 it does not load the xml links ;/
      I have no idea why, the file(s) works fine in the old player 6

       

      I have a set of xml files (note: one file for each country on a map,and the possible solution should not include to put all links in the same xml file)

      the xml looks like this (example is for Denmark file called dk.xml):  [code]

       

      …………………………………………………………………………………………………………

       

      <broadcast>

      <story>

      <lead>www.alink.com</lead>

      <URL>http://www.alink.com/</URL>

      </story>

      </broadcast>

      …………………………………………………………………………………………………………

      So in the flash file I have a set of buttons the does a few actions
      one action is to call/go to a specific frame in a MC in that frame I put the Xl loading stuff for each frame (lable)
      [code]
      -.--------------------------------------------------------------------------------------- -----------

      headlineXML = new XML();
      headlineXML.onLoad = myLoad;

      headlineXML.load("be.xml");
      function myLoad(ok) {
                                   if (ok == true) {
                                   Publish(this.firstChild);
                                   }
      }
      function Publish(HeadlineXMLNode) {
      if (HeadlineXMLNode.nodeName.toUpperCase() == "BROADCAST") {
      content = "";
      story = HeadlineXMLNode.firstChild;
      while (story != null) {
                                   if (story.nodeName.toUpperCase() == "STORY") {
                                   lead = "";
                                   URL = "";
                                   element = story.firstChild;
      while (element != null) {
      if (element.nodeName.toUpperCase() == "LEAD") {
      lead = element.firstChild.nodeValue;

                                                                                                                                                        }

      if (element.nodeName.toUpperCase() == "URL") {

                                   URL = element.firstChild.nodeValue;                                                                                                                   
      }                                                         element = element.nextSibling;

      }

      content += "<font size='+2' color='#3366cc'><a href='"+URL+"'>"+lead+"</a></font><br>"+body+"<br><br>";

      txt.htmltext=content;
      }

      story = story.nextSibling;
      }

      }

      }
      ----------------------------------------------------------------------------------------- ----------------
      the button (main stage)  that calles the MC frame lable with the xml that loads the load thex and a link into a dynamic txt box (called “txt”), has this code on it: [code]

      ----------------------------------------------------------------------------------------- -----------------

      on (press) {
                                   infoon("DK");
      }

      on (rollOver) {
                                   DK._alpha = 50;
      }

      on (releaseOutside, rollOut, dragOut) {
                                   DK._alpha = 100;
      }

      ----------------------------------------------------------------------------------------- -----------------

      so as said it works fine in FP 6 (as2)  but when published to FP 8 -9 or 10 only the XML does not load at all
      What could be the issue (I know that it is old code and it is pretty poor and should be fully upgraded but my
      skills is not on that level, I managed to make the above work from some tutorials but understanding the publishing issues
      is a bit over my head
      J

       

      I would be extremely gratefull if anyone could help me out it is really frustrating especially since the file actually works fine
      in the old player ;/

      best

      OrsonB