#1
|
|||
|
|||
animation and line movement
Hello everyone, and the first time I write here, and I ask for a information on a animation.
Let's say I have a rectangular shape that must move from right to left, I go to Animations and choose the horizontal line and the extension to determine the displacement. my question is, if I want to determine that the line is 15cm long what I can do to determine the length of the line of movement is of Xcm, rather than lengthen or decrease it manually, which never comes to precision inserting 15cm or 16cm could determine with precision displacement. There is the possibility of such determination. or code to enter. A greeting and thanks in advance to those who will give me a feedback. Hello By Sal (8-D) |
#2
|
|||
|
|||
Unfortunately this is not simple to understand and you really need to understand VML paths.
Here's the code to move left (or right with postive values) in code by a set amount. The VML Path is M= Motion 0 0 From current position L=Line amount left measures in fractions of slide width amount up and down in fractions oof slide height E=End Try this with various values and make sure the rectangle is selected. Sub Left_xx() Dim oshp As Shape Dim oeff As Effect Dim osld As Slide Dim swCm Dim HowFarLeft As Single HowFarLeft = 7 'change this swCm = Points2cm(ActivePresentation.PageSetup.SlideWidth) If ActiveWindow.Selection.ShapeRange.Count <> 1 Then Exit Sub Set oshp = ActiveWindow.Selection.ShapeRange(1) Set osld = oshp.Parent Set oeff = osld.TimeLine.MainSequence.AddEffect(oshp, msoAnimEffectPathLeft, msoAnimateLevelNone, msoAnimTriggerOnPageClick) oeff.Behaviors(1).MotionEffect.Path = "M 0 0 L " & CStr(-(HowFarLeft / swCm)) & " 0 E" End Sub Function Points2cm(inVal As Single) As Single Points2cm = inVal / 28.346 End Function |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do you extend line down the trend line to the x axis? | madoka | Excel | 0 | 11-01-2012 09:18 PM |
I indent second line and the first line indents, help. | DerekUD | Word | 1 | 05-06-2011 11:26 PM |
Line breaks at each line in Web text | ahazelwood | Word | 5 | 01-06-2011 02:37 PM |
A macro to mirror the movement of the cursor | ACA | Word VBA | 0 | 08-24-2010 03:21 PM |
Movement slide with excel sheets | majed | PowerPoint | 4 | 01-17-2009 04:24 PM |