Think of something that you wish Authorware could do but it doesn't?  Let the our good friends at Macromedia know via the wishlist.

Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed.

Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list.

Back

B1009 - How do I make sure everything stays centered no matter what my resolution?

by - Joseph Ganci


Several people have asked whether Authorware can't somehow resize everything on the screen so no matter what resolution the client is using, the application will fill the screen.  This is not possible (at least not without heroic efforts).  However, here is the next best thing.  

This solution will allow you to place a full-screen 1024x768 background on the screen.  Authorware will determine the current screen resolution, then move the presentation window so that a 640x480 area is properly centered on the screen. 

 
The File properties are set to a screen resolution of 1024x768.  We start with a Calculation icon script, which moves the presentation window to the proper place: 
    xOffset:=yOffset:=0 
    if ScreenWidth = 640 then XOffset := 192 else if ScreenWidth = 800 then XOffset := 112 
    if ScreenHeight = 480 then YOffset := 144 else if ScreenHeight = 600 then YOffset := 84 
    MoveWindow(-YOffset,-XOffset)
The background Display icon is a full-screen 1024x768 graphic. 

The second Calculation icon contains the following script:
 
    x:=y:=0 
    if ScreenWidth = 1024 then x := 192 else if ScreenWidth = 800 then x := 80 
    if ScreenHeight = 768 then y := 144 else if ScreenHeight = 600 then y :=60 
    Box(1,x+XOffset,y+YOffset,x+XOffset+639,y+YOffset+479)
This will draw a 640 x 480 box in the center of the screen. This acts as a guide for you to place all of your graphics, interactions, and so on.  The final Display icon simply shows an example of where you would place your objects on the screen. 

There are 0 reviews
Add your review
Back