Solved

Follow the mouse....

Posted on 2004-08-01
2
168 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

816 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

11 Experts available now in Live!

Get 1:1 Help Now