petersego
asked on
Why is stageHeight 100 px smaller
I have a very strange problem with stage.stageHeight.
I have the usual stage-size of 550x400, but for some reason the stageheight is only showing (and tracing) as 300. Whatever I set the scenesize at, the stage.stageHeight is always 100 px smaller. For example in this example, where the stageWidth fills out the entire scene, but in the buttom there is a 100 px white background.
var bg:Sprite;
bg=new Sprite();
bg.graphics.beginFill(0x00 6699,0.7);
bg.graphics.drawRect(0,0,s tage.stage Width,stag e.stageHei ght);
bg.graphics.endFill();
addChild(bg);
What is wrong?
I have the usual stage-size of 550x400, but for some reason the stageheight is only showing (and tracing) as 300. Whatever I set the scenesize at, the stage.stageHeight is always 100 px smaller. For example in this example, where the stageWidth fills out the entire scene, but in the buttom there is a 100 px white background.
var bg:Sprite;
bg=new Sprite();
bg.graphics.beginFill(0x00
bg.graphics.drawRect(0,0,s
bg.graphics.endFill();
addChild(bg);
What is wrong?
ASKER
Well, because I will not know it, except in this question, where I wanted to show the problem.
ic
try setting the sprite's height and width to stage height /width
try setting the sprite's height and width to stage height /width
ASKER
Im not sure what you mean.
I have no problem solving this problem for this movie - var realstageHeight=stage.stag eHeight+10 0 solves it;
But Im looking for the underlying problem. Is it an IDE-error, some configuration-savings, thats gone wrong or am I missing something...
I have no problem solving this problem for this movie - var realstageHeight=stage.stag
But Im looking for the underlying problem. Is it an IDE-error, some configuration-savings, thats gone wrong or am I missing something...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Create a new Project and add only one line
trace(stage.stageWidth + ", " + stage.stageHeight);
trace(stage.stageWidth + ", " + stage.stageHeight);
ASKER
For some reason the problem suddenly disappeared this morning. I have no idea why. But thanks for your suggestions anyway.
The reason your stage height is smaller is because you have the Flash Bandwidth profiler on. This is a classic bug with Flash player, and has been around since the dawn of time.
The solution is to close the bandwidth profiler when debugging your movie. Your clients won't experience this issue.
T
The solution is to close the bandwidth profiler when debugging your movie. Your clients won't experience this issue.
T
ASKER
Aaah, you are absolutely right.
I have already awarded points for this question, so I have created a new question at this location, where you can get your welldeserved points.
https://www.experts-exchange.com/questions/26983033/Why-is-stageheight-100-px-smaller-2.html
I have already awarded points for this question, so I have created a new question at this location, where you can get your welldeserved points.
https://www.experts-exchange.com/questions/26983033/Why-is-stageheight-100-px-smaller-2.html
instead of stage.stageHeight try just puting 400