Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-08-2007, 02:44 AM   #1
ActionScript Nub
Join Date: Oct 2007
Location: Boston, MA
Posts: 1
Send a message via AIM to McKrazie
Question MouseOver Effects Using Movie Clips & ActionScript:


I'm a relative newcomer when it comes to Adobe Flash CS3 and it seems to me that since Adobe took Flash over there have been major changes according to the ActionScript.

Long story short is I have setup a navigation bar with the text being white for each link. I set up each link as a Movie Clip (MC) and then adjusted each so on frame 5 within the MC it will lower and fade and then on frame 10 raise back to it's previous position but as orange.

There are 6 MCs in all for each link: news_mc, about_mc, projects_mc, production_mc, extras_mc and contact_mc

What I need is so that when you visit the page, the text is white. Then when you mouse over the link it plays the MC and then stops it if they stay over it. However, if they leave the hover area, the MC plays in reverse back to it's white color. Also, each MC has it's own invisible button that for some reason I cannot add ActionScript onto.


Thank you in advance.

Last edited by McKrazie; 10-08-2007 at 02:55 AM.
McKrazie is offline   Reply With Quote
Old 10-09-2007, 03:52 AM   #2
Senior Member
Join Date: May 2007
Posts: 106

Try to use filter class it might help you
anurag is offline   Reply With Quote
Old 10-09-2007, 04:15 AM   #3
Join Date: Aug 2007
Location: San Diego, CA
Posts: 434

By CS3, I presume you're talking about AS3 (if you have AS2 in mind, please post in the AS2 forum).

Let's divide your problem into three parts. First, you can add handlers for different mouse actions using addEventListener(). E.g., for actions when mouse is over news_mc:

news_mc.addEventListener("mouseOver", newsMouseOverHandler);
function newsMouseOverHandler(evt:MouseEvent) {...}

Next, to play clip forward, just do play(). For going reverse, you could run prevFrame() on every frame - to run it each frame, listen to the "enterFrame" event like above and put prevFrame() in the handler (be sure to call removeEventListener() when you're done).

Finally, you can add handlers to your clip as necessary and set alpha to 0 to make it invisible - it'd still respond to mouse. If it's a button, I usually add a hit area and delete the content on other keyframes.

Last edited by Sekhar; 10-09-2007 at 05:18 AM.
Sekhar is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
removeMovieClip() not work for components? djandrew Components 30 08-03-2007 04:51 PM
Referring to dynamically named movie clips in actionscript jettamonkey ActionScript 2.0 3 05-18-2007 12:31 PM
Problem With Loading MovieClip Into SUB movie JakeMX Components 2 07-28-2004 10:07 PM
how can I stop 'click-through' on movie clips? Jon B Other Flash General Questions 7 11-23-2003 09:05 AM
Coloring Movie Clips using ActionScript Flashm@n ActionScript 1.0 (and below) 1 03-07-2002 10:45 AM

All times are GMT. The time now is 02:38 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.