applicationskin.as

来自「用Flex实现的一个关于减肥系统的web界面,内部没有实际的业务逻辑,只是一个原」· AS 代码 · 共 40 行

AS
40
字号
package assets.skins{	import flash.display.BitmapData;		import mx.core.BitmapAsset;	import mx.skins.ProgrammaticSkin;	public class ApplicationSkin extends ProgrammaticSkin	{		public function ApplicationSkin()		{			super();		}				override protected function updateDisplayList(unscaledWidth:Number,    unscaledHeight:Number):void		{			graphics.clear();			var backgroundColor:uint = getStyle("backgroundColor");			var backgroundAlpha:Number = 1.0;			graphics.beginFill(backgroundColor, backgroundAlpha);			graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);									var backgroundImageClass:* = getStyle("backgroundImage");			var backgroundRepeat:* = getStyle("backgroundRepeat");			if(backgroundImageClass && backgroundRepeat == "repeat-x")			{				var backgroundImage:BitmapAsset = new backgroundImageClass();				var bitmapData:BitmapData = backgroundImage.bitmapData;								//bitmapData = new BitmapData(backgroundImageInstance.width,backgroundImageInstance.height, true);				//bitmapData.draw(backgroundImageInstance,new Matrix());								graphics.beginBitmapFill(bitmapData,null,true);				graphics.drawRect(0, 0,unscaledWidth,backgroundImage.height);				graphics.endFill();			}		}	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?