加载图像形成缩略图画廊散装 [英] BULK of Images Loading to form a Thumbnail Gallery
问题描述
我想实现一个图片库,其中图像缩略图显示,每当我选择图像的某一文件夹中。
例如,如果我是点击文件夹中,它会加载所有的图像转换成一个数组列表将在我的列表中设置为dataProvider中用于创建tilelayout。
但我意识到,如果我有500张图片,每当我向下滚动,在滚动型我,这一种滞后。
有什么办法,其中会先加载所有我的图片,显示过吗? 或者有什么办法让它少laggy
< S:列表ID =清单includeIn =initialScreen,thumbnailStateX =372Y =25WIDTH =600
高度=750的dataProvider ={}图像列表
的itemRenderer =spark.skins.spark.DefaultComplexItemRenderer
click.thumbnailState =list_clickHandler(事件)>
< S:布局>
< S:TileLayout horizontalGap =15方向=行的verticalGap =15/>
< / S:布局>
< / S:列表>
Greensock都有一个称为梦幻般的新型装载机类 LoaderMax 。它类似于BulkLoader或QueueLoader,但提供了更多的选择,更好的性能和更小的文件大小。采取在看看他们的例子在该页面。它确实你在寻找什么。
I am trying to achieve a Photo gallery where images are showed in thumbnails whenever i select a certain folder of images.
For example, if i were to click on the folder A, it will load all the images into a arraylist which will be set as the dataProvider for in my List to create the tilelayout.
But i realized that, if i have 500 images, and whenever i scroll down on my scrollview, it kind of lags.
Is there any way where it will load all my images first, before displaying? Or any way to make it less laggy
<s:List id="list" includeIn="initialScreen,thumbnailState" x="372" y="25" width="600"
height="750" dataProvider="{imageList}"
itemRenderer="spark.skins.spark.DefaultComplexItemRenderer"
click.thumbnailState="list_clickHandler(event)">
<s:layout>
<s:TileLayout horizontalGap="15" orientation="rows" verticalGap="15"/>
</s:layout>
</s:List>
Greensock has a fantastic new loader class called LoaderMax. It's similar to BulkLoader or QueueLoader, but offers a lot more options, better performance, and a smaller filesize. Take at look at their examples on that page. It does exactly what you're looking for.
这篇关于加载图像形成缩略图画廊散装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!