An event-driven flex framework