(A George Script For Aura)

Written By J.L. White


While I was working on the avi samples for AuraFX, I needed to Slide (or Shift) ALL the Layers so the next Layer started right after the one before it. I had over 30 Layers and trying to slide all of them was not a hard thing to do, but it did take a LOT of time. I was tweeking each layer as I went, like looping the layers, duplicating the last frame, time stretching the layer, etc. Each time I made a change, I had to reset ALL the layers below it. This script made it a breeze. If I had a ton of changes, I would use the Zero Layer script, then make the changes, then run this one again. If I saw something I wanted to edit, I did so and ran the script again.

If you work with lots of Layers, this will save you a tremendous amount of time in repositioning the layers. Also check out the Zero Layer, Delete Frames & Duplicate Frames, as they all work well together.

You can go to the bottom of the page from here and click on the link to download this script, or follow along now as we break down the script, to show you how it does what it does. The acutal script is between the start and end George script lines. My comments will look like this < --- Comment Goes Here --- > and are not actually part of the script itself.

< ---------------------------------- Start of George Script ----------------------- >
// Slide Layer
// By J.L. White
// (C)2000 Visual Inspirations Inc.
< --- The first 3 lines are just comment lines. Anything that starts with // is a comment --- >

Param none
connect Aura Commands
< --- Tells Aura what options to use, like rectangle, circle, for this we need none --- >

i=0 < --- Inititalize variable --- >
do
   tv_LayerGetID i
   i = i+1
   MyID(i) = result
Until (CMP(MyID(i),"none") == 1)
Total = i-1
< --- The loop above finds Total Number of Layers in Project --- >

tv_LayerGetID 0
parse result FirstLayer
< --- Gets ID of First Layer --- >

tv_LayerSet FirstLayer
< --- Sets First Layer as Current Layer --- >

tv_LayerInfo FirstLayer
parse result LayerDisplay LayerPosition LayerDensity LayerName LayerType LayerStartFrame LayerEndFrame LayerTable
< --- Gets Start & Total Frames of First layer --- >

for i = 1 to Total-1
   NewStart = LayerEndFrame+1 < --- Sets Start Frame of Next Layer --- >
   tv_LayerGetID i < --- Gets ID of Next Layer --- >
   MyID(i) = result
   tv_LayerSet MyID(i) < --- Sets Next Layer as Current Layer --- >
   tv_LayerShift MyID(i) NewStart < --- Shifts Layer to Start where Last Layer Ended --- >
   tv_LayerInfo MyID(i) < --- Gets Total Frames to know where Next Layer Begins --- >
   parse result LayerDisplay LayerPosition LayerDensity LayerName LayerType LayerStartFrame LayerEndFrame LayerTable
end < --- Loops Through All Layers --- >

exit
< --- Exit the script --- >
< ---------------------------------- End of George Script ----------------------- >



Click Here to Download SlideLayer.zip


Well that does it for this one, till next time...


To contact Jeff White you can E-Mail him at jeff@vionline.com

Back To The Tutorial Page
Copyright © 2000 Visual Inspirations