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 6474911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:38:35+00:00 2026-05-25T06:38:35+00:00

Is there any way to find out what methods get called when moving the

  • 0

Is there any way to find out what methods get called when moving the mouse over an object in a Flash project?

  • 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-25T06:38:35+00:00Added an answer on May 25, 2026 at 6:38 am

    So far @rvmook’s partial solution is the closest from my point of view. It would help if you use DisplayObjectContainer’s getObjectsUnderPoint() method to get a list of display objects you roll over, then loop through them and check which one has rollover/mouseover event handlers, then continue drilling down.

    So one short solution would be:

    1. Load the swf you want to find out the name of that rollover/mouseover handler.*
    2. Add a rollover handler(with bubbles set to true)
    3. In the rollover handler loop through the objects under the mouse that have rollover/mouseover handlers and get their details.

    Note! getObjectsUnderPoint() works if the loading swf has permissions from the domain hosting the loaded swf. One way to find areInaccessibleObjectsUnderPoint() method. If you own the loaded swf there shouldn’t be any problems. Otherwise you either need a crossdomain.xml on the domain hosting the loaded swf granting the loader swf’s domain access (and the loader swf should pass new LoaderContext(true) as the second parameter for load() method of the Loader intance) or use a server side script in the language of your choice to proxy/copy over the loaded swf first.

    Here’s a basic example of what I mean:

    package{
        import flash.display.*;
        import flash.events.*;
        import flash.geom.Point;
        import flash.net.URLRequest;
        import flash.sampler.getMemberNames;
    
        public class BasicInfoTest extends Sprite{
    
            private var cursor:Point = new Point();
    
            public function BasicInfoTest(){
                init();
            }
            private function init():void{
                var loader:Loader = addChild(new Loader) as Loader;
                loader.load(new URLRequest('B.swf'));
                addEventListener(MouseEvent.ROLL_OVER,onOver);
            }
            private function onOver(event:MouseEvent):void{
                cursor.x = mouseX;cursor.y = mouseY;
                var obj:Array = getObjectsUnderPoint(cursor);
                var numObj:int = obj.length; 
                for(var i:int = 0 ; i < numObj ; i++){//look for objects under cursor that have rollover/mouseover event handlers
                    if(obj[i].hasEventListener(MouseEvent.ROLL_OVER) || obj[i].hasEventListener(MouseEvent.MOUSE_OVER)){
                        var members:Object = getMemberNames(obj[i]);//use @rvmook's method to get listeners
                        for each (var name:QName in members){
                            if (name.localName == "listeners"){
                                for (var j : int = 0; j < obj[i][name].length; j++){
                                    var func:Function = obj[i][name][j];
                                    try{
                                        func.call();
                                    }catch(error:Error){
                                        trace('Methods called on mouse over:',error.message.split('on ')[1].split('.')[0]);//parse error message, you might need to adapt this
                                        trace('StackTrace',error.getStackTrace()); 
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    

    This should do if you only need to find out the name of the method.
    If you need further information, you could access the loaded swf’s bytearray and parse the actionscript bytecode to get information. I must admit binary and assembly are a bit out of my reach, but luckily there some great libraries out there to decompile swf files at runtime in as3. AS3SWF is a brilliant one, but does not deal much with actionscript tags, while as3commons is a great collection of libraries the specialize on the code aspect.

    Here is an adaptation of the previous example that uses the as3-commons libraries(bytecode,lang,logging and reflect) to display the method signature and body(as AVM2 instructions):

    package{
        import flash.display.*;
        import flash.events.*;
        import flash.geom.Point;
        import flash.net.*;
        import flash.sampler.getMemberNames;
        import flash.utils.ByteArray;
    
        import org.as3commons.bytecode.swf.SWFFile;
        import org.as3commons.bytecode.swf.SWFFileIO;
        import org.as3commons.bytecode.tags.DoABCTag;
    
        public class AdvancedInfo extends Sprite{
    
            private var cursor:Point = new Point();
            private var methodInfo:Array;
    
            public function AdvancedInfo(){
                init();
            }
            private function init():void{
                var byteLoader:URLLoader = new URLLoader(new URLRequest('B.swf'));
                byteLoader.dataFormat = URLLoaderDataFormat.BINARY;
                byteLoader.addEventListener(Event.COMPLETE,bytesLoaded);
            }
            private function bytesLoaded(event:Event):void{
                var ba:ByteArray = event.target.data as ByteArray;//get swf bytes
                var swfFile:SWFFile = new SWFFileIO().read(ba);//read the bytes using as3-commons
                var abcTags:Array = swfFile.getTagsByType(DoABCTag);//get actionscript bytecode (ABC) tags
                for each(var tag:DoABCTag in abcTags) methodInfo = tag.abcFile.methodInfo;//loop though tags and get method information
                //display and rollOver
                var d:Loader = addChild(new Loader()) as Loader;
                d.loadBytes(ba);
                addEventListener(MouseEvent.ROLL_OVER, rolledOver,true,0,true);
            }
            private function getMethodDetails(methodName:String):String{
                var result:String = '';
                for(var i:int = 0 ; i < methodInfo.length; i++){
                    if(methodInfo[i].methodName == methodName){
                        result += 'signature:\t'+methodInfo[i]+'\n';
                        result += 'body:\t'+methodInfo[i].methodBody;
                        return result;
                    }
                  }
                return result;
            }
            private function rolledOver(event:MouseEvent):void{
                cursor.x = mouseX;cursor.y = mouseY;
                var obj:Array = getObjectsUnderPoint(cursor);
                var numObj:int = obj.length; 
                for(var i:int = 0 ; i < numObj ; i++){
                    if(obj[i].hasEventListener(MouseEvent.ROLL_OVER) || obj[i].hasEventListener(MouseEvent.MOUSE_OVER)){
                        var members:Object = getMemberNames(obj[i]);
                        for each (var name:QName in members){
                            if (name.localName == "listeners"){
                                for (var j : int = 0; j < obj[i][name].length; j++){
                                    var func:Function = obj[i][name][j];
                                    try{
                                        func.call();
                                    }catch(error:Error){
                                        var methodName:String = error.message.split('on ')[1].split('.')[0].split('/')[1].split('()')[0]; 
                                        trace(getMethodDetails(methodName));
                                    }
                                }
                            }
                        }
                    }
                }
            }
    
        }
    }
    

    For documentation purposes here’s the code for the SWF I loaded:

    package {
        import flash.events.*;
        import flash.display.*;
    
        public class B extends Sprite {
            public function B() {
                addEventListener(Event.ADDED_TO_STAGE, init)
            }
            private function init(event:Event = null) : void {
                for (var i : int = 0; i < 1000 ; i++) {
                    var b:Sprite = addChild(new Sprite()) as Sprite;
                    b.graphics.lineStyle(Math.random()*3);
                    b.graphics.drawCircle(-3, -3, 3);
                    b.x = 3+Math.random() * stage.stageWidth - 6;
                    b.y = 3+Math.random() * stage.stageHeight - 6;
                    b.buttonMode = true;
                    b.addEventListener(MouseEvent.ROLL_OVER, onRollOver);
                }
            }
            private function onRollOver(event : MouseEvent) : void {
                event.currentTarget.scaleX = event.currentTarget.scaleY = .1 + Math.random() * 2.1;
            }
        }
    }
    

    and here is a sample of the method detail trace using the getMethodDetails in my AdvancedInfo example:

    signature:  private function QName[Namespace[private::B]:onRollOver](QName[Namespace[public::flash.events]:MouseEvent]) : QName[Namespace[public]:void]
    body:   
        private function QName[Namespace[private::B]:onRollOver](QName[Namespace[public::flash.events]:MouseEvent]) : QName[Namespace[public]:void]
        {   
            //maxStack=5, localCount=3, initScopeDepth=9, maxScopeDepth=10
            0:debugfile     [/Users/george/Documents/Flex Builder 3/Del/src;;B.as]:2
            2:debugline     [28]:4
            4:getlocal_0        :5
            5:pushscope     :6
            6:debug     [1, 18, 0, 28]:11
            11:debugline        [29]:13
            13:getlocal_1       :14
            14:getproperty      [QName[Namespace[public]:currentTarget]]:16
            16:getlocal_1       :17
            17:getproperty      [QName[Namespace[public]:currentTarget]]:19
            19:pushdouble       [0.1]:21
            21:getlex       [QName[Namespace[public]:Math]]:23
            23:callproperty     [QName[Namespace[public]:random], 0]:26
            26:pushdouble       [2.1]:28
            28:multiply     :29
            29:add      :30
            30:dup      :31
            31:setlocal_2       :32
            32:setproperty      [Multiname[name=scaleY, nsset=[Namespace[private::B], Namespace[public], Namespace[private::B.as$25], Namespace[packageInternalNamespace], Namespace[namespace::http://adobe.com/AS3/2006/builtin], Namespace[protectedNamespace::B], Namespace[staticProtectedNamespace::B], Namespace[staticProtectedNamespace::flash.display:Sprite], Namespace[staticProtectedNamespace::flash.display:DisplayObjectContainer], Namespace[staticProtectedNamespace::flash.display:InteractiveObject], Namespace[staticProtectedNamespace::flash.display:DisplayObject], Namespace[staticProtectedNamespace::flash.events:EventDispatcher], Namespace[staticProtectedNamespace::Object]]]]:34
            34:getlocal_2       :35
            35:kill     [2]:37
            37:setproperty      [Multiname[name=scaleX, nsset=[Namespace[private::B], Namespace[public], Namespace[private::B.as$25], Namespace[packageInternalNamespace], Namespace[namespace::http://adobe.com/AS3/2006/builtin], Namespace[protectedNamespace::B], Namespace[staticProtectedNamespace::B], Namespace[staticProtectedNamespace::flash.display:Sprite], Namespace[staticProtectedNamespace::flash.display:DisplayObjectContainer], Namespace[staticProtectedNamespace::flash.display:InteractiveObject], Namespace[staticProtectedNamespace::flash.display:DisplayObject], Namespace[staticProtectedNamespace::flash.events:EventDispatcher], Namespace[staticProtectedNamespace::Object]]]]:39
            39:debugline        [30]:41
            41:returnvoid       :42
        }
    traits=(no traits)
    

    For more information on the AVM2 instructions visit the documentation or the SWF File format specs (PDF link).

    Other options that involve 3rd party software which I haven’t fully explored would be:

    1. Using FlashFirebug – Personally I haven’t managed to get it
      running, maybe I didn’t setup correctly.
    2. Use getObjectsUnderPoint to trace information on objects(instance name/etc.) with rollover/mouseover handlers and then use a commercial decompiler to look for the handler using the information gained.

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to find out if a file is a directory? I
Is there any way to find out what exceptions might be thrown by any
Is there any way to find out if the user pressed the delete key
Is there any way to find out if a property is mapped to a
Is there any way to find out diagonals of quadrilateral if I only know
What have I marked as --assume-unchanged ? Is there any way to find out
I have a table with many rows, is there any way to find out
Is there any way I can find out in my app if the user
Is there any way to (programatically) find out what your app's name is? I'm
Is there any easy way to find out what T-SQL is being generated by

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.