actionscript 3 - Flex ItemRenderer: rendering the source item of a drag -


when item being dragged from/within list in default implementation, shown selected during drag (and separate item renderer, in dragging state, shown drag image), so:

<s:itemrenderer>     <s:label text="{data}" color.selected="0xff0000" color.dragging="0x00ff00" /> </s:itemrenderer> 

renders as:

listitemrenderer in normal, selected, , dragging states

is there straightforward way change state of source of drag (the red, selected, "bar") other "selected" duration of drag?

in ideal, add color.dragsource="0x0000ff" item renderer code above, , "bar" red while selected, blue once dragging had begun. when drag complete, revert red (or, if no longer selected, black).

what if did eventlistener on drag start set selected item in list -1? -1 says nothing should selected.

edit: added below code support:

<s:list id="mylist" dragstart="startdrag(event)"/>  private var dragindex:int;  private function startdrag(e:event):void {     dragindex = mylist.selectedindex;     mylist.selectedindex = -1; }  private function stopdrag(e:event):void {     mylist.selectedindex = dragindex; } 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -