1 Reply Latest reply on Jun 10, 2011 6:27 AM by messmoooo

    Resize flash platform with different screen orientation

    messmoooo

      Hi,

       

      I finish develop a chat aplatform later i meeta problem is how to resize the platform to work fine with diffrent screen size, i really need help  to solve this problem if  could help  to fix the code for work fine.

       

      Thanks,

       

      Here is what i done

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                     xmlns:s="library://ns.adobe.com/flex/spark"
                     xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:rtc="http://ns.adobe.com/rtc" width="100%" height="100%" backgroundColor="#51575D">
             <fx:Style source="Client.css"/>
               <fx:Script>
              <![CDATA[
                  import mx.events.FlexEvent;
                 
                 
                  protected function txtUsername_enterHandler(event:FlexEvent):void
                  {
                      // TODO Auto-generated method stub
                      connectRoom.login();
                      labelUsername.visible = false;
                      txtUsername.visible = false;
                  }
              ]]>
          </fx:Script>
             
             <fx:Declarations>
               <s:Move duration="500" id="moveEffect"/>
              <s:Resize duration="500" id="resizeEffect"/>
          </fx:Declarations>

       

                    <mx:Image x="0" y="0" width="100%"  height="100%" scaleContent="false" autoLoad="true" source="greenbackground.png"/>
                                       <rtc:ConnectSessionContainer horizontalScrollPolicy="off" verticalScrollPolicy="off" id="connectRoom" autoLogin="false"
                                             roomURL="https://collaboration.adobelivecycle.com/ahmedelshfie/egtecnolab"
                                             y="20" width="95%" height="90%" backgroundColor="#212D4B" contentBackgroundColor="#F6F6F0" borderAlpha="1.0" cornerRadius="30" contentBackgroundAlpha="1.0" backgroundAlpha="0.4" x="33" dropShadowVisible="true" borderVisible="true">
                          <rtc:authenticator>
                             
                                  <rtc:AdobeHSAuthenticator userName="{txtUsername.text}"/>
                       </rtc:authenticator>
                            <rtc:SimpleChat width="293" height="258" x="2" y="165" chromeColor="#384D91"/>
                             <rtc:WebcamSubscriber y="4" displayUserBars="true"  width="292" height="158" x="2"/>
                       <rtc:AudioSubscriber id="audioSub" width="0" height="0"/>
                                           <rtc:FileShare height="135" width="290" x="5" y="425" chromeColor="#284C79"/>
                          <rtc:ScreenShareSubscriber id="scrShare" width="81%" height="99%" y="4" x="299"/>
          </rtc:ConnectSessionContainer>
          <s:Label id="labelUsername" y="230" text="   Enter a username and press Enter:&#xd;" color="#B5C40D" fontWeight="bold" horizontalCenter="0"/>
          <s:TextInput y="250" width="229" textAlign="center" id="txtUsername" enter="txtUsername_enterHandler(event)" color="#090909" horizontalCenter="0" height="27" fontWeight="bold" borderAlpha="0.99" contentBackgroundColor="#989A9C"/>
      </s:Application>