MetaChrome
MetaChrome

Reputation: 3220

Access the event object in a mxml property bound onEvent code

When binding code to the execution of an event using mxml, by assigning the Event metadata property to the code, it in the case of:

<s:ViewStack change="onChange()">

Is there a way to access the event object?

Upvotes: 2

Views: 90

Answers (1)

Dennis Jaamann
Dennis Jaamann

Reputation: 3565

Just pass the event like so:

<s:ViewStack change="onChange(event)">

Then write your handler:

private function onChange(event:IndexChangedEvent){
//do stuff here
}

Upvotes: 2

Related Questions