Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6189103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:21:00+00:00 2026-05-24T02:21:00+00:00

I’m used to a more event driven environment but the copy I’m working at

  • 0

I’m used to a more event driven environment but the copy I’m working at now dose everything as function call backs. When I asked about this one of the devs said it was because callbacks are faster because of bubbling, but the bubbling property could always be set to false…

So I’m having the problem of trying to figure out which callback function is being referenced.

For example:

public class A {
    public function A(){}
    public function func_1():Number{ return 1; }
    public function func_2():Number{ return 2; }
    public function doSomething:Function{ 
        if( Math.random > 0.5 ) return func_1; else return func_2;
    }
}

Then I might run the code in class B:

public class B{
    public var a:A = new A();
    private var action:Function;
    public function B(){ action = a.doSomenthing(); }
}

So when I put a break point inside B I get action = Function (@34567) which is really completely useless… I realize I could put a break point in both func_1 and func_2 but I’m just using this as a general example there are function callbacks sprinkled through out the code… is there a way to get the name of a function by memory address? Thanks

I guess I see what you are saying about the stack trace. But you have to physically step over the function in the code. In this example below I’d have to put a break point on callback(); and step over it to see the stack trace update. The issue is I want to know the callbacks before they are called. Sometimes they are called in other places. There is no other way to get the callback?

public var callbacks:Array = [];
public function loadURL( url:String, callback:Function ){
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    callbacks.push( callback );
    var request:URLRequest = new URLRequest(url);
    loader.load(request);
}

public function completeHandler( event:Event ):void
{
    for( var i:int = 0; i < callbacks.length; i ++ ){
        var callback:Function = callbacks[i];
        callback();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:21:00+00:00Added an answer on May 24, 2026 at 2:21 am

    This is incredibly wonky code, but for the sake of this example you can use the call stack from the debugger:

    enter image description here

    Your example code had many issues, but this capture is based upon minor tweaks to your implementation:

    package
    {
        import flash.display.Sprite;
    
        public class MultiCallback extends Sprite
        {
            public function MultiCallback()
            {
                super();
    
                var b:B = new B();
                b.action()();
            }
        }
    }
    
    
    internal class A
    {
        public function A()
        {
        }
    
        public function func_1():Number
        {
            return 1;
        }
    
        public function func_2():Number
        {
            return 2;
        }
    
        public function doSomething():Function
        {
            if (Math.random() > 0.5)
                return func_1;
            else
                return func_2;
        }
    }
    
    internal class B
    {
        public var a:A = new A();
    
        public var action:Function;
    
        public function B()
        {
            action = a.doSomething;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to construct a data frame in an Rcpp function, but when I
I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.