Can anybody please help me understand how a MovieClip and EventDispatcher go hand in hand.
e.g.
I have a box mc on stage. when i select this box mc and move I want to call some function.
Yeah I know I can do that using following code.
[AS]
var boxselected=false;
var listener=new Object();
listener.onMouseMove=function()
{
if(boxselected)
trace(“box moving”);
}
Mouse.addListener(listener);
box.onPress=function()
{
boxselected=true;
}
box.onRelease=function()
{
boxselected=false;
}
[
[/AS]
Suppose in this case I want a target of some movie clip available in onMouseMove function. This is not possible. However it can be done in EventDispatcher class.
So I want to achieve the same thing with EventDispatcher class.
But I’m confused over how to get this done.
Please Help.