I changed the script as you said and it works but it only does to transitions slides up to the left and down then up to the rightr and down here the script in question.
Thanks for your help I hope this canbe fixed.
/**
* Apply Transition to Adjacent Video events and optionally move
* events to overlap events.
*
* For use with Sony Vegas Video 5.0
*
* Copyright 2003 murkWare (murk@murkvisuals.com)
*
* Minor update on Dec 18, 2003 to fix issues with latest API
*
* UPDATE 1/6/2004: Jeffrey Creem has added a "Zoom Percent" option
* Which will zoom in on each event and pan across it
**/
import System.Windows.Forms;
import Sony.Vegas;
import Sony.Vegas.Script;
var overlapTime = 30;
var ZoomSlidePercent = 80;
var dialog = new TransitionDialog(overlapTime);
var bFade = false; //Only true if the second list item is chosen
var bRandom = false; //Only true if the first list item is chosen
dialog.m_transList.Items.Add("Random For each event")
dialog.m_transList.Items.Add("Standard Cross Fade")
var count = 0;
var totalTrans = Vegas.Transitions.Count;
var num;
var transEnum = new Enumerator(Vegas.Transitions);
//Get the current ruler format so we can restore it later
var oPrevRulerFormat = Vegas.Project.Ruler.Format;
var startoffset = overlapTime;
var trackEnum = new Enumerator(Vegas.Project.Tracks);
var fx;
while (!trackEnum.atEnd())
{
var tr = trackEnum.item();
var eventEnum = new Enumerator(tr.Events);
while (!eventEnum.atEnd())
{
var ev = eventEnum.item();
if (ZoomSlidePercent != 100 )
{var startTimecode = new Timecode(ev.Start);
var stopTimecode = new Timecode(ev.Length);
var startMotionKeyFrame = ev.VideoMotion.Keyframes[0];
var endMotionKeyFrame = new VideoMotionKeyframe(stopTimecode);
var Scale = new VideoMotionVertex(float(ZoomSlidePercent) / 100.0, float(ZoomSlidePercent) / 100.0);
Scale.X = Scale.X;
Scale.Y = Scale.Y;
startMotionKeyFrame.ScaleBy(Scale);
var Offset = new VideoMotionVertex(-startMotionKeyFrame.TopLeft.X, -startMotionKeyFrame.TopLeft.Y);
Offset.X = Offset.X * (0.5 + Math.random())/2.0;
Offset.Y = Offset.Y * (0.5 + Math.random())/2.0;
if (Math.random() > 0.5) {Offset.X = Offset.X * -1.0};
if (Math.random() > 0.5) {Offset.Y = Offset.Y * -1.0};
startMotionKeyFrame.MoveBy(Offset);
ev.FadeIn.Curve = CurveType.Slow
if(bRandom)
{
num = int(Math.random() * totalTrans + 1);
if (num > 23)
{
num = totalTrans - 1;
}
plugIn = Vegas.Transitions.GetChild(int(num));
}
var startTime = new Timecode(ev.Start);
var length = new Timecode(ev.Length);
var offset = new Timecode(startoffset);
//MessageBox.Show("Start Time: " + startTime + " Offset: " + offset + " startoffset: " + startoffset);
startTime = startTime - offset;
ev.AdjustStartLength(startTime,length,true);
Vegas.UpdateUI();
if(ev.MediaType == MediaType.Video && !bFade)
{
fx = new Effect(plugIn);
ev.FadeIn.Transition = fx;
}
eventEnum.moveNext();
startoffset = startoffset + overlapTime;
}
startoffset = overlapTime;
trackEnum.moveNext();
}
}
} catch (e)
{
MessageBox.Show(e + "\n\nReport this error to murk@murkvisuals.com\n\n" + num);
}
//Restore the original ruler format
Vegas.Project.Ruler.Format = oPrevRulerFormat;
// Form subclass that is the dialog box for this script
class TransitionDialog extends Form {
var ZoomSlidePercentBox;
var overlapTimeBox;
var m_transList;