Nebula
Nebula

Reputation: 691

AS3 converting an Event to a MouseEvent

Is it possible to convert an Event to a MouseEvent in AS3 (Visa versa)? I have a function that calls another function but one is an eventlistener (enterframe) and it calls another function that accepts a mouseEvent.

Appreciate any help. Couldn't find anything on Google...

Regards Luben

Upvotes: 0

Views: 146

Answers (1)

Sr.Richie
Sr.Richie

Reputation: 5740

You could do something like this

 function yourMouseFunction (evt:MouseEvent = null) {

       // do you stuff
 }

In this way, you can call your function passing or not the parameter.

Upvotes: 2

Related Questions