Flash
  Home arrow Flash arrow Page 4 - Using XML and ActionScript with Flex Appli...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
FLASH

Using XML and ActionScript with Flex Applications
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 6
    2008-05-29

    Table of Contents:
  • Using XML and ActionScript with Flex Applications
  • Reading XML Data
  • Writing to and Editing XML Objects
  • Reflection
  • Getting the Class by Name

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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

    More Flash Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Programming Flex 2," published by...
     

    Buy this book now. This article is excerpted from chapter four of the book Programming Flex 2, written by Chafic Kazoun and Joey Lott (O'Reilly, 2007; ISBN: 059652689X). Check it out today at your favorite bookstore. Buy this book now.

    FLASH ARTICLES

    - 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
    - Organizing Frames and Layers for Flash Anima...
    - Organizing Frames and Layers
    - Using XML and ActionScript with Flex Applica...
    - Interfaces and Events with ActionScript and ...
    - Manipulating Data with ActionScript in Flex ...
    - ActionScript Syntax for Flex Applications







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT