Yes, Suhas -- but the function is scoped to the timeline in which it was created, not the object doing the calling. So how do you return the ID of the calling object?

  - Marc

At 09:02 AM 10/7/2006, you wrote:
Initialise objects with unique ID's which will help you later to determine
which object is calling the function.

Suhas

On 10/7/06, Ramon Miguel M. Tayag <[EMAIL PROTECTED]> wrote:

Hi everyone,

How do you find out which object calls a particular function?  Is it
even possible?

Let's say there are two classes:

class A
{
        function A(){}

        function hello()
        {
                trace ("hello");
                //I want to know who called me, here
        }
}

class Main
{
        var a = new A();

        function Main()
        {
                a.hello();
        }
}

=========

How will A know that Main called the function?

Thank you,
--
Ramon Miguel M. Tayag
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



--
Dr. Suhas Pharkute, PhD
Syna Intelligence, LLP
V. 208 830 8915 (C)
E. [EMAIL PROTECTED],.com
W. http://synaintel.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to