A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: on(press) count - MX2004

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    44

    on(press) count - MX2004

    Hello,

    I'm making a training piece. I have a scene where the user needs to click (press because it is on a touch screen) on 5 areas of a picture. I have these as buttons right now. Once all 5 areas have been selected I want to pass along a fscommand(""); to the shell that plays the training lesson.

    I have changed the buttons to movie clips and have used code that keeps track of each movie clip, but it hasn't given me the correct results. Rather that beat up the code I have been using, I wanted to get something fresh. If that is okay?

    Any ideas to count the 5 or more buttons?

    Thank you

  2. #2
    Confused Game/Cartoon Designer
    Join Date
    May 2005
    Location
    Texas
    Posts
    60
    i dont understand the last question, but when you ask a movie clip to pull an "on (release)", it wont work very well
    P-Dizzle is in the hizzle.

  3. #3
    Member
    Join Date
    Oct 2004
    Posts
    44

    re:

    I have 5 buttons. Once all 5 have been pressed, order doesn't matter, the fscommand(""); should be enabled(?).

    I know there is a
    count++ command, listeners and that.

    Is there something like

    button01 clicked = "true"
    button02 clicked = "true"
    button03 clicked = "true"
    button04 clicked = "true"
    button05 clicked = "true"

    then fscommand("");

    or

    function checkCount()
    {
    if (hotspotCount == 5)
    {
    fscommand("");

    }
    }

    Like I said I have copied and pasted my code to death.

    Thanks in advance

  4. #4
    Confused Game/Cartoon Designer
    Join Date
    May 2005
    Location
    Texas
    Posts
    60
    i feel sort of noobish asking this, but what is fscommand?
    P-Dizzle is in the hizzle.

  5. #5
    Member
    Join Date
    Oct 2004
    Posts
    44
    fscommand passes info to another program. For my project there is a program running the complete training course. Throughout the training they have some flash pieces. The fscommand from flash tells the main program it is done playing.

  6. #6
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    Any ideas to count the 5 or more buttons

    set boolean flags on each button -
    Code:
    btnA.onRelease=function(){a=true;}
    btnB.onRelease=function(){b=true;}
    and check for the flags -
    Code:
    if(a && b && c && d && e){..do stuff..}

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