Trigger Events : Flash Action Script

June 19, 2014

we can trigger any of the object’s event in another object event

Coding :

btnAnother.addEventListener(MouseEvent.CLICK, btnAnotherClick);
function btnAnotherClick(event:MouseEvent) 
	/// your code

btnOne.addEventListener(MouseEvent.CLICK, btnOneClick);
function btnOneClick(event:MouseEvent) 
   btnAnother.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
   /// Can trigger any event like MOUSE_OVER,MOUSE_OUT.... 


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: