ADC Home > Reference Library > Technical Q&As > QuickTime > Wired Movies and Sprites >
|
Q: I'm using the kActionApplicationNumberAndString wired action in my QuickTime movie to send a number and a string to my running application. How can my application intercept this action and retrieve the number and string data? A: You'll need to first use a movie controller action filter function to intercept the mcActionExecuteOneActionForQTEvent action. You associate a movie controller action filter function with a given movie controller by calling the MCSetActionFilterWithRefCon functions as shown in Listing 1.
The filter function allows your application to filter individual actions which are about to be executed in response to a QuickTime event. The events are first sent to your filter function before the actions are executed. Return true from your filter function if you do not want the action to be executed, return false if you do want the action executed. Once you've setup a custom action filter function, you will need to add code to your filter function to check for the mcActionExecuteOneActionForQTEvent action. Next, when you receive the mcActionExecuteOneActionForQTEvent action in your filter function you can examine the atoms associated with this action to see if the kActionApplicationNumberAndString action is about to be executed. The parameter passed with the mcActionExecuteOneActionForQTEvent action is a ResolvedQTEventSpecPtr (see Movies.h). The type of action may be determined by parsing the atoms contained in the actionAtom field of this structure (refer to the Wired Movies API reference for more information on the various atoms contained here: <http://developer.apple.com/documentation/quicktime/qtdevdocs/RM/rmWiredRef.htm>). The code snippet in listing 2 below shows how to access the parameters of the kActionApplicationNumberAndString action from a movie controller action filter function.
[Nov 14 2001] |
|