[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

Flash CD-Rom stage sizes

Im making a cd-rom which the client wants to autostretch to fill any screen its shown on. Im making the cdrom in flash and export as a projector. I dont think Ill need adobe air or any compilers as its a resonably straightforward cdrom project.

I usuall work on web sites and as such Im not sure what stage sizes i should set the cd-rom too? It will be seen on laptops so should I use 800 x 600 as the base or 960 x 720? I'd like to use 960 x 720, is that ok?

Is the best way to handle scaling to use fscommands?
  • 3
  • 2
1 Solution
why you make 960 x 720?
since your screen on 800 x 600, use that size, if you set your project bigger than screen, parts of your project will go the screen.i suggest make it 800 x 600 and make solid color boarder around lets say 10 px, this boarder will appear when the user uses 800 x 600, if the user has bigger than that, the background color will appear extending the boarder color.

if your client wants full screen, use FScommand to make it full screen and none scalable, if you use raster in your project, with scaling it will appears jaggies.

you do not need AIR for auto run, but air great to run your app on any operating system.

i use for making CDs ZINC (swf to exe) program. it has many features such as:
changing resolution of the screen based on the projects height and width, open PDFs and more.

hope i helped you.
Resizing an exe for cdrom use is something you can do many ways. Fscommand is still a valid option but it has limitations. You mention that the client wants the projector to go fullscreen, whatever the users' res. The problem you'll have is that you would need to use allowscale true in the fscommand and that has two unpleasant effects: your raster images will pixelate and, if your movie is 4:3 aspect ratio, you'll get off stage symbols showing top and bottom on a wide sceen monitor. So I like to do the following, use fscommand to go fullscreen but use actionscript to really nail the resizing so I can better control it.

Have you tried manually resizing and positioning page elements using Stage.width and Stage.height? Those two little babies will tell your movie exactly what visible area it's dealing with and you can set the size of your elements accordingly. Here's an example:

// Set width of mc called header
header._width = Stage.width;
// Now make it appear in the top left corner
header._x = (Stage.width - 800) / -2;
header._y = (Stage.height - 600) / -2;

The 800 and 600 are your original stage size (although these days I'd use 1024 and 768) and subtract them from the available stage size and divide it by 2 to determine your  margins. Use a minus 2 so the polarity of the margin measurement is correct.

To take it to the next level you could combine this with a stage listener so that it resized accordingly when the window is resized!

As for the pixelation of raster images, if you need to allow for it, just make your images big enough to allow for the maximum possible size. It's a cd so download speed isn't a problem. Keep them 72 dpi and don't go too mad as animating massive images will give you choppy frame rates. The important thing to do is make sure that "Allow Smoothing" is enabled on the image once it's imported. This will make it look sharp at any size up to its original dimensions.

Hope this sends you in the right direction!
sousflaiAuthor Commented:
thanks court three great info, just a few questions...

1. My main consideration is laptop viewers, but if Im getting your direction right, I shoudl make the CD-rom 800x600 as the scaling code will make the most of everyones screen in any case.

2. Do you have an example of a stage listener for resizing with the window as mentioned? sorry my skills arnt great yet!

3. do I have to combine the very nice movie clip resizing with fs command. If Im understanding this right I should still use fscommand to simply make the cd-rom window resize itself to full screen but not let the fs command resize the content. Your movie clip code should then resize the content as it does a better job? Is this right or will the cd-rom always start full monitor screen size anyway?
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

You're absolutely right about the fscommand. You need to tell the EXE to go fullscreen but that's all. Don't let it do ant scaling.Then you can enjoy playing with the Stage measurements!

In reality, I'd go for a stage size of 1024 x 768 as the stats I have show very, very little 800 x 600 activity out there these days. Even though monitor res isn't the be all and end all, when your working on the file, seeing it as the vast majority of your end users will see it is definitely preferable.

As for the stage resize detection, try this:

// Declare the stage listener object
var oStageListener:Object = new Object();

// Write the function to execute when the stage is resized
// This would include all the code to move your symbols around
function stageResize():Void {
    // Put resizing actions here


// Declare the function to do stuff when the stage is resized
// This listens for the resizing then calls the stageResize function
oStageListener.onResize = function():Void {

// Add the listener to the stage object

That should get you moving! N.B. You might be thinking, "Why use two functions?" I do this because it means you can call the function to layout all the content from anywhere - not just on stage resize. For example, the first time you run the EXE, you'll need to call the stageResize() function manually to get all your symbols in the right position from the outset.
sousflaiAuthor Commented:
Hi Court three, sorry I guess what im not getting is the advantage of your code over the fs command allow scale. Is it that you can test for the new screen size and have new bespoke layouts for each rather than a mathematical upscale?
No probs, sousflai, I'll try to elaborate!

The code in my last post doesn't do anything other than listen for a stage resize. Listening for it allows you adapt the layout at any time depending on the visible area available. The key advantage is for things like text size and stuff where a pure mathematical downscale would render some elements illegible. Just as importantly, it allows you to vary the amount of stage available to a particular aspect of the layout.

I have a good example to show you: go to http://www.bdjfl.com

On the first page, click on "League Tables, Fixtures and Results". Have a flick through by all means but the main thing to notice is the header and footer which always remain anchored to the top and bottom of the screen. This allows you specify a minimum readable/usable size for the control elements of the site/cd-rom while giving the main content area as much room as is available to the user.

Does that make sense?


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now