Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-07-2007, 01:19 PM   #1
Senior Member
darth's Avatar
Join Date: Dec 2003
Location: Estonia
Posts: 277
Default as3 onMouseMove

I have

ActionScript Code:
this.onMouseMove = function(){ //bla }

written in as2 on the root timeline.
how do I write it in as3?

I already tried

ActionScript Code:
import flash.display.Sprite; import flash.display.MovieClip; import flash.events.*; this.addEventListener(MouseEvent.MOUSE_MOVE, mve) function mve(evt:Event):void{     trace(evt) }

but it doesnt work...?

Last edited by dr_zeus; 08-07-2007 at 05:17 PM. Reason: formatted code
darth is offline   Reply With Quote
Old 08-07-2007, 02:19 PM   #2
six eyes
senocular's Avatar
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,877
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular

mouse move only works over objects to which it was assigned. If you want it to work while anywhere over the movie, add the listener to stage.
senocular is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embed swf assets in Flash 9 AS3 - not flex not flashdevelop Birdsong ActionScript 3.0 11 09-02-2010 12:48 PM
AS3 have anything like Fuse dvlnblk ActionScript 3.0 6 01-27-2008 05:42 AM
AS3 loads AS2 swf. AS2 swf not displayed darbar ActionScript 3.0 0 07-20-2007 09:12 PM
Migration to AS3 jsimpson ActionScript 2.0 0 06-08-2007 04:38 PM
onMouseMove then ? höhöga_saeos ActionScript 2.0 0 01-02-2005 10:56 AM

All times are GMT. The time now is 03:55 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.