[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] Question about event handler types
From: |
zou lunkai |
Subject: |
[Gnash-dev] Question about event handler types |
Date: |
Tue, 24 Apr 2007 10:12:09 +0800 |
Question:
What is a built-in event handler? (comments in Sprite_instance.cpp,
::on_event(), line1951)
As far as I know, we have (1)onClipEvent handler, which is defined in
the placement tags; and (2)user defined event handler, which is
defined by ActionScripts.
But what is a built-in event handler? handlers like Key.onKeyUp()
and Key.onMouseUp()? I think they are just user defined event
handlers. They don't do anything if you don't define a function body
in ActionScripts.
eg.
listener = new Object();
listener.onMouseDown = function () { .. }; //define the MouseDown event handler
Mouse.addListener(listener);
Currently, Gnash ignores user defined "onLoad", "onEnterFrame"(and
maybe other) event handler, and onClipKeyDown, onClipKeyUp(and maybe
others). That's odd...
- [Gnash-dev] Question about event handler types,
zou lunkai <=