Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 6 of 6

Thread: Need some help with Button MC

  1. #1

    Need some help with Button MC

    I have a series of button movie clips that get highlighte in color and also with
    an arrow when moused over.

    I am trying
    to get it to stay highlighted with arrow untill one of the other buttons is
    clicked. The other buttons mouse over feature needs to work untill click, then
    the previous clicked button goes back to it normal non over state.

    I have attached the FLA; here is my button
    code:

    Frame 1 of Btn MC:
    onRollOver = function () {
    gotoAndPlay(5);
    };
    onRollOut = function () {
    gotoAndPlay(1);
    };
    stop();
    cityName_txt.textColor =
    0xFFFFFF;



    Frame 5 of
    Btn MC:


    stop();
    cityName_txt.textColor = 0xFFEFBF;

    Last edited by avaughn; March 30th, 2012 at 12:40 PM.

  2. #2
    just realized the FLA I uploaded was 5.5 here it is in 4.0
    Attached Files Attached Files

  3. #3
    1,391
    posts
    Registered User
    there were a couple of issues with your file

    - first, the movieclips on stage had been designated as 'button' instances in the properties panel, they need to be MCs here

    - the Times font was not embedded in the Fields (i went with a device Font in the revised version)

    - the textfield instance was typed as an 'input' field - needs to be a dynamic field in this case

    - i've removed the code from the button instances and placed in on the main timeline, there reason is so that you can also use arrays to control the assignments to the instances

    - hope this helps
    Attached Files Attached Files

  4. #4
    I did learn quite a bit from your sample, however what I am try to accomplish is;

    You mouse over the city name it is highlighted in color and with arrow ( this works fine thanks)

    but when one is clicked it stays higlighted with color and arrow until another one is clicked than the highlight goes away on first clicked button and the second one clicked is highlighted untill another is clicked.

    The mouse over should higlight any button at anytime even if another button has been click and is currently highlighted as well.

    Hope that makes sence

    Again Thanks for your help CBEECH.
    Last edited by avaughn; March 30th, 2012 at 08:56 AM.

  5. #5
    CBEECH, thanks again for you help. I figured out how to get the functionality I was looking for. Whole thing would have been much easier in AS3 but this had to be AS2. I attached the working version. Only fitting to share my solution with board members.
    Attached Files Attached Files

  6. #6
    1,391
    posts
    Registered User
    you're welcome, and good job - you picked that up very quick - nice work

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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