Results 1 to 2 of 2

Thread: Buttons to Stay Down??

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Buttons to Stay Down??

    I am creating a header for a website and I want the buttons to stay in the downstate after click, until another one is clicked (not until another is mouseover). I am using MC for buttons. Here is the action script I have for one of the buttons. Can anyone tell me what I am doing wrong?

    Also, is there anyway for the button to stay in the down state once referred to the next page without using a frame?

    Code:
    //End Terms; Begin Links
    
    this.linksMC.onRollOver = function(){
    	linksMC.gotoAndPlay("_over");
    }
    
    
    this.linksMC.onRollOut = function() {
    	linksMC.gotoAndPlay("_out");
    }
    
    this.linksMC.onRelease = function() {
    	linksMC.gotoAndStop(9);
    	getURL("http://mydomain.com/links.html");
    }

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Simple if else's will work, depends on how many buttons you have, you may be better with an array.
    Also use on press to get your URL, then it will stay better.

    Code:
    this.linksMC.onPress = function() {
    	linksMC.gotoAndStop(9);
    	getURL("http://mydomain.com/links.html");
    }
    for an if/else you can try simple things like:

    Code:
    if (the other button name._currentframe >= 2){
           this.gotoAndStop(1);
    }
    As for your other question... sure, if you are using the same exact movie on the page. Although I will admit I don't fully understand what you mean by that.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •