Journey

Sail in ship of ambition and anchor at harbour of success

Flex Events

Initially I felt “dude what big in this? All you need to do is listener will use addEventListener ans when an event occurs the handle is invoked ”

Ok Lets start how would you design such a event  based runtime . Well I would have done the following way ( Please correct me if I am wrong ) .

When I used to do the graphic programming in C all the keyboard , mouse events etc were system interrupts .So the deign goes like this

1> Have interrupt handlers for these , Interrupt handler will get an instance of object where the event occured( ie target) Execute  the function ptr associate with the event Name (interrupt) .

2> When any object adds a eventListener create a queue corresponding to “eventName” and add a function ptr to the handler .

Cool << I think this should work .. atleast refreshing my C skills >>

Well coming to the point !! There is a basic difference how Flash does this event handling with AS3 .

If the event target is not on the displayList then event object is directly dispatched to the target , else the event object is dispatched to the displayList , and eventobject follows the propogation path to reach the target .

Well thats what the DOM 3 event model explains .

No comments yet»

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: