AS3 iOS Twitter Reader not working

I created a Twitter Feed reader using a tut from fladev.com.  By itself, it works GREAT! However when I try to incoroporate it into my fla for compiling into my ipa it doesn't work in my swf.  I know that if I compile the twitter reader at runtime with my main fla that it won't work in my ipa because my swf has a class as running in it. But when I try putting my twitter reader directly into my main fla I get nothing! My scene loads but it pulls down no data. Here is my class code that I am using:
package fladev.twitter
          import flash.display.Loader;
          import flash.display.Sprite;
          import flash.display.MovieClip
          import flash.events.Event;
          import flash.events.SecurityErrorEvent;
          import flash.net.URLLoader;
          import flash.net.URLRequest;
          import flash.text.TextField;
          import flash.events.MouseEvent;
  public class MainClass extends Sprite
                    public var content_txt:TextField;
                    public var posted_txt:TextField;
                    public var info_txt:TextField;
                    public var name_txt:TextField;
                    public var btnhome:MouseEvent;
  private static const USERNAME:String = "mytwitterid";
                    private static const URL:String = "http://pathtomyphp.com/proxy.php";
  private static const REQUEST:String = URL + USERNAME;
                    private var urlLoader:URLLoader;
                    private var xml:XML;
                    private var loader:Loader;
                    private var num:Number = 5;
                    public function MainClass() {
                              urlLoader = new URLLoader();
                              urlLoader.load(new URLRequest(REQUEST));
                              urlLoader.addEventListener(Event.COMPLETE, displayInfo);
                              urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurity);
                    private function onSecurity(e:SecurityErrorEvent):void
                    private function displayInfo(e:Event):void
                              xml = new XML(e.target.data);
                              content_txt.htmlText = getContent(0) +  getContent(1) +  getContent(2)+ getContent(3);
                               info_txt.text = "Followers: " + xml.status[num].user.followers_count + "; " + "Following " + xml.status[num].user.friends_count + "; " + "Tweets " + xml.status[num].user.statuses_count + ";";
  name_txt.text = xml.status[num].user.screen_name;
  loader = new Loader();
                              loader.load(new URLRequest(xml.status[num].user.profile_image_url));
                              addChildAt(loader, 1);
                              loader.x = 116;
                              loader.y = 102;
                    private function getContent(num:Number) {
  var posted:String = xml.status[num].created_at;
                              var content:String = "<font color='#224466'><a href=" + '"http://twitter.com/' + USERNAME + "/statuses/" + xml.status[num].id + '" target="_blank">' + xml.status[num].text + "</a></font><br/><font size='9'>" +"Posted on: " + posted.substr(0, posted.length - 11) + "; " + "From: " + xml.status[num].source + "</font><br/><br/>";
  return content;
Like I said, on its own, it works great, just not when I try to create a new scene in an existing fla.
Thanks in advance for any advice you can give me.  I'm a little bit of an as3 newbie, so please bare with me . . .

I put MainClass in the same folder as the fla (it was in a subfolder in the same directory) and I still get the 1180 and 1046 errors.  Just to confirm, I have this in the first frame of the timeline:
var mc:MainClass=new MainClass();
addChild(mc);
and here is what I have for MainClass:
package fladev.twitter
          import flash.display.Loader;
          import flash.display.Sprite;
          import flash.display.MovieClip
          import flash.events.Event;
          import flash.events.SecurityErrorEvent;
          import flash.net.URLLoader;
          import flash.net.URLRequest;
          import flash.text.TextField;
       public class MainClass extends Sprite
                    public var content_txt:TextField;
                    public var posted_txt:TextField;
                    public var info_txt:TextField;
                    public var name_txt:TextField;
                    private static const USERNAME:String = "ctistechapps";
                    private static const URL:String = "http://preview.fladev.com/how-to-build-a-flash-actionscript-3-0-twitter-widget/proxy.php?u rl=";
                    private static const REQUEST:String = URL + USERNAME;
                    private var urlLoader:URLLoader;
                    private var xml:XML;
                    private var loader:Loader;
                    private var num:Number = 1;//display first post info, you can use also ?count=5
                    public function MainClass() {
                              urlLoader = new URLLoader();
                              urlLoader.load(new URLRequest(REQUEST));
                              urlLoader.addEventListener(Event.COMPLETE, displayInfo);
                              urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurity);
                    private function onSecurity(e:SecurityErrorEvent):void
                    private function displayInfo(e:Event):void
            var _root:MovieClip = MovieClip(this.root);  // assuming you add this class instance to the main timeline before loading is complete.
            xml = new XML(e.target.data);                  
            _root.content_txt.htmlText = getContent(0) +  getContent(1)+ getContent(2) + getContent(3);  
            //trace(xml);
            //show some info about the user
            _root.info_txt.text = "Followers: " + xml.status[num].user.followers_count + "; " + "Following " + xml.status[num].user.friends_count + "; " + "Tweets " + xml.status[num].user.statuses_count + ";";
            //display the user account
            _root.name_txt.text = xml.status[num].user.screen_name;
            //create a loader for picture
            loader = new Loader();
            loader.load(new URLRequest(xml.status[num].user.profile_image_url));
            _root.addChildAt(loader, 1);
            loader.x = 116;
            loader.y = 102;
                    private function getContent(num:Number) {
                              //show just month, day and hour
                              var posted:String = xml.status[num].created_at;
                              var content:String = "<font color='#224466'><a href=" + '"http://twitter.com/' + USERNAME + "/statuses/" + xml.status[num].id + '" target="_blank">' + xml.status[num].text + "</a></font><br/><font size='9'>" +"Posted on: " + posted.substr(0, posted.length - 11) + "; " + "From: " + xml.status[num].source + "</font><br/><br/>";
                              //return all info
                              return content;

Similar Messages

  • Exchange mail after iOS 8 upgrade not working

    exchange mail after iOS 8 upgrade not working.
    I can not get email from my exchange account.
    Any suggestion?

    Just had this issue.  I turned WIFI off and it connected fine.  Then turned WIFI back on and working as always.
    It had something to do with the WIFI conflicting with the exchange server.

  • My iPhone 6 (iOS 8.2) not working in AirPort & AirPrint

    My iPhone 6 (iOS 8.2) not working in AirPort & AirPrint

    Hello ivanwutw,
    Thanks for using Apple Support Communities.
    It's not exactly clear what the issue is here with your AirPort Express or Extreme, but if you cannot connect to Wi-Fi on your iPhone, please follow the directions in the article below.
    If your iPhone, iPad, or iPod touch won’t connect to a Wi-Fi network - Apple Support
    Take care,
    Alex H.

  • Why does my card reader not work on my iPad since upgrade?

    I use my iPad mini to download photos from my camera when I'm on the road. In the summer I bought the "3 in 1 Card Reader Adapter Cable Camera Connection Kit, 3 Port Card Reader for iPad 4 and iPad Mini by Eurekka" and it worked wonderfully. I was able to download photos (jpg and RAW) directly to the iPad and off the camera, and once home it was a flawless upload to my iMac.
    However, once I upgraded to iOS 7 last week I get a message saying the device is not supported. What gives? Will this be fixed or will Apple products only accept Apple accessories from now on?

    No but I was just trying to find a way in to your help desk. I didn't find 
    your web page very helpful in this regard.
    Douglas Whiteley
    In a message dated 10/05/2012 20:43:50 GMT Daylight Time, [email protected] 
    writes:
    Re:  why does my adobe reader not work
    created by Claudio  González
    (http://forums.adobe.com/people/Claudio+González)  in Adobe Reader - View the full  discussion
    (http://forums.adobe.com/message/4395059#4395059)

  • My iphone4 ios 7.1 not working please help me

    My iphone4 ios 7.1 not working please help me

    What is not working? What trouble shooting have you tried? What were the
    results of the troubleshooting? If you received any error messages, what is the
    exact wording of those error messages?
    You need to provide more details before someone can offer a solution.

  • In my macbook pro hdmi, usb & SD card reader not working

    In my macbook pro hdmi, usb & sc card reader not working.
    i have tried the SRM reset done, till not working started.
    Could you please resolve this problem,

    Welcome to Apple Support Communities
    Simply take it to an Apple Store or reseller if it's in warranty. Your Mac will be repaired or replaced for free because it looks a hardware problem rather than a software issue.
    If it's not in warranty, hold Command and R keys while your MacBook is starting up, and reinstall OS X. If it doesn't work, you can't do much more to solve the problem

  • HP ProBook 440 G2, Finger print reader not working when I upgraded form Win 7 Pro to Win 8.1 Pro

    My HP ProBook 440 G2, Finger print reader not working when I upgraded form Win 7 Pro to Win 8.1 Pro.
    In device manager showing that biometric reader is working properly. But actually the finger printer reader is not reading or senseing. It seems like "dummy" part. Please help me to correctly configure step by step for this issue.
    thankyou
    Hillet
    This question was solved.
    View Solution.

    Have you installed the Validity Sensor Fingerprint driver software for Windows 8.1?
    http://h20564.www2.hp.com/hpsc/swd/public/detail?sp4ts.oid=6943811&swItemId=ob_134806_1&swEnvOid=415...
    See page 64 in the following Windows 8.1 user manual for Validity Fingerprint setup information
    http://h20565.www2.hp.com/hpsc/doc/public/display?sp4ts.oid=6943810&docId=emr_na-c04371762&docLocale...
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Adobe reader not working after cs5 install

    adobe reader not working after cs5 install

    Nobody can tell you anything without proper system info or other technical details like exact version info.
    Mylenium

  • My sd reader not working on my macpro anymore

    My Sd reader not working on my mac pro anymore?

    i am having the same problem with my new macbook pro i had to go get a USB SD reader

  • Have adobe reader 8.3.1 windows xp sp3 reader not working right and it wont let me remove or update

    I have adobe reader 8.3.1 on system windows XP SP-3. Reader not working correctly but it wont let me remove or change. I down loded Reader XI (11.0.2) but it will not open because of reader 8.3.1. How do I deactivate 8.3.1 and remove it? Reader 8.3.1 installed 9/14/2011. update ID (AC765BA86-7AD7-0000-2550-7ABC-40000831)

    You can try using this tool to remove all traces of previous version(s) of Reader:
    http://labs.adobe.com/downloads/acrobatcleaner.html
    Then, you may download the offline Reader installer from
    http://get.adobe.com/reader/enterprise/
    After downloading, restart your computer and run the installer before doing anything else.

  • Z61t SD card reader not working?

    z61t SD card reader not working?
    Tried the Vista driver and still not working.
    Same for camera.
    I am running Windows 7 64bit and using TVSU v4.0 as well as manual attempts to update.

    I am running windows 7 home 32 bit and can not get the sd card reader driver to load either.  Any help?

  • Pavilion dv6 sd card reader not working

    I have searched the boards and have not found an answer to my built in SD card reader not working any more.  It worked fine until a couple weeks ago. When I go to "my computer",  the sd card does not show up as an available drive. I have tried several cards with no luck. The cards work fine when I use a USB card reader, just not the built in one.
    I checked the driver in device manager - at least the one I believe is the correct one - Realtec PCIE Card Reader.
    Any other ideas? It is a pain having to carry around an extra card reader. Thanks for the help
    rv9a
    This question was solved.
    View Solution.

    Good morning rv9a.  
    Prior to the uninstall did the computer make a noise to indicate it recognized the card when you put it in?
    You should go ahead and reinstall the specific driver for the card reader just to make sure that doesn't have an effect on the issue.  Here is the link for Windows 7 and here is the link for Windows 8.
    Another possibility is the the Plug and Play service is deactivated.  Try the following to check.
    Press the Windows+R keyboard shortcut.  
    Type "services.msc" into the box and click okay.
    Scroll down until you find "Plug and Play" in the list.
    Ensure that it is started.  If it is not right-click on the service and select Start or Enable.
    I'll keep an eye out for your response; have a great day!
    Please click the white star under my name to give me Kudos as a way to say "Thanks!"
    Click the "Accept as Solution" button if I resolve your issue.

  • Sound issues; slow response; usb ports unreliable and sd reader not working

    The PC is a HP TouchSmart envy about 18 months old. Soon after purchasing I upgraded to Win 8.1.
    About three or four months -ago probably after a Win update was installed- I began to have Sound issues (including not able to conect my external powered speakers any more- they used to work brilliantly and initially no sound at all but I went into settings and changed something and every now and again I have to do that again to get the PC speakers to work) ; slow response; usb ports unreliable, sd reader not working- as well as issues with the internet - the modem actually. It is easier to get on to a tablet and use the internet as my PC can be really slow. As well I have uninstalled Chrome and am using Explorer as this seems a little better but I miss Chrome.
    I was advised by tech at Hervey Norman that I had to do a complete system restore but in order to do that I would need the recovery discs from HP? Is that correct? How do I do this?
    PS I did not make recovery discs when I first purchased the machine. (Very sad!!!)
    Help!!!
    Alfriston

    Hi again Alfriston,
    Thank you for the clarification!
    To return your computer's audio back to functional order, I recommend removing the audio driver from the operating system previous to upgrading to Windows 8.1, and installing the driver provided in this link. 
    If re-installing the driver does not resolve the issue, I suggest following the steps in this document on No Sound from the Speakers (Windows 8).
    In regards to the USB ports, I recommend following this resource on Troubleshooting USB Connections (Windows 8), which should help consistently connect your USB devices to your computer.
    To prevent your computer from lagging or responding in a slow manner, please follow the step in this document on Resolving Slow System Performance (Windows 8) to help improve the speed and efficiency of the operating system.
    To further diagnose the issue with your desktop's SD card reader, I recommend following this resource on Using and Troubleshooting Memory Card Readers (Windows 8).
    If your desktop still experiences issues with the audio, USB connections, speed and performance, as well as the SD card reader, I recommend returning your system back to a previous restore point. This can be done by following the steps in this document on Using Microsoft System Restore (Windows 8).
    Should the problem continue, I suggest performing a backup and recovery of your operating system. This can be done by following the steps in this resource on Backing Up Your Files (Windows 8), as well as Performing an HP system recovery (Windows 8). This should return your system back to factory defaults.
    If the issue persists, please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region.
    http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    I hope this helps!
    Regards
    MechPilot
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks” for helping!

  • Card reader not working out the box scr 3500?

    cac card reader not working out of box scr3500 help

    Welcome to discussions Kevin!
    I'm sorry to hear that first of all make sure that there is nothing sick on the eye of the camera it self, after that how is the lighting on the room that the computer will be set up? did the green light came on when you're trying to use iSight? i'm asking because the same thing happen to me but it was nothing but bad lighting in my office. If this doen't help call apple asap they should replace your computer with out a problem. Hope this helps good luck!
    Miguel

  • Fingerprint reader not working and cant drag icons after windows 10 update

    fingerprint reader not working and cant drag icons after windows 10 update

    Hello , Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums, I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More. I read your post about the Windows 10 update, and wanted to assist you! To start, can you please provide me with the Product Number of your notebook?  Here is a link you can use that will help you find your Model and Product Number: How Do I Find My Model Number or Product Number? In the meantime, I recommend using the Go back to an earlier build option, in your System Settings:
    HP Notebook PCs - Upgrading to Windows 10
    Once you are back to your original Operating System, check to see if you are experiencing the same issue. If not, then you may consider holding off on the Windows 10 update for a few weeks, until drivers can be updated. Please let me know if this information was helpful by clicking the thumbs up below.
    Have a great day!

Maybe you are looking for

  • How can I Fill up the applet form from VB code?

    Hi, I urgently required help in this issue. Please check the below URL : http://java.sun.com/applets/jdk/1.4/demo/applets/ArcTest/example1.html this is the sample i found on the java example page. What I want to do is? I want to opened that page in I

  • How can I create a new work center

    I try to create a new work center.I found a transaction 'OP42' . But I can't set a personal number and name.where should I write them, or should I use any other transaction?? Thanks...

  • IOS 7 Calendar and Slow Animations

    Are the two biggest fail on iOS 7. Slow animations: -opening folders -locking phone -unlockng phone -closing folders -search bar -swiping left and right has to be very accurate now because of the swipe down for search engine Calendar: Why am I restri

  • Trouble tethering my Canon 1Ds mk II with Lightroom 4.1 on Mac OSX 10.6.8.

    I had to get a Mac just to be able to use tethered shooting with my brand new 1Ds mk III (yes, brand new after 8 years not being used by it's previous owner, had 200 exposures on it) Windows XP was not an option and Canon support told me that they ne

  • Same Sequence# with different applied value in v$archived_log

    Hi everyone, I have an issue with one of the dataguard servers here. Basically, looking at the v$managed_standby, it is still applying the latest archived log sequence. However when I checked for unapplied archived log from v$archived_log, I found at