天道酬勤,学无止境

tilelist

Flex: Why are TileList images disappearing on drag?

Question 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)

2022-02-17 08:06:02    分类:技术分享    actionscript-3   apache-flex   drag-and-drop   tilelist

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

Question 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? Answer1 Define a new layout that lays the tiles out the way you want

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

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

Question 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

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

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

Question 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

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