Two questions

Scott Rossi scott at tactilemedia.com
Mon Nov 10 14:09:05 EST 2003


Recently, "Thomas J McGrath III"  wrote:

> 1. How do I know what the screen size of all users will be?

If you're asking how to check the screen size, you can get the screenRect.
If you're asking what resolution people run, nobody knows for sure.  The
best you can do is collect statistics from your users/audience, or look
online for more generalized usage statistics.


> 2. How do I know when the screen size is changed during operation of my
> project? While it is running

I don't believe there is any message that Rev receives when this happens
(although it seems on Windows stacks can be automatically resized, and thus
get a resizeStack message, if the resolution is reduced to dimensions
smaller than the stack's current rect).  If you expect users to be
constantly changing resolution while running your app, you could run your
own resolution monitor, something like:

  on preOpenStack
    # other scripts here
    set the uStoredRect of me to the screenRect
    checkMonitor
  end preOpenStack

  on checkMonitor
    # GRAB CURRENT SCREENRECT AND COMPARE TO STORED RECT
    if the screenRect <> the uStoredRect of me then
      # run resize script here
      set the uStoredRect of me to the screenRect
    end if
    send "checkMonitor" to me in 1 second
  end checkMonitor

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the Use-livecode mailing list