Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adobe Flex component events

I wrote a component that displays a filename, a thumbnail and has a button to load/play the file. The component is databound to a repeater. How can I make it so that the button event fires to the main application and tells it which file to play?

like image 821
Shawn Avatar asked Aug 06 '08 18:08

Shawn


1 Answers

On your custom component you can listen to the button click event and then generate a custom event that holds information about the file you want to play. You can then set the bubbles property to true on the event and dispatch the custom event from your custom component. The bubbles property will make your event float up the display list and reach your main application. Now on your main application you can listen to that event and play the correct file. Hope this helps.

like image 147
omar Avatar answered Sep 30 '22 14:09

omar