Friday, September 30, 2005

Resizing the monitor resolution from Flash

One of my clients recently wanted me to create a presentation in flash, they fullscreen images to fade into each other timed to the beat of music.

Adding the images proved to be a pain in the backside, since everytime I had the fades timed to the music on my machine the timing was off on the clients machine. After a couple of hours scratching my head I realised the clients monitor was set to a different resolution so the images were being stretched more, the processor was having to work harder and because of this the music was starting to get ahead of the images.

The answer is a simple one, we simply reduced his resolution to match my own. Sorted you might think.

The client then made his presentation to his client and his client wanted to take the presentation away with them to show it off. Not a good idea, I thought. We cant go around all the machines he wants to show it on and manually resize the res, so we needed it to happen automatically.

We know that flash on its own doesnt have the capability of doing this so we need a third party solution. I found a free application called ResChange 2.0 which can be found here.
Its free to download and use thanks very much 12noon (the publisher) you made my life a lot easier. All you have to do is pass a few variables to it resolution colour depth etc.

Now we have to call ResChange from flash. This is where the fscommand method comes into play. Macromedia have clamped down on the fscommand methods power, you used to be able to point it at any document and it would open the necesary application. Well not anymore, what you have to do now is point it to the application, but wait its still not that easy, you have to place the application inside a folder called fscommand.

so ResChange lives in the fscommand folder so lets use fscommand to activate it. But how do we pass the variables needed to resize the screen? I hear you shout. Macromedia in their wisdom hace also hobbled the poor fscommand in that you can no longer pass any arguments to the application being called. BUMMER.

What we have to do is create a .bat file that will pass the arguments needed when it activates the ResChange app. It does work I promise you download these files and give it a whirl.

My example sets the monitor res to 1024 x768with a max depth.
Flash can detect the current screen resolution so im sure you could have your flash presentation resize the monitor to its original settings with a little bit of code and the right .bat files.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home