A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [MX] conditional statements for Mc's

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    6

    [MX] conditional statements for Mc's

    hello all who are viewing this.
    Ive posted a few questions on this forum but tend not to get any replies I dont know if my enquiries are too simple to reply to but again i will ask for help.
    I have created some characters for a menu.
    which will play with on (rollOver) with an invisible button.
    I have attached a file for all to see.
    My problem is that I need to write a conditional statement for the invisible button. Whats supposed to happen is that the Mc, (which is a simple alpha tween) plays and when certain frames are reached triggers other Mc's to play.
    But I want to write a conditional statement to stop when the user rolls over the invisible button a second time the Mc going back to the beginning and starting again (check the attachment).
    I know how to do this with a button when loading MP3's (boolean true, false)
    but not with a Mc. I know this must be simple but cant get my head around it. All the examples Ive seen are usually with Numerical values such as a quiz.
    anybody out there can help me?????



    so that when the user rolls over the invisible button the affected movie clip only plays once instead of going back to the beginning
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    But I want to write a conditional statement to stop when the user rolls over the invisible button a second time
    You would logically set a variable to true on rollOut.
    example:
    code:
    // Set your variable
    done = false;
    button.onRollOver = function() {
    if (!done) {
    // play your timeline
    } else {
    // do something else
    }
    };
    button.onRollOut = function() {
    done = true;
    };



    So that when the user rolls over a second time, another action is performed.

    gparis
    Last edited by gparis; 12-10-2006 at 11:38 AM.

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