okay - i'm trying to get this to work but Capabilities.screenResolutionX is a strange beast

when i run the following traces, i get the following results

trace ("screen resolution is type "+typeof (Capabilities.screenResolutionX)); // traces number trace ("resolution x is "+Capabilities.screenResolutionX); // traces 1600
                        trace ("stage width is "+stage.stageWidth);  // traces 
800
                        trace (this.scaleX);  // traces 1

but if i try to use the screenResolutionX as a number, i get a coercion error:

                        screenResX:Number = Capabilities.screenResolutionX;

outputs:
1067: Implicit coercion of a value of type Number to an unrelated type Class.
1188: Illegal assignment to class Number.

can anyone tell me why this would be and what i can do to get around it? I've tried casting it' as Number' but that didn't work and according to the typeof trace, it isn't necessary

thanks
a








On 16 May 2008, at 17:25, Romuald Quantin wrote:

I guess it is, I enclosed a quick try (open the FLA and shift + F12 to get
the EXE).

Here is the code:

stage.displayState = StageDisplayState.FULL_SCREEN;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
mc.x = stage.stageWidth * .5;
mc.y = stage.stageHeight * .5;
mc.width = stage.stageWidth * .8;
mc.height = stage.stageHeight * .8;

your movie is scaled to 80% of the screen, be careful as if you leave the fullscreen mode, it is not working anymore, you'll need to test the state and apply other settings in case the user is not in fullscreen anymore.

the mc is your content, centered in my try... if you don't want you main
centered as I did, I think you'll have to test the user resolution:
http://www.webzo.org/tutorials/flash/user-resolution-detection.php
and then calculate the 20% gap in pixels to change the width, height, x, y
of your content.

Well, just a hint but it might possible, I hope it helps.

Romu
www.soundstep.com



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Allandt
Bik-Elliott (Receptacle)
Sent: 16 May 2008 16:42
To: Flash Coders List
Subject: Re: [Flashcoders] StageDisplayState.FULL_SCREEN

The movie was originally supposed to be fixed but the client has
asked for me to make it scale

I'd like the movie to scale to about 80% of the screen size rather
than 100% - is this possible?


On 16 May 2008, at 16:12, Romuald Quantin wrote:

If the swf size is fixed and you activate fullscreen, it should
work as
expected. Sorry I don't have any source code example but I think
I've done
it. But around the movie you'll get the color set for the SWF,
meaning if
you want you fixed SWF sitting on a nice gradient background, I
don't think
it is possible...

If I remember well, better trying to be sure.

Let us know.

Romu

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Allandt
Bik-Elliott (Receptacle)
Sent: 16 May 2008 15:52
To: flashcoders
Subject: [Flashcoders] StageDisplayState.FULL_SCREEN

is it possible to set a projector to show in fullscreen but reduce
the actual movie to, say, 80% of the total screen size?

Basically I have a projector that I've been working on but the client
has asked that rather than have the window not scale within the
screen (which I was using stage.scaleMode = StageScaleMode.NO_SCALE
for), they'd like the movie to scale up to the screen size. The
problem with this is that it can be rather over-powering as it's not
really been designed for this kind of view.

So my thinking is that I'd like it to scale to about 80% of the
screen size with the rest being a neutral border

is this possible?

thanks
Allandt

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to