TileList 的功能
来源:互联网 发布:单片机 tcp 可靠性 编辑:程序博客网 时间:2024/05/29 15:13
main.mxml
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Style>
global {
modal-transparency: 0.9;
modal-transparency-color: white;
modal-transparency-blur: 9;
}
</mx:Style>
<mx:Script>
<![CDATA[
import mx.effects.Resize;
import mx.events.ResizeEvent;
import mx.events.ListEvent;
import mx.controls.Image;
import mx.events.ItemClickEvent;
import mx.managers.PopUpManager;
private var img:Image;
private function tileList_itemClick(evt:ListEvent):void {
img = new Image();
// img.width = 300;
// img.height = 300;
img.maintainAspectRatio = true;
img.addEventListener(Event.COMPLETE, image_complete);
img.addEventListener(ResizeEvent.RESIZE, image_resize);
img.addEventListener(MouseEvent.CLICK, image_click);
img.source = evt.itemRenderer.data.@fullImage;
img.setStyle("addedEffect", image_addedEffect);
img.setStyle("removedEffect", image_removedEffect);
PopUpManager.addPopUp(img, this, true);
}
private function image_click(evt:MouseEvent):void {
PopUpManager.removePopUp(evt.currentTarget as Image);
}
private function image_resize(evt:ResizeEvent):void {
PopUpManager.centerPopUp(evt.currentTarget as Image);
}
private function image_complete(evt:Event):void {
PopUpManager.centerPopUp(evt.currentTarget as Image);
}
]]>
</mx:Script>
<mx:WipeDown id="image_addedEffect" startDelay="100" />
<mx:Parallel id="image_removedEffect">
<mx:Zoom />
<mx:Fade />
</mx:Parallel>
<mx:XML id="xml" source="gallery.xml" />
<mx:XMLListCollection id="xmlListColl" source="{xml.image}" />
<mx:TileList id="tileList"
dataProvider="{xmlListColl}"
itemRenderer="CustomItemRenderer"
columnCount="4"
columnWidth="125"
rowCount="2"
rowHeight="100"
themeColor="haloSilver"
verticalScrollPolicy="on"
itemClick="tileList_itemClick(event);" />
</mx:Application>
----------------------------------------------------------------------------------------------
CustomItemRenderer.mxml
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/ -->
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
horizontalAlign="center"
verticalAlign="middle">
<mx:Image source="{data.@thumbnailImage}" width="60" height="60" />
<mx:Label text="{data.@title}" />
</mx:VBox>
-----------------------------------------------------------------------------------------------
gallery.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/ -->
<gallery>
<image title="Flex"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/fx_appicon.jpg" />
<image title="Flash"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/maomao.jpg" />
<image title="Illustrator"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/ai_appicon.jpg" />
<image title="Dreamweaver"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/maomao.jpg" />
<image title="ColdFusion"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/maomao.jpg" />
<image title="Flash Player"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/maomao.jpg" />
<image title="Fireworks"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/maomao.jpg" />
<image title="Lightroom"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/maomao.jpg" />
<image title="Photoshop"
thumbnailImage="assets/maomao.jpg"
fullImage="assets/maomao.jpg" />
</gallery>
- TileList 的功能
- Flex可框選的TileList
- TileList
- tileList
- Flex3中TileList的对象操作
- 使用TileList+TitleWindow组件开发聊天表情功能
- 使用TileList+TitleWindow组件开发聊天表情功能
- 【转载TICORE-注释】Flex 3 - 實作滑鼠可圈選的 TileList V3
- flex list/tilelist drag scroll的speed移动太快
- TileList设置显示数据的行间距和列间距
- [ActionScript 3] 组件List与TileList的区别.
- 自定义TileList
- ActionScript TileList
- FLEX学习笔记:TileList点击到不同的部分,返回的event.target类型
- flex 中 tileList 控件在dataProvider内容更换时,不能选中的解决方案
- Flex中如何创建一个具有良好排序效果的TileList
- flash笔记之解决TileList滚屏里面的值错位情况
- Flex中如何利用Bitmap和BitmapData类复制图片到一个TileList控件的例子
- CentOS5.6 挂载 NTFS
- 系统集成项目管理工程师-变更管理笔记
- ecshop jquery冲突解决方法
- 关于#include "stdafx.h
- Linux下通用线程池的创建与使用
- TileList 的功能
- 开始做个小站
- document.execCommand()的用法小记
- String中intern的方法
- linux——时间编程
- 双buffer与单buffer
- 2011.09.14
- 2011-10-10
- UML状态图(Statechart Diagram)