TiledImage.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.controls.SWFLoader;
import flash.display.BitmapData;
import flash.display.Bitmap;
public function set source(value:Object):void {
loader.source = value;
}
private function updateSource():void {
// use a SWFLoader to download the bitmap data then push that into the BitmapImage
bitmapImage.source = loader.content;
}
]]>
</fx:Script>
<mx:SWFLoader id="loader" complete="updateSource()" width="0" height="0" />
<s:BitmapImage id="bitmapImage" width="100%" height="100%" fillMode="repeat" />
</s:Group>
TiledImageAppcation.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:local="*"
width="90%" height="90%" viewSourceURL="srcview/index.html">
<s:Group width="{widthSlider.value}" height="100" horizontalCenter="0" y="10">
<local:TiledImage source="bgDiag.png" width="100%" height="100%" />
<s:Label text="Tiled Background" fontSize="16" horizontalCenter="0" verticalCenter="0" fontWeight="bold" />
</s:Group>
<s:HSlider id="widthSlider" value="200" minimum="150" maximum="300" horizontalCenter="0" y="125" />
</s:Application>
分享到:
相关推荐
To understand a scene in depth not only involves locating/recognizing individual objects, but also requires to infer the relationships and interactions among them. However, sincethedistributionofreal-...
vivado-embedded-design 设计文档,vivado-embedded-design 设计文档
Qt-Embedded-5.7.0.tar.xz
qt-embedded-free-3.3.8b.tar.gz
Barcode scanning library for Android, using ZXing for decoding. The project is loosely based on the ZXing Android Barcode Scanner application, but is not affiliated with the official ZXing project. ...
atlas-driver-neo4j-embedded-0.8.1.jar
qt-embedded-2.3.0.tar.gz
qt-embedded-linux-opensource-src-4.5.2.tar.gz.part1(共两部分)
标签:arquillian-tomee-embedded-1.7.1-javadoc.jar,arquillian,tomee,embedded,1.7.1,javadoc,jar包下载,依赖包
qt-embedded-2.3.1.tar.gz
qt-embedded-2.3.4qt-embedded-2.3.4qt-embedded-2.3.4qt-embedded-2.3.4
qt-embedded-2.3.10-free.tar.gz经过测试,压缩包完整
qt-embedded-linux-opensource-src-4.5.3.tar.gz 移植
Qt-Embedded编程实战.rar
qt-embedded-linux-opensource-src-4.5.2.tar.gz.part1(第二部分)
qt-embedded-2.3.7qt-embedded-2.3.7qt-embedded-2.3.7
Qt-Embedded编程实战 基础QTE Qt-...Qt-Embedded编程实战 基础QTE Qt-Embedded编程实战 基础QTEQt-Embedded编程实战 基础QTE Qt-Embedded编程实战 基础QTE Qt-Embedded编程实战 基础QTEQt-Embedded编程实战 基础QTE
qt-embedded-free-3.3.8
qt-embedded-linux-opensource-src-4.5.3.tar.part3
qt-embedded-2.3.2qt-embedded-2.3.2qt-embedded-2.3.2qt-embedded-2.3.2