background preloader

Embed

Facebook Twitter

How to build a Flash ActionScript 3.0 Twitter Widget. GET statuses/show/:id. Returns a single Tweet, specified by the id parameter. The Tweet's author will also be embedded within the tweet. Resource URL Extended description About Geo If there is no geotag for a status, then there will be an empty <geo/> or "geo" : {}. Contributors If there are no contributors for a Tweet, then there will be an empty or "contributors" : {}. This object contains an array of user IDs for users who have contributed to this status (an example of a status that has been contributed to is this one). Tutorial: Creating Flash Twitter Widget (AS3) By Blue_Chi | Flash CS4 | ActionScript 3.0 | Intermediate | Page 1, 2, 3 In this section we will load our Twitter data and display it through our Tweet text fields.

The Twitter data is structured in XML format, so we are going to use the URLLoader Class and the XML Class to take care of this. Displaying on the text fields will be done using the basic properties of the Text Field Class. By the end of this section you will have a functional widget that works properly on your desktop.

This page is divided into the following sections: Loading the Twitter data using the URLLoader Class. Loading the Twitter Data using the URLLoader Class First of all you should know that the latest Tweets of any user can be retrieved from Twitter via the following link: You can replace the last part with the ID of any Twitter user to retrieve the data of that user, assuming of course that this user has made his twitter account public. Processing the XML Data Summary. How to build a Flash ActionScript 3.0 Twitter Widget | FlaDev.

Since Twitter is the largest social networking and microblogging service that enables its users to send and read messages, today I’ll show you how to build a Flash ActionScript 3.0 Twitter Widget that read twitter posts using Twitter API. Just put your username and you are good to go. Also, before starting, please study the user_timeline. Preview Settings all files Create a new ActionScript File and save it as “MainClass.as” (fladev.twitter.MainClass) – this will be the Main Class for our flash file; the package classes extends the Sprite class (since we don’t have a timeline animation). MainMovie First of all let’s create a background for this widget. “content_txt” for content, choose multiline in textfield panel“info_txt” for user info“name_txt” for user account In this last version, I put a MovieClip called preloader, in order to show something until load is completed.

All textfields must have embed characters and “Render text as HTML” option checked; MainClass.as The Constructor Function. Writing the Twitter Widget Functionality | Creating a Twitter Widget with Flash. Now that you have your widget designed, you can start writing code. Create a new ActionScript file called Tweeter.as and add it as the Document class in your Flash tweeter.fla file. Tweeter.as has been added to the com.studiosedition package. Therefore, you'll need to save Tweeter.as into a corresponding folder structure; for example, com/studiosedition (see Figure 5). Listing 1 shows the Tweeter.as file. We'll examine the code in detail after the listing. Listing 1—Creating the Twitter widget (Tweeter.as). Tweeter.as starts with the package name and then the imported packages we'll need to use.

With the URLRequest in place, we create a URLLoader instance, add a few event listeners to handle the response, and finally load the request. Success I/O error Security error Since error handling can easily be a separate set of articles, I've only written simple callback functions for the I/O and security errors.

Functionality Behind the Twitter Messages.