Nested function call : Function : Function Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Function » Function »

 

Nested function call


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        function1();
        function2();

    }
    function function1():void{
        function2();
    

    function function2():void{
      if(arguments.caller == function1)
        trace("function2 called from function1");
      else
        trace("function2 not called from function1");
    

  }
}
// function2 not called from function1
// function2 not called from function1

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Function
» Function