This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > November 2006 > Mouseover plays movie
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Mouseover plays movie
|
|
| 3dtodd 2006-11-05, 10:33 pm |
| I want to make Nav buttons that on mouse-over will play a flash animation in a specified area of the web page. Can someone direct me to a tutorial for this?
Cheers.
| |
| droopy.ro 2006-11-05, 10:33 pm |
| hello,
i've attached a code bellow that when you roll over a button, a movie clip
from library will be attached to the stage.
the name of the button is someButton_btn, the library name of the attached
movie is circle, and the movie is attached to the coordinates 100, 100 on
stage. so to test it, change the name of the button to the name of your button,
add a movie in library named circle. this shoud work.
for additional help see live docs for:
http://livedocs.macromedia.com/flas...pl/common/html/
wwhelp.htm?context=Flash_MX_2004&file=00001487.html
http://livedocs.macromedia.com/flas.../html/wwhelp.ht
m?context=LiveDocs_Parts&file=00002005.html
someButton_btn.onRollOver = function() {
_root.attachMovie("circle", "circle_mc", this.getNextHighestDepth(),
{_x:100, _y:100});
}
someButton_btn.onRollOut = function() {
_root.circle_mc.removeMovieClip();
}
| |
| Todd Groves 2006-11-05, 10:33 pm |
| Thanks, Aurelian. How do I add this code to the button? Add an action to the button itself or create an action layer and add it there? Sorry, I'm so new to this.
BTW, this is still 3dtodd.
| |
| droopy.ro 2006-11-05, 10:33 pm |
| add an action layer.
| |
| Todd Groves 2006-11-05, 10:33 pm |
| Thanks again, Aurelian. So, for each button does the action have to be added to
a different frame in the action layer? I've always found that aspect of actions
confusing, since buttons aren't actually animations.
Sorry for all the questions. But, this issue in particular was an important
one.
Thanks.
| |
| droopy.ro 2006-11-05, 10:33 pm |
| you can add all animations in one frame, actually that's the wasy everyone does it. the point is that you call each button different then others.
| |
| Todd Groves 2006-11-05, 10:33 pm |
| OK. That's what I was hoping. The reason I asked is that I noticed in some
tutorials they tell you to add "actions" in different frames. I guess that's
when, for example, you want an animation to loop, you add an action in the last
frame to tell it to start over.
I used to know some of this stuff, but its been a LONG time since I last used
Flash.
| |
| droopy.ro 2006-11-05, 10:33 pm |
| yeah, i know ow it is.. and you are right about the actions in different
frames. and there are also other examples when you have to add actions in
different frames.. anyway , i hope the code helped you solve the problem.
| |
| Todd Groves 2006-11-05, 10:33 pm |
| Thanks again, Aurelian. I haven't tried the code yet - busy work week - but,
I'm sure it's fine. If I have any problems with it I'll be sure to post it
here. But, I would consider this mystery solved. I appreciate your help. :-)
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|