Home arrow Flash arrow Page 4 - Using XML and ActionScript with Flex Applications
FLASH

Using XML and ActionScript with Flex Applications


In this conclusion to a five-part series on using ActionScript to build sophisticated programs in Flex, we will add XML to the equation. It is excerpted from chapter four of the book Programming Flex 2, written by Chafic Kazoun and Joey Lott (O'Reilly, 2007; ISBN: 059652689X). Copyright © 2007 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

Author Info:
By: O'Reilly Media
Rating: 3 stars3 stars3 stars3 stars3 stars / 20
May 29, 2008
TABLE OF CONTENTS:
  1. · Using XML and ActionScript with Flex Applications
  2. · Reading XML Data
  3. · Writing to and Editing XML Objects
  4. · Reflection
  5. · Getting the Class by Name

print this article
SEARCH DEVARTICLES

Using XML and ActionScript with Flex Applications - Reflection
(Page 4 of 5 )

ActionScript 3.0 supports class reflection using the following functions in the flash.utils package:

flash.utils package:ActionScript 3.0 supports class reflection using the following functions in the flash.utils package:

  1. getQualifiedClassName
  2. getQualifiedSuperclassName
  3. getDefinitionByName 
  4. describeType

We’ll next discuss each of these functions in more detail.

Getting the Class Name

You can retrieve the name of the class for which an object is an instance using the getQualifiedClassName() function. The function requires that you pass it a reference to an object; it then returns the fully qualified class name:

  var loader:URLLoader = new URLLoader();
  var className:String = getQualifiedClassName(loader);
 
trace(className); // Displays flash.net.URLLoader

If you want to retrieve the fully qualified superclass name for an object, you can use thegetQualifiedSuperclassName()function:

  var loader:URLLoader = new URLLoader();
  var className:String = getQualifiedSuperclassName(loader);
  trace(className); // Displays flash.events.EventDispatcher


blog comments powered by Disqus
FLASH ARTICLES

- More Top Flash Game Tutorials
- Top Flash Game Tutorials
- Best Flash Photo Gallery Tutorials
- The Top Flash Tutorials for Menus
- 7 Great Flash Tutorials
- Adobe Creative Suite 5.5 Now Available
- Critical Flash Vulnerability Heats Up the Web
- More on Nonpersistent Client-Side Remote Sha...
- Nonpersistent Client-Side Remote Shared Obje...
- Using the Decorator Pattern for a Real Web S...
- Using Concrete Decorator Classes
- Delving More Deeply into the Decorator Patte...
- The Decorator Pattern in Action
- A Simple Decorator Pattern Example
- Decorator Pattern

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials