Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / October 2006

Tip: Looking for answers? Try searching our database.

parameter being ignored?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Geoff Cox - 30 Oct 2006 19:20 GMT
Hello,

Code works but not sure why!

The aim is to click on shpAnswer to move the shpRectangle in the way
defined by the FromX etc.

This works and uses the FromX etc co-ordinates and ignores the

effectId:=msoAnimEffectPathCurvyStar, _

which is fine! But what should replace this parameter? A gap is not
allowed and adding msoAnimEffectCustom is wrong.

Cheers

Geoff

Sub AddShapeSetTiming()

Sub AddShapeSetTiming()

Dim effDiamond As Effect
Dim shpRectangle As Shape
Dim aniMotion As AnimationBehavior
Dim shpAnswer As Shape

'create shape to be clicked
Set shpAnswer = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=400, Width:=75, Height:=50)
shpAnswer.TextFrame.TextRange.Text = "answer"

'create shape to be moved
Set shpRectangle = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=200, Width:=75, Height:=50)
shpRectangle.TextFrame.TextRange.Text = "word"

'effect applies to the shape to be moved when other shape is clicked
Set effDiamond = _
ActivePresentation.Slides(1).TimeLine.InteractiveSequences.Add _
.AddEffect(Shape:=shpRectangle, _
effectId:=msoAnimEffectPathCurvyStar, _
Trigger:=msoAnimTriggerOnShapeClick)

With effDiamond.Timing
.Duration = 2
.TriggerDelayTime = 0
End With

Set aniMotion = effDiamond.Behaviors.Add(msoAnimTypeMotion)

With aniMotion.MotionEffect
      .FromX = 0.00000638889
     .FromY = -0.0000037037
   .ToX = 0.48039
   .ToY = -0.32569
   
End With

effDiamond.Timing.TriggerShape = shpAnswer
End Sub
Geoff Cox - 31 Oct 2006 08:42 GMT
>Hello,
>
[quoted text clipped - 6 lines]
>
>effectId:=msoAnimEffectPathCurvyStar, _

Oops! My mistake - I had fogotten that I had found out that I should
use .InteractiveSequences and not .MainSeuqences.

I can use

effectId:=msoAnimEffectCustom, _

Geoff

>which is fine! But what should replace this parameter? A gap is not
>allowed and adding msoAnimEffectCustom is wrong.
[quoted text clipped - 48 lines]
>effDiamond.Timing.TriggerShape = shpAnswer
>End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.