zoukankan      html  css  js  c++  java
  • Flex 自适应全屏

    Event.RESIZE 窗口尺寸改变时 
    stage.width,stage.height 标识当前舞台上所有元素组合后的宽和高 
    stage.stageWidth,stage.stageHeight 表示当前窗口的宽和高 

    设置编译参数         -default-size 1440  900

    指定缩放模式

       stage.align = StageAlign.TOP;
    
       stage.scaleMode = StageScaleMode.SHOW_ALL;
    
       stage.addEventListener(Event.RESIZE, onResize);
       this.width = stage.stageWidth;
       this.height = stage.stageHeight;
       public function onRe(e:Event):void{
    	trace("===================this."+this.width+"stage.stageWidth:"+stage.stageWidth);
    	this.width = stage.stageWidth;
    	this.height = stage.stageHeight;
    	return;
     }
    
    //指定应用程序的大小是固定的,因此,即使在更改播放器窗口大小时,它仍然保持不变。如果播放器窗口比内容小,则可能进行一些裁切
    //stage.scaleMode = StageScaleMode.NO_SCALE;
    //指定整个应用程序在指定区域中可见,且不会发生扭曲,同时保持应用程序的原始高宽比。应用程序的两侧可能会显示边框。
    //stage.scaleMode = StageScaleMode.SHOW_ALL;	
    //指定整个应用程序填满指定区域,不会发生扭曲,但有可能会进行一些裁切,同时保持应用程序的原始高宽比。
    //stage.scaleMode = StageScaleMode.NO_BORDER;
    //指定整个应用程序在指定区域中可见,但不尝试保持原始高宽比。可能会发生扭曲。
    //stage.scaleMode = StageScaleMode.EXACT_FIT;
    //stage.width,stage.height 标识当前舞台上所有元素组合后的宽和高 
    //stage.stageWidth,stage.stageHeight 表示当前窗口的宽和高 


    //如果使用 stage.scaleMode = StageScaleMode.NO_SCALE; 会等比例缩放全屏幕


      

            <s:layout>
    		<s:VerticalLayout paddingLeft="10"  paddingRight="10"  paddingBottom="10" paddingTop="10"/>
    					
    	</s:layout>
    	<s:VGroup width="100%"  height="100" horizontalAlign="center" verticalAlign="top" clipAndEnableScrolling="false">
    		<s:Panel  width="100%" height="100"/>
    		
    		
    	</s:VGroup>
    	
    	<s:BorderContainer width="100%" height="80%"   >
    		<s:layout >
    			<s:HorizontalLayout horizontalAlign="center"/>
    		</s:layout>
    		<s:Image source="1.jpg"  width="800" height="600"/>
    		
    		</s:BorderContainer>
    	
    	
    	<s:VGroup width="100%" height="50"  horizontalAlign="center" verticalAlign="bottom">
    		<s:Panel  width="100%" />
    		
    		
    	</s:VGroup>
    

      

  • 相关阅读:
    DELPHI IDFTP
    关于网络的一些小知识
    bootstrap弹出框
    GIt的简单使用
    Ubantu搭建虚拟环境
    python中的随机模块random
    python中动态创建类
    关于深浅拷贝的测试
    关于面向对象的属性访问
    多任务的使用模式
  • 原文地址:https://www.cnblogs.com/regalys168/p/4139117.html
Copyright © 2011-2022 走看看