5 Replies Latest reply on Aug 13, 2011 1:09 PM by helpAnoobOut

    Does Anyone know how to display this into a textfield???

    helpAnoobOut Level 1

      Hi, i have this code (from another thread), which was got through the support of fellow geniuses on this forum (thanks guys), but they showed how to put this into a textfield, which is what i want to do, but they showed how to do it before I made it display just the news feeds. So when i tryed to add what they taught me to this code BAM FAIL! So im asking one more/THE LAST TIME for the support from the forum to help a noob out and help me display this.

       

      Thanks in advance, I Appreciate all the support from the forum (especially Kglad, kennethKawamoto2 and many more) So one last time can you guys help a noob!

       

      Code:

       

      var loader2:URLLoader = new URLLoader(new URLRequest("https://graph.facebook.com/XXX/feed?access_token=XXXXXXXXXXXXXXXXXXXXXXXXXACESSTOKENXXXXXX XXXXXXXXXXXXXXXXXXX"));

      loader2.addEventListener(Event.COMPLETE, loadComplete2);

       

      function loadComplete2(e:Event):void {

          processData2(e.target.data);

      }

       

      function processData2(data:String):void {

          var facebookFeed:Array = JSON.decode(data).data as Array;

          for(var i:uint, feedCount:uint = facebookFeed.length; i < feedCount; i++){

              trace(facebookFeed[i].message);

          }

      }

        • 1. Re: Does Anyone know how to display this into a textfield???
          Ned Murphy Adobe Community Professional & MVP

          No idea what your data feed looks like but try...

           

          yourTextfield.text = "";

           

          function processData2(data:String):void {

              var facebookFeed:Array = JSON.decode(data).data as Array;

              for(var i:uint, feedCount:uint = facebookFeed.length; i < feedCount; i++){

                  trace(facebookFeed[i].message);

               

                 yourTextField.appendText(facebookFeed[i].message);

              }

          }

           

           

          where yourTExtField is whatever you name the textfield instance you are using.

          • 2. Re: Does Anyone know how to display this into a textfield???
            helpAnoobOut Level 1

            thanks very much! Once again the geniuses of the adobe forum solve something for a noob to help him understand AS3 slightly better! Thank You

            • 3. Re: Does Anyone know how to display this into a textfield???
              helpAnoobOut Level 1

              one more quick question. If i want to display each messae within another text field, how would i do this?

               

              something like var feed = new textfield?

              • 4. Re: Does Anyone know how to display this into a textfield???
                Ned Murphy Adobe Community Professional & MVP

                More like (just like... experiment to resolve details of it yourself... that's a good way to learn)...

                 

                var tField:Textfield = new TextField();

                addChild(tField);

                tField.text = facebookFeed[i].message;

                • 5. Re: Does Anyone know how to display this into a textfield???
                  helpAnoobOut Level 1

                  ok so i have been working on this all day, thanks again for your help. But the new piece of information you have given me has me stumped, i know its probably simple but i cant figure it out. I really have tried. The previous advice/help you gave me i understand, i even used it for twitter but when i tried to add the new var, i had no idea where to put it or what to replace in the previous code. The main problem is the fact the data displayed in the text field is not seperated, i mean every feed is not apart from each other,

                   

                  Dont worry about reading it, its just data from a random page, its displaying what i want yes! the news feeds, but it is not seperating them, it does it randomly on some things...

                   

                   

                  this is what i mean:

                   

                  Kissstory on the way to Eaton Sports Therapy sesh, yeeeeea. Brno MotoGP from Friday, nice little break :)Just cycled through Croydon, apart from nearly running a few people over who like to walk out without looking, I didn't see much. #RiotsJust watching news... police backing down from the rioters on a high street! They wanna burn the place down, burn them, flamethrowers!Now been told #LondonRiots is in to Epsom and Kingston... now that's way too close to me!! What a joke this country is.Got some very exciting 'Gino' stuff to release soon! And it's not t-shirts or stickers ;)wot a sexy brolly person tony cater had hehehe fair dos hun u james jamie and tony were making me giggle hehehe enjoy the rest of the day as some of us have to go to work so missing race 3 and supersport x x  xYou would win at Brands today if you were taken up on your offer !Going on Phoenix 98.0FM Live Radio in a few moments! Can listen online: http://t.co/YfrWWteCan't believe it's been 3 years since we lost Craig Jones. I remember watching it on the screen at the paddock show, I was in Superstock 600 at the time. Didn't know him that well but have one good memory of being with him at Misano, both climbing over a massive fence at night to jump in the swimming pool! RIP Jonesy #18What a fantastic weekends racing . Enjoyed a pit walk for the first time and was blown away by the whole experience. Watching back on tv you definately fell foul to commentators curse. You had pulled good ground back before the commentator mentioned how rarely you crashed. Next lap gone!!. The whole of the crowd were behind you. Inspiring hearty ride, and thanks for the courtesy shown to us when getting a signature. WSS SILVERSTONE – Davies fait le break

                   

                  Leader du championnat depuis l'épreuve d'Aragon, Chaz Davies s'est adjugé un quatrième succès cette saison. Résistant aux attaques de Florian Marino (9e après un superbe début de course), Fabien Foret (3e) et David Salom (2e), le Britannique ossède maintenant 42 points d'avance sur Salom, son premier poursuivant.

                  Pas de chance pour le pilote Honda Sam Lowes qui a chuté à l'entame du troisième tour. Son compatriote Gino Rea a également fait un tour dans les graviers lors des derniers