arguments.callee Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
arguments.callee Property Flash 5

a reference to the function being executed read/write
arguments.callee

Description

The callee property stores a reference to the function currently executing. We can use this reference to execute the current function again or to identify the current function through comparison.

Example

function someFunction () {   trace(arguments.callee =  = someFunction);    // Displays: true }     // An unnamed recursive function countToTen = function () {   i++;    trace(i);   if (i < 10) {     arguments.callee();   } };     // Invoke the unnamed recursive function countToTen();
     



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net