A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: invoke a button's onPress with actionscript?

  1. #1
    Junior Member
    Join Date
    Jan 2001
    Posts
    11

    invoke a button's onPress with actionscript?

    is it possible to invoke the on(press) code of a button through actionscript such that i can write a command like this elsewhere in the movie:

    someMC.someButton.onPress();

    I am trying to automate a set of movements and the code is already assigned to a button's onPress so I just want to be able to execute the specific button's onPress rather than take the code out of the buttons? Any ideas?

    Thanks in advance,

    --pkoanui

  2. #2
    Member
    Join Date
    Jul 2002
    Location
    Germany
    Posts
    31
    Put the commands for the button in a function. Then you can call this function from your button and from anywhere else.

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