Properties not locking in
Mark Smith
mark at maseurope.net
Sat Jan 13 14:18:04 EST 2007
You could simply put a fixed wait in, say 10 or 20 millisecs (not
enough fro the user to notice, but enough for the player to sort
itself out, you'll have to experiment to see what works well), or do
a send in time that keeps going until the player is ready:
on checkPlayer
wait 10 millisecs
if the formattedWidth of player "Output" > 0 then
doFormatting
else
send "checkPlayer" to me in 10 millisecs
end if
end checkPlayer
Best,
Mark
On 13 Jan 2007, at 14:49, 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.
> Thanks!
> Brad
> CMSEC
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list