1. You must find in which source file the button is defined.
It can be in a .mxml file or in a .as file.
Usually, UI controls are defined in a .mxml file, in a <mx:Button/> or in a
<s:Button/> tag (this is the most common scenario).

2. Once you have found where the button control is defined (I presume the
button is defined in a tag in a mxml file) you should easily find the name
of the click handler :

3.1 : The most common scenario is that the click handler is defined inside
the tag like : click="someFunctionName(someargument)". In that case, you
simply go to the "someFunctionName" definition where you will find how the
click event is handled.

3.2 : It is also possible that the click handler is "wired" to the button by
some actionscript code. In that case, there must be some
"buttonId.addEventListener" statement somewhere in the actionscript code (of
course, "buttonId" should be the *real* id of your button control, as
defined by the "id" attribute of the "button" element). In that case, just
go to the definition of the function attached to the button by the
addEventListener statement.

(if the button is not defined by a <mx:Button/> nor a <s:Button/> tag, it
will be a bit more complicated....)

Good luck

Nicolas Granon



> -----Message d'origine-----
> De : jiteshks [mailto:jites...@yahoo.com]
> Envoyé : samedi 21 octobre 2017 19:15
> À : users@flex.apache.org
> Objet : RE: How to find code behind a button in Flex UI
> 
> Thanks Nicolas for replying.
> 
> Yes I have the access to source code. How should I go about finding out
> what happens on the click of a button?
> 
> 
> 
> 
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Reply via email to