Posts Tagged ‘URLLoaderDataFormat’

Sample Flash AS3 Code to Help Designers and Developers Handle Data and Communication

February 7, 2008

Key to the Sheridan Interactive Multimedia program curriculum is teaching learners to build environments in which end users can communicate with each other. To do this, we need interfaces for input and display and we have to get data to and from the server. Think facebook, flickr, YouTube, etc.

Adobe Flash provides many communication classes and methods such as:

  • User Interface Components:
    • Button
    • CheckBox and RadioButton (Check Box & Radio Button)
    • ComboBox and List (Combo Box)
    • TextArea, TextInput and Label (Text Area & Input)
    • NumbericStepper and ScrollPane (Numeric Stepper & Scroll Pane)
    • Slider and TileList (Tile List)
    • DataGrid (Data Grid)
  • navigateToURL to load a Web Page from Flash
  • SharedObject to save a Flash “cookie”
  • FlashVars & SWF Query String to pass variables into Flash
  • ExternalInterface to call a function in Flash from JavaScript
  • Loading a SWF with Loader and URLRequest
  • FileReference to upload a local file to be used by flash
  • URLLoader and URLVariables to retrieve text or server output
  • XML to send and receive XML
  • Web Services to connect to scripts on other servers
  • Remoting to avoid serializing and deserializing data

Here are links to content examples from our curriculum for all of the above except Web Services and Remoting. The Sheridan lessons include more than the content – there are supporting lesson plans, definition documents, steps for building, supplementary links, reflection forms, and in class explanation, lab work, assignments, exams and final projects. If you are looking into schooling in multimedia, please visit the Sheridan Interactive Multimedia site for more information on our one year post grad program.

User Interface Components

Click here for code example

Flash AS3 Components

Communication 1 – navigateToURL, SharedObject, FlashVars, ExternalInterface, Loader, URLRequest and FileReference

Click here for code example

Flash AS3 Communication

Communication 2 – URLLoader and URLVariables to get text or server script data (PHP, MySQL)

Click here for code example

Although we recommend the Falcon Data Class for this type of connection

Flash AS3 Communication

XML in Flash

Click here for code example

Although we recommend the Falcon Data Class for this type of connection

XML in Flash CS3


%d bloggers like this: