dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help with IF statement.

  1. #1
    Member
    Join Date
    Feb 2006
    Posts
    80

    Help with IF statement.

    Basically i have a menu with a dropdown box and i created a layer ontop of it with a movie clip that holds an area of space where if the mouse is not in that area, i do not want the dropdown menu to appear....

    ***dropmenu**** is the movie instance name to which holds the animation for the dropdown menu.

    dropmenu(2) starts the animation of the mask opening up the dropdown navigation.

    dropmenu(11)starts the animation which closes the dropdown section of that button.

    dropmenu(1) hides the mask entirley which shows the dropdown nav.

    The movie that i have holding this arrow has the following code:
    ---------------------------

    dropmenu.ifFrameLoaded (2) {
    on (rollOut) {dropmenu.gotoAndPlay(11);}
    }
    else
    {dropmenu.gotoAndPlay(1);}
    ---------------------------

    It is not doing what i hoped, im guessing either im using the ifFrameLoaded wrong or im just completely wrong. Please help,

    Thanks,
    Joel

  2. #2
    Registered N00b
    Join Date
    Jan 2005
    Location
    i'm a noob
    Posts
    208
    I don't really get your code, but this is how I would do that:
    Code:
    //put this code on the MC that is the drop down menu
    onClipEvent(enterFrame) {
    if (this.hitTest(_root._xmouse, _root._ymouse) {
    if (this.hit == 0) {
    this.gotoAndPlay(2)
    }
    this.hit = 1
    }else{
    if (this.hit == 1) {
    this.gotoAndPlay(11)
    }
    this.hit = 0
    }
    That should work.
    ^ noob

  3. #3
    Member
    Join Date
    Feb 2006
    Posts
    80

    hmm

    that really didnt work man, im not sure where you were intending i put this code exactly but i tried it in a few different places with no results.

    any other ideas?

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