天道酬勤,学无止境

tilelist

Flex: Why are TileList images disappearing on drag?

I'm developing a Flex Air (desktop) application that loads images from the local filesystem into a TileList. The user will then be able to drag (copy) these images out of the list onto another control. I've finally got the images showing up correctly (and not disappearing after scrolling the TileList) but they seem to disappear from the TileList at the start of a drag operation. I come from a .NET background and am just learning AS3/Flex, so if you see me using any anti-patterns here, feel free to point them out! Sample code follows (I've tried to make this as minimal as possible). Test.mxml:

2022-02-17 06:24:34    分类:问答    actionscript-3   apache-flex   drag-and-drop   tilelist

如何制作顶部有锯齿边缘的 TileGroup 布局?(how do I make a TileGroup layout that has the jaggy edge on top?)

问题 我有包含按钮的 spark.components.TileGroup。 我希望按钮在它们提供的 ViewStack 顶部显示为选项卡 目前,如果我在 TileList 中有 6 个项目,它会将其布置为 2 行,顶部有 4 个项目,底部有 2 个项目,因此锯齿状边缘位于底部 [ITEM 1][ITEM 2][ITEM 3][ITEM 4] [ITEM 5][ITEM 6] 我希望它看起来像这样,锯齿边缘在上面 [ITEM 5][ITEM 6] [ITEM 1][ITEM 2][ITEM 3][ITEM 4] 项目的顺序并不重要 我该怎么做? 回答1 定义一个新布局,以您想要的方式布置图块。 一些让您入门的链接。 http://www.adobe.com/devnet/flex/articles/spark_layouts.html http://insideria.com/2009/05/flex-4-custom-layouts.html

2021-12-21 20:31:20    分类:技术分享    apache-flex   flex4   tilelist   gumbo

how do I make a TileGroup layout that has the jaggy edge on top?

I have spark.components.TileGroup that contains buttons. I would like the buttons to appear like tabs on top of the ViewStack they serve At the moment, if I have 6 items in the TileList it lays it out as 2 rows with 4 items in the top tow and 2 in the bottom, so the jaggy edge is at the bottom [ITEM 1][ITEM 2][ITEM 3][ITEM 4] [ITEM 5][ITEM 6] I would like it to look like this, with the jaggy edge on top [ITEM 5][ITEM 6] [ITEM 1][ITEM 2][ITEM 3][ITEM 4] The order of the items is not important How would I do this?

2021-11-26 18:05:14    分类:问答    apache-flex   flex4   tilelist   gumbo

在 Flash CS5 上使用 PHP 和 XML 将图像从 Mysql 加载到 TileList(Load images to a TileList from Mysql using PHP and XML on Flash CS5)

问题 我有一个 mysql 数据库,其中包含一个包含图像路径的表。 我想将所有图像加载到 TileList。 现在我在 PHP 中有这个: <?PHP mysql_connect("localhost", "root", "root"); mysql_select_db("prototipo"); $result = mysql_query("select entretenimiento_id, e_nombre, e_imagen from entretenimiento"); echo "<?xml version=\"1.0\" ?><entretenimiento>"; while($row = mysql_fetch_assoc($result)) { echo "<e_nombre>" . $row["e_nombre"] . "</e_nombre>"; echo "<e_imagen>" . $row["e_imagen"] . "</e_imagen>"; } echo "</entretenimiento>"; ?> 这应该为我获取图像的路径,名称,因此它出现在显示图像的图块的标签上,并为我带来 ID,以便我可以在单击该图像时启动另一个查询。 所有这些都设置为动态创建的 XML。 现在我的问题......我如何加载这个??? AS3怎么办?? 我已经有

2021-10-31 06:05:11    分类:技术分享    php   flash   actionscript-3   flash-cs5   tilelist

更改数据提供程序时如何处理来自 Flash tilelist 的 Unhandled #2044 错误?(How to handle Unhandled #2044 errors from Flash tilelist when changing dataprovider?)

问题 我有一个使用基于 ImageCell 的自定义项渲染器的 tilelist 组件。 我知道有时无法找到它试图检索的某些图像,我能够通过自定义 ImageCell 加载器上的 IEOrror 侦听器来处理此问题。 但是,如果我设置了数据提供程序,那么在所有图像完成加载或错误过程之前它会被更改,Flash 调试播放器会在 firefox 中抛出一个未处理的 #2044 错误,指出无法找到图像。 在带有调试播放器的歌剧中,它会抛出 #2044 说明加载从未完成。 我找不到捕获和忽略这些错误的方法,因此它们不会抛出调试器播放器对话框。 此外,当使用 Flash Builder IDE 进行调试时,调试器根本不会因这些错误而中断 - 它仅在播放器中,而我能够毫无问题地中断其他错误。 当数据提供程序更改时,就好像错误侦听器正在被处理,但加载程序继续并抛出未处理的 #2044。 关于如何有效处理的任何想法? 提前感谢您的时间和帮助 - 乙 回答1 在自定义单元渲染器的构造函数中,您需要向受保护的加载程序实例添加一个事件侦听器并处理 IOError。 下面是一个例子: package { import fl.controls.listClasses.ICellRenderer; import fl.controls.listClasses.ImageCell; import fl

2021-09-28 23:59:01    分类:技术分享    flash   actionscript-3   tilelist   ioerror   flash-v3-components

Load images to a TileList from Mysql using PHP and XML on Flash CS5

I have a mysql database with a table containing PATH's to images. I want to load al the images to a TileList. Now i have this in PHP: <?PHP mysql_connect("localhost", "root", "root"); mysql_select_db("prototipo"); $result = mysql_query("select entretenimiento_id, e_nombre, e_imagen from entretenimiento"); echo "<?xml version=\"1.0\" ?><entretenimiento>"; while($row = mysql_fetch_assoc($result)) { echo "<e_nombre>" . $row["e_nombre"] . "</e_nombre>"; echo "<e_imagen>" . $row["e_imagen"] . "</e_imagen>"; } echo "</entretenimiento>"; ?> This is supposed to fetch me the PATH of the image, the name

2021-09-01 10:30:27    分类:问答    php   flash   actionscript-3   flash-cs5   tilelist

How to handle Unhandled #2044 errors from Flash tilelist when changing dataprovider?

I have a tilelist component using a custom ImageCell based item renderer. I know that at times some of the images it is trying to retrieve will not be found and I am able to handle this via an IEOrror listener on the custom ImageCell loader. However, if I set the data provider, then it is changed before all images have completed their loading or error process, the flash debug player throws up an unhandled #2044 error in firefox stating that an image could not be found. In opera with the debug player it throws a #2044 stating that a load never completed. I can't find a way to trap and ignore

2021-07-03 18:35:58    分类:问答    flash   actionscript-3   tilelist   ioerror   flash-v3-components