Search Flex Components Free

Custom Search

December 9, 2007

Loading data into Flash using AS3

The same but a different flavour

Ok, here am I again rewriting this tutorial, an old topic but important when writing dinamyc applications. Loading data makes movies change, is the foundation for what we call RIA (Rich Internet Applications) With the new AS3 version of ActionScript, Adobe encourages developpers to write classes instead of code splitted in many frames. Anyway you can script the "old way", that means just with some lines on a frame ... anyway we will take the easy approach, those will OOP knowledge will convert easy this lines to a class while others using timeline scripting could use as it is.

Goals

All around this tutorial, we will explore different ways of loading data into Flash. We are involved with dynamic content. Once you have your hard code movie, is time to move to a new scenario where data comes from outside world: a file or a database, this is the door for that Macromedia calls RIA, Rich Internet Applications. Whit out dynamic data, we can't think in real applications, but when we're able to talk to server side, we're just in the beginning of a new way of doing things ...
Trough this tutorial we will move always based on the same example: loading some image, a title and a comment about it, or with multiple data. a couple of images, titles and comments. Doesn't matter which file we use to store the external data: our goal is to load this piece of info and show into our movie. Remoting example use more data since is a more faster and advanced way of doing this.

This tutorial is divided into several parts, and if you have some knowledge, you can skip parts and go right away to the method you're looking for.

1. General loading principles
2. Loading data from text files
3. Loading data from XML files
4. Loading data from databases using name/value pairs (PHP example)
5. Flash Remoting (AMFPHP and Coldfusion examples)

Download examples files >>>

Related Flex Tutorials