Solved

Follow the mouse....

Posted on 2004-08-01
2
163 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
Comment Utility
pete,

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

Author Comment

by:pete420
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

762 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

10 Experts available now in Live!

Get 1:1 Help Now