Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-07-2007, 01:19 PM   #1
darth
Senior Member
 
darth's Avatar
 
Join Date: Dec 2003
Location: Estonia
Posts: 273
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
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
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
Default

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.
__________________
(6)
senocular is offline   Reply With Quote
Reply


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 04: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 09:56 AM


All times are GMT. The time now is 10:19 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, 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.