[flexcoders] Re: Animated dashed lines
--- In flexcoders@yahoogroups.com, "havardfl" <[EMAIL PROTECTED]> wrote: > > In a project I'm working on I would like to represent data flowing > through the system with dashed/dotted lines moving between two or more > points. > > I've done one implementation using the lineGradientStyle function to > create dashes. This works, but I'm not pleased with the CPU load while > the script is running. I'd like to draw 100+ lines, and my method of > doing it isn't cutting it. > > Does anyone know a great way of drawing animated dashed/dotted lines > without using much CPU time? > This is my implementation btw: static public function DrawStippledShape2(g:Graphics, points:Array, pattern:Array=null, alphas:Array=null, colors:Array=null, thicknesses:Array=null, offset:Number=0):void { g.moveTo(points[0].x, points[0].y); var pat2:Array = []; var patsum:Number = 0; for each (var p:Number in pattern){ patsum += p; } for (var i:int = 0 ; i < pattern.length ; i++){ pat2[i] = pattern[i] / patsum * 255; } for (var i:int = 1 ; i
[flexcoders] Animated dashed lines
In a project I'm working on I would like to represent data flowing through the system with dashed/dotted lines moving between two or more points. I've done one implementation using the lineGradientStyle function to create dashes. This works, but I'm not pleased with the CPU load while the script is running. I'd like to draw 100+ lines, and my method of doing it isn't cutting it. Does anyone know a great way of drawing animated dashed/dotted lines without using much CPU time?
[flexcoders] Re: DataGrid ItemEditor being closed when other component is updated
Tried setting a constant width and height to the datagrid and the list. Tried placing list and datagrid in separate boxes, each with a fixed height an width. Didn't make a difference. Does anyone have any other ideas? --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > If the DG thinks it needs to be re-layed out, it will close its session. > > > > Try locking the width/height of the List. It might stop it from > invalidating the parent container. Wrapping the List in another > container might work as well. > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of havardfl > Sent: Tuesday, June 05, 2007 6:38 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] DataGrid ItemEditor being closed when other > component is updated > > > > I'm having some trouble with an editable DataGrid... I have one > DataGrid that is editable, and then a List that is not. > > The List is bound to an XMLListCollection (Same thing happens > ArrayCollection), which gets items added to it constantly. > > Now, when I click one of the columns in the editable DataGrid, the > itemeditor gets opened, but is closed the moment the second DataGrid > is updated... (If I use a DataGrid instead of a List as the second > item, the closing of the ItemEditor only seems to happen once the > second DataGrid has enough items to create a ScrollBar). > > Has anyone else experienced this, and does anyone know of a solution? > > Example Code: > > http://www.adobe.com/2006/mxml > <http://www.adobe.com/2006/mxml> " > layout="vertical" creationComplete="onCreated(event)" xmlns:local="*"> > > > > > > > > > > > >
[flexcoders] DataGrid ItemEditor being closed when other component is updated
I'm having some trouble with an editable DataGrid... I have one DataGrid that is editable, and then a List that is not. The List is bound to an XMLListCollection (Same thing happens ArrayCollection), which gets items added to it constantly. Now, when I click one of the columns in the editable DataGrid, the itemeditor gets opened, but is closed the moment the second DataGrid is updated... (If I use a DataGrid instead of a List as the second item, the closing of the ItemEditor only seems to happen once the second DataGrid has enough items to create a ScrollBar). Has anyone else experienced this, and does anyone know of a solution? Example Code: http://www.adobe.com/2006/mxml"; layout="vertical" creationComplete="onCreated(event)" xmlns:local="*">
[flexcoders] Visibility of components
I have an application where several different components in different containers spread around the application should be bound to external data. These bindings need to know when the component is actually on-screen to know when to start fetching data. What is the easiest way of doing this, that is determine whether a series of components are on-screen?
[flexcoders] TileList showing wrong data after using removeItemAt when scrolled
I have a rather strange error occuring, which to me seems like a bug with the TileList... I have a small application with a TileList and a Button. The Tilelist has an XMLListCollection as a dataprovider. On Initialization I add 100 entries to the collection. They all come up nicely in the TileList. I then scroll to the bottom of the tillist and click the button. The button calls removeItemAt on 5 items in a part of the collection that is not visible. When I then scroll up, the items I deleted are gone from the TileList as they should, but so are some of the first items in the collection. If I print the contents of the collection, the first items are still there, but they aren't shown in the TileList... If I run the excact same code, but keep the items to be removed visible when I click the button, it all works fine.