loadingimage.mxml

来自「flex书效果代码」· MXML 代码 · 共 35 行

MXML
35
字号
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas 
	xmlns:mx="http://www.adobe.com/2006/mxml" 
	width="75" height="75"
	>
	
	<mx:Script>
		<![CDATA[
			
			private var _source:*;
			
			[Bindable]
			public function set source( value:* ):void
			{
				_source = value;
				spin.visible = true;
			}
			public function get source():*
			{
				return _source;
			}
			
			
			[Bindable]
			public var maintainAspectRatio:Boolean = true;
		]]>
	</mx:Script>
	
	
	<mx:SWFLoader id="spin" source="@Embed('assets/clock.swf')" width="75" height="75" trustContent="true" horizontalCenter="0" verticalCenter="0" />
	
	<mx:Image id="image" width="100%" height="100%" source="{source}" maintainAspectRatio="{maintainAspectRatio}" trustContent="true" complete="{spin.visible=false}" ioError="{spin.visible=false}" securityError="{spin.visible=false}" />
	
</mx:Canvas>

⌨️ 快捷键说明

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