views:

442

answers:

3

Hi, I'm new in flex. I faced problem to make full screen in flex 3.My layout container type like below.

<mx:Application >
<mx:Panel>
<mx:ViewStack>

<mx:VBox >
    <mx:VBox >
     <mx:Canvas >
      <mx:HBox width="300" height="300">  

      </mx:HBox>

     </mx:Canvas>
    </mx:VBox>
</mx:VBox>
</mx:ViewStack> 
</mx:Panel>
</mx:Application>

the container width and height will be fixed like above.Then when i click a button full screen it will be full screen mode. Please help me with example and tutorial.

best regard. Mahedi

A: 

Just set

<mx:HBox width="100%" height="100%">
    //Other Codes
</mx:HBox>
Treby
sorry for incomplete code.Firstly,the container width and height will be fixed like below.Then when i click a button full screen it will be full screen mode<mx:HBox width="300" height="300"> //Other Codes</mx:HBox>
Mahedi
oh.. just put width="100%" height="100%" in <mx:Application>
Treby
+1  A: 

Assuming you are referring to full screen as in 'use the whole monitor':

Calling stage.displayState = StageDisplayState.FULL_SCREEN; will set your flash movie to full screen mode (provided that the allowFullScreen parameter has been set to true in the object/embed tags of the embedding html page). Scale up the hbox (change its width/height) so that it occupies the whole space available.

Amarghosh
Thank you very much for your reply.I need more details please.
Mahedi
more details like?
Amarghosh
sorry for late reply.Actually i need a completed example cause already try to do with some hints but i'm not able to do it. please help me.
Mahedi
what error did you get?
Amarghosh
Scale up the hbox (change its width/height) so that it occupies the whole space available.How can i do that please show me with code example.
Mahedi
A: 

From what I understand what you want is to change the width / height of the component at run-time.

In this case you need to give an id to the HBOx, add a script block, and call the 'width' / 'height' setter on your block.

Is that what you want to do ?

Thanks PH

phtrivier