Solved

Flash Button:  Question regarding "Animation in MouseOver and MouseOut on the button."

Posted on 2004-10-28
382 Views
Last Modified: 2008-03-17
Hello.  This is my first time accessing this website.  Althought it is a bit confusing, I hope I am asking a question the right way.

Onto the question, I am creating a Flash button where:

     -  MouseOver on the button will play Movie #1.
     -  MouseOut on the button will play Movie #2.

Now, I can do the first part without a problem because I can create Movie #1 within the "Over" section of the button.  The problem is, I don't understand how to implement a method so that when MouseOut is detected, Movie #2 will play.

I don't know if you guys can understand what I mean, and I have supplied a link to the .fla file below:

http://www.moogii.com/button.fla

Any suggestions or help will be greatly appreciated.  I am sort of a newbie to designing with Flash, and this part of working with buttons seems a bit advanced to me.  Thank you.  Have a nice day.

P.S
I currently only have 245 points, and I will offer it all to the person who can give me a solution.  Thank you.
0
Question by:nycztonee
    4 Comments
     
    LVL 8

    Accepted Solution

    by:
    Hi there,
    Thank you for the link to the .fla files. I've change some code inside and i have post it at http://www.ntu.edu.sg/home2001/n0069866/button.swf and http://www.ntu.edu.sg/home2001/n0069866/button.fla
    I hope this is something you are looking for. But let me explain what i have done to the source code.
    As you mention you want two movies clip instance to be play for mouseOver and mouseOut event. The step i outline is:
    1. Put the Two movies clip to the Scence and make a name for the instance as
    m_over and m_out for the over movie clip and mouseOut movie clip. Then make it invisible by using _visible funtion i.e.
    m_over._visible= false;
    m_out._visible=false;

    2.Attached a function to the original button that will call in the event that the mouseOver or mouseOut is triggered
    on (rollOver) {
    m_out._visible=false;
    m_over._visible=true;
    m_over.gotoAndPlay(1);
    }
    on (rollOut) {
    m_over._visible=false;
    m_out._visible=true;
    m_out.gotoAndPlay(1);
    }
    3. Finally, save and run

    Last note, if you have doubt plz post it more here, i'd be glad to assist you :)
    0
     

    Author Comment

    by:nycztonee
    Hi Sokhdom.  Thank you for the reply to my thread.

    I have been searching through the net and found many interesting articles relating to the title.

    I really appreciate your detailed reply.  It really helped me understand a whole new level of flash actionscripts.  My Flash knowledge isn't very deep, but because of people like you, it is improving by the day.  Thank you.

    I still am uncertain about how all the experts-exchange.com features work.

    I have accepted your Answer with the highest grading point.  Does that mean my 245 points have been sent to you?  I hope so.  I am also sending in a form of e-mail, because I realized after I accepted your answer, the topic got closed.  Best of luck to you Sokhdom.  Thanks again for the help. :)
    0
     

    Author Comment

    by:nycztonee
    Woah, welll, I guess it wasn't E-mail after all. :)
    0
     
    LVL 8

    Expert Comment

    by:sokhodom
    Hi Nycztonee,
    You are welcome :)
    You are not alone, Me too, i'm still trying to get used to EE. Anyways, if you have more problem related to Flash or anything related to computer, i believe people here in EE are capable to offer helps.
    Regarding flash, you have done the initiative by reading from online tutorial. That's the best start. Well, from the questions you post, you should be able to learn the following key points:

    _visible property,
    RollOver and RollOut events of the button
    Where to put those actionscript

    Best wish in your Flash Movies,
    SokhodoM
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    The first time you look at a web page and its source code, you are probably a little intimidated by the use of symbols and jargon that really looks foreign to you. You might not even know where to start to begin learning what it all means. That’…
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    856 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now