Topics Search

Find mouse position in Actionscript 3

Find mouse position in Actionscript 3
Views: 801
In this tutorial you will learn how to fiind mouse position in Actionscript 3.0.
Sponsored Links:

More topics

 

Find out mouse position

Preview
In this tutorial I will show you how to get mouse position information.
 

StartDrag command for 1 axis only

Preview
This tutorial details how to have an object follow the mouse on 1 axis only (not possible with the drag command). This gives the effect of it sliding across the screen. This can be done easily by making the x/y position of the object equal to the corresponding position of the mouse. However, to make the movement look more authentic, like it is following the mouse, not just always in the same position, you can add a small piece of code which makes it lag behind a little.
 

Mouse control and actionscript

Preview
Our world of Flash interactivities will suddenly shrink if our mouse was taken away from us, the mouse is with the keyboard a very important input device that let us converse quickly and efficiently with our Flash applications. Fortunately actionscript has some built in methods, properties and events that are going to be very handy to give us control and information on the mouse activity.
 

How to build a Flash Actionscript 3.0 mouse scroller

Preview
I'll explain you few things how to understand and develop this. This scroller is a simple one, that instead of arrows will move a movie clip according to the mouses x position (this will be done with MOUSE_MOVE listeners, not with ENTER_FRAME) . An equation will be created, between mouse and content and we will move this using Caurina Tweener Class, as usual.
 

Position of mouse

Preview
This Flash tutorial will teach you how to display the x and y position of the mouse.
 

Flaming Mouse Trail tutorial

Preview
n this tutorial we will make a Mouse Trailer in the shape of a burning flame. We will use Actionscript 3 and the popular tweening engine, Tweenlite. Custom designed Mouse trails are pretty popular these days even though some might find them annoying. But they will fit perfectly in some Flash games and applications.
 

Eyes following mouse cursor

Preview
A simple and easy tutorial for you to know how to use the mouse interactivity in Actionscript 3. Well create the eyes for an alien character that will follow the mouse. Also well hide the mouse and change it with something else. All this is done in a general Movie Clip so you can drag it in your project .
 

Mouse sparkle effect in Actionscript 3

Preview
The mouse sparkle effect will generate particles randomly with different scales and colours as the mouse moves. The particles will also gradually fade over time and move randomly. I have used a five point start as my particle, but this effect will work for any kind of particle. I have two examples below. The first example uses TweenLite to create the mouse move effect, and the second uses pure Actionscript 3 code. Both examples assume a movie clip is in the library with key frames of different colours.
 

scanning cursor that shows the mouse coordinates

Preview
Learn to make a crosshair cursor that replaces the system mouse and how to show the current position of the mouse with a dynamic text field.
 

Follow object with mouse in Actionscript 3

Preview
In this tutorial you will learn how to follow an object with the mouse in Adobe Flash and Actionscript 3.0.