Results 1 to 4 of 4
  1. #1

    Simple hit & stay script?

    Was wondering how i could do this with the minimum of code and the most effective/easiest


    Lets say you have 12 images and when you hover over them, they change colour.
    But, if i click on any of them it should stay on that hover color and also perform some javascript code.

    What is the best way to do this ?

    Thank you in advance!

  2. #2
    Chappo, I am actually trying to figure out something similar. I need help figuring out this script I have. Someone tried to help me but it doesn't work. I think I am missing something simple. Since I am new this isn't easy for me.

    Here...say we are using 2 images or buttons. (as movie clips)

    function buttonMov(b) {
    for (i = 1, i <= 2, i++);
    if (i = b) {
    _root["b"+i].gotoAndStop(2)
    } else {
    _root["b"+i].gotoAndStop(1)
    }
    }

    then the invisable button in the mc would have...

    on(press) {
    gotoAndStop(2);
    _root.buttonMov(b2);
    }

    Can someone help me with this simple task. It will also help out Chappo.

    peace
    tim




    Quote Originally Posted by Chappo
    Was wondering how i could do this with the minimum of code and the most effective/easiest


    Lets say you have 12 images and when you hover over them, they change colour.
    But, if i click on any of them it should stay on that hover color and also perform some javascript code.

    What is the best way to do this ?

    Thank you in advance!

  3. #3
    Okay, so I figured out what I wanted to do. Here is a link to a site that had what I needed...http://www.canfieldstudios.com/flashmx/

    It has what you need. Download the fla and tweak it for your need.

    peace
    tim

  4. #4
    exactly what i needed
    Will have to tweak the example

    thank you both!

Similar Threads

  1. Need help with a simple typing game
    By keitai in forum Game/AI Programming
    Replies: 14
    Last Post: March 6th, 2006, 11:22 AM
  2. Button to stay on HIT color
    By linoleum in forum Flash IDE
    Replies: 4
    Last Post: July 30th, 2005, 04:48 PM
  3. Simple html and java script navigatation
    By chup in forum Web (HTML5, CSS, JavaScript)
    Replies: 0
    Last Post: April 15th, 2005, 02:45 AM
  4. Replies: 8
    Last Post: May 28th, 2004, 10:18 AM
  5. Simple script help (loop sort of)
    By Bodom78 in forum ActionScript 2 (and Earlier)
    Replies: 2
    Last Post: July 14th, 2002, 10:57 PM

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
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012