Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-02-2008, 09:44 PM   #1
tfletch
Registered User
 
Join Date: Jul 2005
Posts: 32
Send a message via AIM to tfletch
Default New to AS3, how does "this" work now?

ActionScript Code:
function myButtonAction(eventObject:MouseEvent) {     trace("click"); } this.addEventListener(MouseEvent.CLICK, myButtonAction);

I have this on the timeline inside a movieclip, but when I try and click it, it does not work.
tfletch is offline   Reply With Quote
Old 06-02-2008, 10:11 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

Your code and setup is correct. It should work. Double check your work; publish settings, and code location.
__________________
(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
Possible to mix AS3 and AS2 in same file? asf8 ActionScript 3.0 9 05-30-2008 04:47 AM
Clicks don't work in loaded AS2 movie tropicaltalent ActionScript 3.0 3 05-02-2008 01:23 AM
Suggestions for learning AS3? ashground ActionScript 3.0 6 04-21-2008 06:30 PM
unescaping html oddballs from xml sent from flash to PHP Philip Toews Server-Side Scripting 30 06-01-2003 02:27 AM
Resizing Work Area? binar ActionScript 1.0 (and below) 0 07-10-2002 04:13 PM


All times are GMT. The time now is 07:28 PM.

///
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.