Ken Burns Effect in Rev?
Klaus Major
klaus at major-k.de
Sat May 14 10:07:29 EDT 2005
Hi Howard,
> On 5/14/05, Richard Gaskin <ambassador at fourthworld.com> wrote:
>
>> Chipp Walters wrote:
>>>> try in the message box:
>>>>
>>> go URL "http://www.gadgetplugins.com/chippstuff/KBmain.rev"
>>
>> I apppreciate your putting that together, but alas on my 1GHz Mac
>> it's
>> fairly choppy. :(
>>
>> Does it look smooth on your machine?
>>
>
> Hi Richard,
>
> It looked choppy on my 1GHz Mac also. Try changing the script of the
> Ken Burns Effect button to this:
>
> on mouseUp
> lock screen
> set the defaultStack to "KBMain"
> set the rect of img 1 to 0,0,1200,1200
> set the rect of img 2 to 0,0,1200,1200
> set the loc of img 1 to 200,200
> set the loc of img 2 to 200,200
> set the blendLevel of img 1 to 100
> set the blendLevel of img 2 to 0
> put item 1 of the loc of this cd into tX
> put item 2 of the loc of this cd into tY
> unlock screen
> repeat with x = 0 to 100
> lock screen
> set the blendlevel of img 2 to x
> set the blendlevel of img 1 to 100-x
> put the loc of image 1 into tLoc1
> put the loc of image 2 into tLoc2
>
> subtract 1 from item 1 of tLoc1
> subtract 3 from item 2 of tLoc1
> add 1 to item 1 of tLoc2
> add 2 to item 2 of tLoc2
>
> set the loc of image 1 to tLoc1
> set the loc of image 2 to tLoc2
> wait 1 millisecond -- this is the key to smoothing things out a
> bit
> unlock screen
> end repeat
> end mouseUp
>
> I changed how the images move but the key is to add a wait at the end
> of the loop. Rev is apparently so fast that it only shows every 5th or
> so increment through the loop so it seems to jump in discrete blocks.
> Adding the wait smooths things out quite a bit, althought it's still
> not as smooth as iPhoto.
Very nice, Howard, very nice, even on my 1 Ghz G4 :-)
But the choppiness Richard (and me!) experienced was a result of
changing also the
height/width of the image at the same time, something you cleverly
left out :-)
With it it is still a bit jerky...
> --
> Regards,
>
> Howard Bornstein
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list