A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] [F8] OnClick/OnRelease

  1. #1
    Member
    Join Date
    Nov 2003
    Location
    Ontario, Canada
    Posts
    80

    resolved [RESOLVED] [F8] OnClick/OnRelease

    how do I add onclick events to MCs or Dynamic Text Fields

  2. #2
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    myMC.onPress = function (){
    trace("clicked");
    }
    Please sign here

  3. #3
    Member
    Join Date
    Nov 2003
    Location
    Ontario, Canada
    Posts
    80
    If I have nultiple instances of a movie clip, how can I have it use an onclick method for everyone, ,but have different actions.

    myMC.onClick() {
    action(someVariable);
    }

    withotu haveing to type the code into every MC

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Quote Originally Posted by Gemione
    If I have nultiple instances of a movie clip, how can I have it use an onclick method for everyone, ,but have different actions.

    myMC.onClick() {
    action(someVariable);
    }

    withotu haveing to type the code into every MC
    to target multiple instances, if they have a serail naming convention (mc1, mc2,mc3, etc.) use a for loop. If not use an array and a for loop.

    for different actions, same thing. Either a for loop or an array and a for loop.

    For more info on these methods see the livedocs a adobe.com. Or your help files.

    gparis

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