
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; }; |

July 15th, 2010 at 8:16 pm
[...] 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 [...]