Flash
  Home arrow Flash arrow Page 3 - Undocumented ActionScript Flash Hack
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  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
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

Undocumented ActionScript Flash Hack
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 25
    2004-09-27

    Table of Contents:
  • Undocumented ActionScript Flash Hack
  • ASSetPropFlags( )
  • Looking at the Prototype Property
  • Trace() Statements

  • 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
     
    Iron Speed
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Undocumented ActionScript Flash Hack - Looking at the Prototype Property


    (Page 3 of 4 )

    To see if there is anything interesting within the classes, we can look at each property of the classes in turn. If we hit upon theprototypeproperty — where methods and properties are stored for the class (whether using ActionScript 1.0 or 2.0) — looking at its properties and methods should reveal whatever interesting tidbits lurk there:

    // Set protection flags to 110 for _global to unhide everything
    ASSetPropFlags(_global, null, 6, 1);
    // List all objects in _global
    for (thisObject in _global) {
     ASSetPropFlags(_global[thisObject], null, 6, 1);
     trace("\n" + thisObject);
     for (props in _global[thisObject]) {
      trace(" " + props);
      // List subitems found under prototype.
      if (props == "prototype") {
       ASSetPropFlags(_global[thisObject].prototype, null, 6, 1);
       for (protoChain in _global[thisObject].prototype) {
        trace(" " + protoChain);
       }
      }
     }
    }

    If you attach the preceding code to frame 1 and test the movie in Flash MX 2004, you’ll see a lengthy display (which would stretch 10 pages in this book). The listing includes documented classes and their methods and properties, such as for the String class:

    String
    fromCharCode
    _ _proto_ _ 
    constructor
    prototype
    substr
    split
    substring
    slice
    lastIndexOf
    indexOf
    concat
    charCodeAt
    charAt
    toLowerCase
    toUpperCase
    toString
    valueOf
    _ _proto_ _ 
    constructor

    Note that this lists class methods and class properties followed by instance methods and instance properties indented under theprototype property.

     

    Buy the book!If you've enjoyed what you've seen here, or to get more information, click on the "Buy the book!" graphic. Pick up a copy today!

    Visit the O'Reilly Network http://www.oreillynet.com for more online content.

    More Flash Articles
    More By O'Reilly Media


     

    FLASH ARTICLES

    - Using XML and ActionScript with Flex Applica...
    - Interfaces and Events with ActionScript and ...
    - Manipulating Data with ActionScript in Flex ...
    - ActionScript Syntax for Flex Applications
    - ActionScript in Flex Applications
    - A Closer Look at Apollo`s File System API
    - Using the File System API
    - ActionScript 101
    - Flash Buttons
    - Advanced Flash Animation
    - Creating Your First Animated Movie with Flas...
    - Flash: Building Blocks
    - Building Preloaders
    - Fun Things to Do with Movie Clips in Flash MX
    - Referencing Movie Clips in Flash MX







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway