Solved

Follow the mouse....

Posted on 2004-08-01
2
169 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
2 Comments
 
LVL 6

Accepted Solution

by:
hsmtp earned 75 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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 shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

790 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