Author Message

Posted: Mon Oct 26, 2009 5:58 am   Post subject: Detect mouse click on SWF file


I want to detect mouse click event, when a user clicks on SWF file.


Profile profile test

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.
iSpring Presenter:
"C:\Program Files\iSpring\Presenter\samples\as2\presentation-control\event_handling.fla"
iSpring SDK:
"C:\Program Files\iSpring\SDK\samples\client\samples\as2\presentation-control\event_handling.fla"

If you've meant something else, we will be happy to help you if you provide us with the detailed description of your task.

Profile profile test WWW www ICQ ICQ
Display posts from previous:  Sort by  


Who is online
Who is online In total there are 9 users online :: 1 registered, 0 hidden and 8 guests (based on users active over the past 5 minutes)
Most users ever online was 803 on Sat Dec 12, 2020 9:21 am

Registered users: Google [Bot]