Lesson 9. Creating Dynamic Content

I l @ ve RuBoard

You can create dynamic content in Flash with ActionScript. Using a variety of actions and methods , you can request information from server-side scripts. Those scripts can request information from a database and return the data to Flash. Flash doesn't care what language the scripts are written in, as long as the data is returned in a format it can understand. Some of the most commonly used languages for server-side scripts include ASP, Macromedia ColdFusion, PHP, and Perl.

In this lesson you will create an interactive map. The map is accompanied by a dynamically generated list of animals in the zoo. You can narrow the list to show animals from a specific location in the zoo by clicking parts of the map. You can also display additional information about each animal by clicking its name in the list. You will use the LoadVars object, dynamic text boxes, and several components to create this map.

You can create dynamic content in Flash.

Chrissy Rey

graphics/09fig01.gif

In order to successfully complete this lesson, you should have an Internet connection. This lesson connects to several files on the Internet. If you do not have an Internet connection, you can build the files, but you will not be able to view the data or send data to the server.

WHAT YOU WILL LEARN

In this lesson, you will:

  • Add a map and several component instances to the movie

  • Learn how to use the ListBox UI component.

  • Load variables from a data source on a server using the LoadVars object

  • Display dynamic content in an instance of the ListBox component and a dynamic text box

  • Learn how to use the ScrollBar component

  • Use the setEnabled method to disable and enable a component instance

  • Display dynamic content in an instance of the ComboBox component

  • Send data from a Flash movie to a script on a server

APPROXIMATE TIME

This lesson takes approximately two hours to complete.

LESSON FILES

Media Files:

Lesson09/Assets/map.swf

Lesson09/Assets/style.as

Lesson09/Assets/assets.fla

Lesson09/Assets/map.php

Lesson09/Assets/animals.php

Lesson09/Assets/guestbook.php

Starting Files:

Lesson09/Assets/guestbook7.fla

Completed Project:

Lesson09/Completed/map5.fla

Lesson09/Completed/guestbook8.fla

I l @ ve RuBoard


Macromedia Flash MX. Training from the Source
Macromedia Flash MX: Training from the Source
ISBN: 0201794829
EAN: 2147483647
Year: 2002
Pages: 115
Authors: Chrissy Rey

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net