Properties not locking in

J. Landman Gay jacque at hyperactivesw.com
Sat Jan 13 14:01:02 EST 2007


Brad Sampson wrote:
> On a project I'm currently working on, I have a script that sets the
> fileName of a player, then runs some script that resizes the player
> for optimal quality.  However, the formattedHeight and formattedWidth
> of the player don't appear to be "locked in" when it trys to set them.
> They both appear as 0 for a very short time directly after setting
> the fileName.  This is a problem, because it trys to resize my player
> to 0x0 pixels, which reverts back to 1x1.  Is there any way to fix
> this problem?  I tried wait (until the formattedWidth of player
> "Output")>0, but it just freezes up my stack and you can't
> apple+period out of it.

It seems that sometimes properties are not recognized until the player 
actually does something with the movie. You could try starting the movie 
and playing only the first frame or the first few milliseconds, then 
stopping it. Anything that forces the player to do something with the 
movie data may work to jolt the player into recognizing the size properties.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list