Solved

Adjusting flash to screen size as a projector

Posted on 2009-04-13
6
689 Views
Last Modified: 2013-11-11
I want a flash projector that runs on the local computer to adjust to the screen size of the viewer.  How do I do this?
0
Comment
Question by:Dier02
  • 3
  • 3
6 Comments
 
LVL 19

Expert Comment

by:quizengine
ID: 24128570
You've got three issues to address.

1) the version of actionscript in the movie (AS2 and AS3 have slightly different commands to achieve what you want)

2) The resolution of the screen it's being viewed on, and

3) The aspect ratio of the screen(s) being viewed on

Do you know the answer(s) to any of these questions ? (I imagine that you may want 2 & 3 to cover *all* screens, and I'll answer that, but knowing the answer to 1) is quite important. If you don't know the answer but can post the .fla then I can find out.)
0
 

Author Comment

by:Dier02
ID: 24128697
AS2
0
 

Author Comment

by:Dier02
ID: 24128703
And yes, "all" is what I want
0
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
LVL 19

Expert Comment

by:quizengine
ID: 24128738
Ok. There are two bits of code. These are

fscommand("fullscreen", true);

This forces the Flash Player to go full screen. But two things to bear in mind. Firstly, is the 'aspect ratio' of your movie. That's the relation between the height and width. E.g. if the original size of the Flash stage was, say 800 x 600 or 1024 x 768 (a typical 'square' PC resolution) then if that were 'fullscreened' on a more modern *widescreen* display, say 1360 x 768 or 1680 x 1050, then you would get black bars left and right of the screen. Very similar, in fact, to when you see an old 4:3 TV programme on a widescreen TV.

Now at this point you have a choice to make. Do I allow the Flash movie to be scaled to fit the screen perfectly. E.g to 'stretch' a 1024 x 768 .swf to perfectly fit (no black bars) a 1360 x 768 screen ? If you do want to allow that, use the code

fscommand("allowscale, "true");

The penalty for allowing this is that elements of your movie may distort unacceptably. For example what was a perfect circle at 1024x768 becomes a squashed ovoid at widescreen.

One possible course might be to let the user choose with these fullscreen and scaling commands being attached to buttons.

One final thing on scaling. If your original movie's stage size is *smaller* than the user's screen res, and you go fullscreen, any *bitmap* images, or video clips in your movie will *pixelate*. How badly they do this will depend on how much the resolution has been increased by. If the content of your movie is entirely *vector* (text and 'shapes') then this is not a problem - always a good argument for using vector artwork whereever possible.

Hope that is enlightening.

Oh, and one last thing - although this situation is probably much less common, the reverse of the 4:3 -> widescreen can occur. This is where you create a widescreen .swf and the user has a 4:3 screen. Here, if you use allowscale, their circles become vertically elongated instead of squashed, and you get black horizontal bars (top and bottom of the screen) if you don't permit scaling.
0
 
LVL 19

Accepted Solution

by:
quizengine earned 500 total points
ID: 24128740
and if you want to use 'allowscale' you should issue that command *before* using the fullscreen one.
0
 

Author Comment

by:Dier02
ID: 24129129
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question