3 Replies Latest reply on Mar 30, 2010 12:49 PM by Sean_Wilson

    multiple resolution screens without scaling

    spdorsey6969

      Hello.

       

        A client is asking me to build a simple disc for playing back movies in the center of the frame. I can do this easily enough, but I'd like to make that interface fit whatever screen shows it - from 1920x1200 (smallest) all the way up to 2560x1600.

       

        How would I go about accomplishing this task? I'd need to keep interface elements in place and centered on screen while the outside edges expand to fit the size oc the monitor's resolution.

       

        Mac and Windows.

       

      Thanks,

       

      -----------------S

        • 1. Re: multiple resolution screens without scaling
          Sean_Wilson Adobe Community Professional

          You can have your stage fill the available screen by setting its rect, and you can centre your content in it by setting the drawRect:

          on prepareMovie
            aw = _player.activeWindow
            aw.rect = _system.desktopRectList[1]
            tRect = mCenterRectInRect(aw.sourceRect, _system.desktopRectList[1])
            aw.drawRect = tRect
          end
          
          on mCenterRectInRect r1, r2
            mW = r2.width/2
            mH = r2.height/2
            sw = r1.width/2
            sH = r1.height/2
            return rect(mW - sw, mH - sH, mW + sw, mH + sH)
          end
          • 2. Re: multiple resolution screens without scaling
            spdorsey6969 Level 1

            This is very helpful - I think I understand what it is trying to do. I tlooks similar to the way I would center a DIV on screen using CSS in an HTML doc. Measure the screen width, divide in half, subtract half of the stage's width, then place the item.

             

              Would I place this script in the first frame of the effects channels in the Score? So that ot would be activated when the projector launches and enters the first frame?

             

            Thanks

            • 3. Re: multiple resolution screens without scaling
              Sean_Wilson Adobe Community Professional
              Would I place this script in the first frame of the effects channels in the Score? So that ot would be activated when the projector launches and enters the first frame?

               

              No, it goes into a movie script (Ctrl + Shift + U) - the #prepareMovie message is the first one sent when a file opens.