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>
    

      

  • 相关阅读:
    基于redis实现的延迟消息队列
    Redis实现求交集操作结果缓存的设计方案
    限流算法之漏桶算法、令牌桶算法
    Apache设置防DDOS模块mod_evasive
    FastCGI技术
    详解强大的SQL注入工具——SQLMAP
    nginx根据域名做http,https分发
    Nginx配置SSL证书部署HTTPS网站
    JProfiler学习笔记
    Mysql压测工具mysqlslap 讲解
  • 原文地址:https://www.cnblogs.com/regalys168/p/4139117.html
Copyright © 2011-2022 走看看