Get Adobe Flash player

Action Script 2.0 Check Mouse Direction

July 15th, 2010 | 1 Comment »
category: Software

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// This code is for Action Script 2.0
checkX = function (dx, oldVal, newVal)
{
    if (oldVal<newVal)
    {
        trace("moving right");
    }
    else if (oldVal>newVal)
    {
        trace("moving left");
    }
        return newVal;
    };
        checkY = function (dy, oldVal, newVal)
    {
    if (oldVal<newVal)
    {
        trace("down");
    }
    else if(oldVal>newVal)
    {
        trace("up");
    }
    return newVal;
};

this.watch("xdir", checkX);
this.watch("ydir", checkY);

this.onMouseMove = function()
{
    xdir = _xmouse;
    ydir = _ymouse;
};
GD Star Rating
loading...
Action Script 2.0 Check Mouse Direction, 5.0 out of 5 based on 1 rating


One Response to “ Action Script 2.0 Check Mouse Direction ”

  1. Tweets that mention Action Script 2.0 Check Mouse Direction | MyFriendTodd -- Topsy.com Says:

    [...] This post was mentioned on Twitter by Todd Vaughn and Todd Vaughn, Todd Vaughn. Todd Vaughn said: New post: [cc lang="actionscript"] // T… http://myfriendtodd.com/?p=108 [...]



Content

Need to pay for services?


Banner    

Contact me


  

Socially you can find me here


                 

        


Need to pick up a few things before you leave?


Grasshopper - The Entrepreneur's Phone System   Affordable Premium Custom Flash Photo and Video Gallery Templates
2010 Copyright © Todd Vaughn. All rights reserved. Register