7 Replies Latest reply on Nov 12, 2012 11:58 AM by kglad

    Issue with visibiliy of dynamic text and hyperlinks

    Karim Bizid

      Hi everyone,

       

      It's been a while since I've build a Flash site and a I'm finding a out a lot has changed.

       

      I'm building a simple site with some pictures, text and the 5 last posts from Twitter.

      This last one is not working out that well.

       

      First of all:

      The outputed data from Twitter is displayed into a dynamic text field which is working fine when I test the movie in Flash, but as soon as I upload it to my server the text is not visible.

      Flash already told me that I need to enclose my font in the movie (that's new for me) and I did that using the button in the properties windows.

      But it still won't work.

       

      I recreated the Twitter reader in a empty document to isolate it from my website during the troubleshooting.

      Here's the AS I'm using:

       

      var loadXML:XML = new XML();

          loadXML.ignoreWhite = true;

          loadXML.onLoad = processXML;

          loadXML.load("twitter.php"); //used when swf in placed on server

          loadXML.load("");

          

          function processXML(loaded:Boolean)

          {

              if(loaded)

              {

          

                  var node = this.firstChild;

                  tweet_1.text = node.childNodes[0].childNodes[2].firstChild;

                  tweet_2.text = node.childNodes[1].childNodes[2].firstChild;

                  tweet_3.text = node.childNodes[2].childNodes[2].firstChild;

                  tweet_4.text = node.childNodes[3].childNodes[2].firstChild;

          

                  var follower_count = node.childNodes[9].childNodes[11].childNodes[9].firstChild;// Creates variable

                  trace(follower_count); //loads variable into output

          

                  follower_count_txt.text = follower_count;// show follower count in text box

          

              }

          

              else

              {

                  error_txt.text = "Error loading XML file";

              }  

          

                          for (i=0; i<follower_count; i++)

                              {

                              _root.attachMovie("tweep_mc", "tweep"+i+"_mc", i);

                              _root["tweep"+i+"_mc"]._x = 150 + random(500);

                              _root["tweep"+i+"_mc"]._y = 150 + random(500);

                              trace(i);

                              }

          

                          trace(i);

          }

          

          follow_btn.onRelease = function()

          {

              getURL("");

          }

         

      facebook_btn.onRelease = function()

          {

              getURL("");

          }

       

       

       

      stop();

       

      Right here you can see the output of it on the server.

       

      The second issue:

      The items posted to Twitter will simply always contain pictures which Twitter posts as hyperlinks.

      Is there a way to make those hyperlinks function in my dynamic text field?

       

      Hope you guys can help me out!

       

      Thanks in advance!!

       

      Karim