⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 screenshotslargeimage.mxml

📁 flex 实现的一个showcase 喜欢flex的朋友可以
💻 MXML
字号:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" 
	width="207" height="172"
	horizontalScrollPolicy="off"
	verticalScrollPolicy="off">
	
	<mx:Script>
		<![CDATA[
			
			
			/////////////////////////////////////////////////////////////////////////////////////////
			//public variables
			
			[Bindable]
			public var imageURL:String;
			
			/////////////////////////////////////////////////////////////////////////////////////////
			
			private function handleLoadComplete(event:Event):void{
				Bitmap(event.target.content).smoothing = true;
				var image:DisplayObject = this.imageLoader_mc.content;
				
				var wratio:Number=205/this.imageLoader_mc.contentWidth
				this.imageLoader_mc.width=this.imageLoader_mc.contentWidth*wratio
				this.imageLoader_mc.height=this.imageLoader_mc.contentHeight*wratio
				
				//checkto see if the height is too small now, if it is, resize based on height to make it fit
				if(this.imageLoader_mc.height<170){
					var hratio:Number=170/this.imageLoader_mc.contentHeight
					this.imageLoader_mc.width=this.imageLoader_mc.contentWidth*hratio
					this.imageLoader_mc.height=this.imageLoader_mc.contentHeight*hratio
				}
			}
			
			public function removeImage():void {
				this.imageLoader_mc.source = null;
			}
		
		]]>
	</mx:Script>
	
	<mx:Canvas id="imageHolder_mc" width="205" height="170" x="1" y="1"
			horizontalScrollPolicy="off" verticalScrollPolicy="off">
		<mx:SWFLoader id="imageLoader_mc" source="{this.imageURL}"  complete="this.handleLoadComplete(event)"
			width="400" height="400"/>
	</mx:Canvas>
	<mx:Image source="@Embed('/assets/images/screenshots_largeImage_outline.png')"/>
</mx:Canvas>

⌨️ 快捷键说明

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