As a word of warning, we ??™ ve set the callback functions as static methods of the class. However, we have
had issues with class methods as callback handlers for anything linked to SWHX message hooks, as they
tend to get lost. Therefore, when creating callbacks for SWHX message hooks, assign local defined functions,
instead.
So, how does this work? Well, first, take a look at the creation of the window message hooks. They were
mentioned earlier in this chapter, and are an easy way to assign native links to the windows within
which the Flash movies are located. It is here that the magic occurs. As you can see from the preceding
class, callback handlers were specified for the events pertaining to RBUTTONUP , MENUEVENT , and
TRAYEVENT . These are merely integer values that match those specified by the Win32 API. You don ??™ t
have to use these values. If you like, you could instead opt for a menu to appear when a user double -
clicks with the left mouse button upon the window.
Anyway, once the callbacks are called, the showPopup method of the defined menu objects are called,
which in turn display the menu to the user.
Pages:
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982