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  
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

Undocumented ActionScript Flash Hack
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 28
    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
     
     
    ADVERTISEMENT


    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

    - 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-2010 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek