I think SAFlashPlayer might do a quick resize so if you check later it
has the right size.  Try tracing on "enterFrame" events.

 

In general, we do very little in the constructors.  There  is an INIT
method which is used to kick off real work.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of seriousbraincancer
Sent: Saturday, June 02, 2007 5:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] stage.stageWidth/stageHeight lies in standalone
player?

 

Hi all,

I'm trying to base some calculations on the stageHeight and
stageWidth, but I end up getting 636 and 464 every single time for
stageWidth and stageHeight (resp), no matter what parameters I give
for -default-size. I'm running the swf in the standalone player and
I've built it with the SDK.

When the swf loads, and it looks like the size I specify for
-default-size, but the actual values returned by those properties
don't match.

Here's a pared down example:

package {
import flash.display.Sprite;
public class Test extends Sprite {
function Test() {
trace([stage.stageWidth, stage.stageHeight]);
}
}
}

> mxmlc -default-size 200 200 Test.as

The trace output shows "636,464" when you run the resulting swf even
though the standalone player looks like it's 200x200.

Is this a bug in the standalone player?

 

Reply via email to