SourceTec Software

It is currently Wed Apr 16, 2014 10:30 pm

All times are UTC + 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Jul 19, 2011 9:13 pm 
Offline
Member

Joined: Tue Jul 19, 2011 9:05 pm
Posts: 1
Greetings!

I successfully use the following syntax in CS5/AS 3.0 for adding event listeners for mouse clicks:

[object].addEventListener(MouseEvent.CLICK, [function name]);

However, when I attempt to use this syntax in build 511, I receive the following error message:

"Access of undefined property MouseEvent"

Pathing, scope or publishing settings do not appear to change the output.

Any viable suggestions would be appreciated.

Thank you.


Top
 Profile  
 
PostPosted: Wed Jul 20, 2011 12:33 am 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
I hope you added firstly:

Code:
import flash.events.MouseEvent;


then you could use the complete syntax:

Code:
[Object].addEventListener(MouseEvent.MOUSE_DOWN, [name], false, 0, true);


Top
 Profile  
 
PostPosted: Wed Sep 07, 2011 10:34 pm 
Offline
Member

Joined: Wed Sep 07, 2011 10:28 pm
Posts: 1
but what's the difference between what the original poster had?


Top
 Profile  
 
PostPosted: Wed Sep 07, 2011 11:47 pm 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
You need to add IMPORT line and change CLICK with DOWN.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group