A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [CS3] trigger several functions

  1. #1
    Junior Member
    Join Date
    Nov 2006
    Posts
    17

    [CS3] trigger several functions

    Hi.
    This is really basic, I guess, but I need help.
    I want like to create a button which will perform three or four functions one after the other.
    I don't know the syntax.
    Do I have to build and write the functions first?
    How do I call them from the button.onRelease?
    Thanks in advance

  2. #2
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    I assume this is AS2 syntax

    btnInstanceName.onRelease = function (){
    functionOne();
    functionTwo();
    functionThree();
    }
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  3. #3
    Junior Member
    Join Date
    Nov 2006
    Posts
    17
    And where do I write the content of the functions?

  4. #4
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    Where ever you are writing the rest of the code.

    btnInstanceName.onRelease = function (){
    functionOne();
    functionTwo();
    functionThree();
    }

    function functionOne(){

    }
    function functionTwo(){

    }
    function functionThree(){

    }
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  5. #5
    Junior Member
    Join Date
    Nov 2006
    Posts
    17
    Thank you so much, kortex!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center