views:

348

answers:

1

I have some interesting problem for an hour.. In my flex project, all width and height properties returns as zero.. i tried this :

 private function onEnterFrame(e:Event):void
 {
  trace(stage.width, parent.width, this.width, root.width);
 }

and results :

0 0 0 0

using Flex, sdk 3.2

Anybody could help me?

Thank you..

+3  A: 

I think you want stage.stageWidth, and stage.stageHeight, not stage.width, and stage.height.

quoo
OMG! how i missed this.. Thank you so much!
Tolgahan Albayrak
haha, no prob, I made the same mistake myself the other day!
quoo
I tried the stage.stageHeight I set it to 100 but in the trace it still gives me 950
Fahim Akhter
stage.stageHeight is a read only property, you can't set it.
quoo