Causing an event or method call in an animation sequence

J

joel

Hi

I am wondering if the PowerPoint object library provides a way to cause
an event or method call in an animation sequence where the event or
method could be user-defined.

Something like using AddEffect to add an effect whose purpose would be
to raise an event or make a method call.

I see that there is an Enum called MsoAnimCommandType which has the
members: msoAnimCommandTypeCall, msoAnimCommandTypeEvent, and
msoAnimCommandTypeVerb which seems to suggest that such a possibility
exists, but I don't see what the Enum is connected to...

Any ideas?

Thanks, Joel
 
S

Shyam Pillai

Joel,
What are your requirements? Do you wish to trap an event when an animation
occurs? Answer is Yes, you can.
The enumeration types you mentioned are used to assign animation effects to
the shape via the object model.
 
J

joel

Hi Shyam,

Yes, I would like to trap an event when a specific animation effect
occurs and to receive a unique identifier to identify the specific
animation effect that raised the event.

I have an ppt add-in and i want to be able to call a function when the
event occurs when the specific effect is animated.

How do i do it?

Thanks, Joel
 
S

Shyam Pillai

Joel,
You can create an event handler in PowerPoint versions 2000 and above.
PowerPoint will fire an event when an animation build occurs. It does not
tell you which animation fired. This you will have to track by reading the
animation information from the slide itself. Only PPT 2003 offers an event
which tells you which is the next animation going to be. Check out the
programming section of the PowerPoint FAQ www.pptfaq.com to learn how to
create an eventhandler.
 
J

joel

Hi,

Ok, I see the SlideShowNextBuild event. Using that, for events on the
slide main animation sequence I can track the events by counting them
as they fire and thus know which one fired. But, what about events on
the slide interactive sequences that are triggered by shape click. How
do I know which one fired? And if I have both interactive animation
sequences and a main animation sequence?

Thanks, Joel
 
S

Shyam Pillai

Joel,
While you can ascertain which triggered sequence fired, you can check if the
fired animation was a part of the main sequence or a triggered animation by
comparing it with the next click effect. In PPT 2003, the SlideShowNextClick
event provides the effect information of the next animation that will be
fired on mouse-click. When the next animation fires you can use it compare
it to that effect, if the animation was a part of the main sequence or not.

--
Regards,
Shyam Pillai

Animation Carbon: http://skp.mvps.org/ac/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top