Ok, here's a simple example of what I mean:
public class Blob extends MovieClip {
public var gfx:BlobClip; //BlobClip is a MovieClip class in my assets library
public var bCount:uint;
//...
So gfx
is the graphical representation of my Blob
object.
I set up the mouse event to make the gfx
clip clickable:
blob.gfx.addEventListener(MouseEvent.CLICK, blobClick); //blob is an instance of Blob
In the blobClick
function I can of course access the gfx
clip of blob
using e.target
.
function blobClick(e:MouseEvent) {
trace("Target:"+e.target);
}
But I wish instead to refer to the blob
object itself so that I may access the bCount
property. How do I do this? :(
I figured I might have to use e.target.root
or e.target.parent
but these relate to display.
Any assistance in this matter would be greatly appreciated.