?
Solved

Follow the mouse....

Posted on 2004-08-01
2
Medium Priority
?
172 Views
Last Modified: 2011-09-20
hi, i have been trying to design a nav bar for a website where there is a movie clip with
>      <     as a pointer, which follows the mouse up and down the nav bar and points to the buttons when the mouse is over them. the problem is that it always seems to be a few places lower than the mouse is. this is due to the way when u have a movie clip there is a border round it which makes the movie clip larger in size dimensions than the characters in it.

the actionscript code im using is

onClipEvent (load) {
        speed=.4;
        top=0;
        bottom=420;
}
onClipEvent (enterFrame) {
        _y+=_ymouse*speed;
        if (_y<top) {
                _y=top;
        } else if (_y>bottom) {
                _y=bottom;
        }
}

and the problem can be viewed at http://www.newwavesound.co.uk/flashbar/nav.swf

thanks pete


0
Comment
Question by:pete420
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
hsmtp earned 225 total points
ID: 11689207
pete,

your code looks ok. try to move content of your movieClip (those ">   <") a little bit higher.
0
 

Author Comment

by:pete420
ID: 11689225
red face here!!
i didnt realize the character > and < could be moved higher in the clip!

fair play tho, u put me on the right track.

ta

pete
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

800 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