Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

event.target problem

9:23 pm on Jul 19, 2008 (gmt 0)

5+ Year Member

I've read that you can use the following code so that several different movie clips could use the same function:

function pickUp(event:MouseEvent):void {

But that doesn't work for me. It only works if I specify the actual movieclip name such as:

function pickUp(event:MouseEvent):void {

Does anyone know why the first snippet doesn't work? I really want to be able to use that so I don't have to have several dozen functions that do the same thing.

2:14 pm on Aug 8, 2008 (gmt 0)

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 5+ Year Member

Don't know. How's this coming along?
12:45 am on Aug 15, 2008 (gmt 0)

10+ Year Member

Try using currentTarget. Some more details would be helpful, like whether there are children of the movie clip?
3:27 am on Aug 15, 2008 (gmt 0)

5+ Year Member

Holy crap, that worked perfectly chronic!


function pickUp(event:MouseEvent):void {

function dropIt(event:MouseEvent):void {


Featured Threads

Hot Threads This Week

Hot Threads This Month