Getting the height and width of a videoclip

Richmond Mathewson richmondmathewson at gmail.com
Sun Jan 17 16:26:02 EST 2010


On 17/01/2010 22:52, William Ziegler wrote:
>
> Thanks for the tip Richard, 

Who is 'Richard'?

> but I'll still need to check the video height and width to be sure it 
> fits on the screen in the correct place. If it can't be queried once 
> it's in the stack or subStack as a videoClip  can I constrain the 
> final imported videoClip through a script when I import it from the 
> file? I fit the video, no more than 5 - 10 seconds worth, in a button 
> that is the correct size, when the teacher is previewing it. That is 
> the size I need it for later on for a student "reward". Can I play a 
> videoClip within the rect of  a button? There doesn't seem to be a lot 
> of references to manipulating videoClips as there are with "Players".

A player is a Control, a videoClip is not

unfortunately a videoClip is shown as having dimensions 0 by 0

[ Tools/Application Browser  if you right-click on your video-clip you 
can see its property palette ]

You can set it width and height to whatever you want:

on mouseUp
    set the width of videoClip "CALC" to 300
    set the height of videoClip "CALC" to 300
    play videoClip "CALC"
end mouseUp

  but it does NOT affect its playback size at all! a bl***y nuisance.

You can set a videoClip's size to 2,3,4 times its normal size via its 
property palette, but that is not really
going to help you much.
>
> Bill
>




More information about the use-livecode mailing list