This is sarma,
I am write on .as file it contain override
methods like this
package
{
import mx.controls.Alert;
import mx.controls.Tree;
import mx.core.mx_internal;
import mx.events.DragEvent;
use namespace mx_internal;
public class TreeEx extends Tree
{
public function TreeEx() {
super();
}
override public function get firstVisibleItem():Object {
return (listItems.length > 0 && listItems[0].lenght >
0) ?
super.firstVisibleItem : null;
}
override public function calculateDropIndex
(event:DragEvent=null):int
{
super.calculateDropIndex(event);
if (isDroppingOnNode() && listItems[_dropData.rowIndex -
verticalScrollPosition][0])
{
index references.
var itemInd:int = _dropData.rowIndex -
verticalScrollPosition;
if ( itemInd < listItems.length && itemInd >= 0
&& listItems
[itemInd].length > 0 )
{
_dropData.parent =
listItems[itemInd][0].data;
}
else
{
_dropData.parent = null;
}
// Always drop the item as the first child
_dropData.index = 0;
}
return _dropData.rowIndex;
}
override public function showDropFeedback(event:DragEvent):void
{
calculateDropIndex(event);
if (isDroppingOnNode())
{
// We're on the node so highlight it.
showNodeDropFeedback(_dropData.rowIndex);
super.hideDropFeedback(event);
}
else
{
// We're in between nodes, so use standard drop
feedback.
super.showDropFeedback(event);
hideNodeDropFeedback(_dropData.rowIndex);
}
}
override public function hideDropFeedback(event:DragEvent):void
{
super.hideDropFeedback(event);
hideNodeDropFeedback(_dropData.rowIndex);
}
protected function showNodeDropFeedback(rowIndex:int):void
{
var index:int = rowIndex - verticalScrollPosition;
// Check for boundary conditions before drawing the
highlight.
if (index >= listItems.length ||
listItems[index].length == 0)
return;
// We're just highlighting the cell.
drawItem(listItems[index][0], false, true, false,
false);
}
protected function hideNodeDropFeedback(rowIndex:int):void
{
var index:int = rowIndex - verticalScrollPosition;
if (listItems[index] && listItems[index].length > 0)
clearHighlight
(listItems[index][0]);
if (index > 0 && listItems[index - 1].length > 0)
clearHighlight
(listItems[index - 1][0]);
}
protected function isDroppingOnNode():Boolean
{
return _dropData.localY >= rowInfo[_dropData.rowIndex -
verticalScrollPosition].y + 0.5 * _dropData.rowHeight
}
override protected function dragDropHandler(event:DragEvent):void
{
calculateDropIndex(event);
super.dragDropHandler(event);
}
}
}
is possible to convert an mxml script methods. pls hell me...
Thanks to all............
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---