Posted: Mon Oct 26, 2009 2:45 pm
Post subject: Re: Detect mouse click on SWF file
Thank you for your question.
Could you please provide us with more details?
1. What SWF file do you mean?
This forum is about products of iSpring solutions.
If you mean an arbitrary SWF file you may use onRelease() event handler of the MovieClip object.
If this SWF file was created with iSpring Pro, iSpring Presenter or iSpring SDK product there are several ways to detect mouse click event.
1. Turn off the "Advance animations on mouse click" and publish the presentation with the "None" player. Now you can load the generated Flash presentation into your Flash application placing a transparent rectangular area on a layer behind the loaded Flash presentation MovieClip. Listening the onRelease() event of the rectangulare area you will be able to detect when a user clicks on an SWF file
2. Create your own player with your custom skin. You may use custom skin examples provided with iSpring Presenter and iSpring SDK.
2. What for do you need to detect a mouse click event?
If you just want to be notified when slide switching on mouse click occur, you may use ActionScript API provided by iSpring Presenter and iSpring SDK products. In your case you should listen to events of the IPresentationPlaybackController interface. This interface lets you add your custom object implementing the IPlaybackListener interface as a listener of playback events.
iSpring Presenter and iSpring SDK provide a number of samples illustrating the usage of ActionScript API.
The following sample will illustrate you a general idea of event handling.
If you've meant something else, we will be happy to help you if you provide us with the detailed description of your task.