Select to view content in your preferred language

Bind function to AppEvent (SFV)

688
2
06-18-2010 04:38 AM
HaroldBostic
Frequent Contributor
Hello, I want to Bind a function in Banner.mxml to the AppEvent raised when the status is changed, however, my function is never invoked.  I have tried this:
[Bindable(event=AppEvent.SET_STATUS
private function flashStatus(status:String):void
{
        trace("Well What do we have here")
}

I have also tried the above function without any parameters, neither of which works
Any assistance would be gladly appreciated
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Harold,

   I don't think you should be look at binding. Why not just add an event listener

SiteContainer.addEventListener(AppEvent.SET_STATUS, flashStatus);
private function flashStatus(event:AppEvent):void
{
trace("Well What do we have here")
}
0 Kudos
HaroldBostic
Frequent Contributor
That's probably what I'll do but wanted to try out binding if I could have gotten it to work

Thanks
0 Kudos