| 1521 |
* @see https://github.com/edvakf/NNDDMOD/commit/6984ba8919727a98c249e1bc8a4848705de27df5 |
* @see https://github.com/edvakf/NNDDMOD/commit/6984ba8919727a98c249e1bc8a4848705de27df5 |
| 1522 |
*/ |
*/ |
| 1523 |
public function shufflePlayList():void{ |
public function shufflePlayList():void{ |
| 1524 |
|
|
| 1525 |
|
var selectedObject:Object = null; |
| 1526 |
|
if (dataGrid_playList != null) |
| 1527 |
|
{ |
| 1528 |
|
selectedObject = dataGrid_playList.selectedItem; |
| 1529 |
|
} |
| 1530 |
|
|
| 1531 |
var tempArrayCollection:ArrayCollection = new ArrayCollection(); |
var tempArrayCollection:ArrayCollection = new ArrayCollection(); |
| 1532 |
for each(var object:Object in playListProvider){ |
for each(var object:Object in playListProvider){ |
| 1533 |
tempArrayCollection.addItem(object); |
tempArrayCollection.addItem(object); |
| 1543 |
tempArrayCollection.setItemAt( object, j ); |
tempArrayCollection.setItemAt( object, j ); |
| 1544 |
} |
} |
| 1545 |
playListProvider = tempArrayCollection; |
playListProvider = tempArrayCollection; |
| 1546 |
|
|
| 1547 |
|
if (dataGrid_playList != null && selectedObject != null) |
| 1548 |
|
{ |
| 1549 |
|
dataGrid_playList.selectedItem = selectedObject; |
| 1550 |
|
} |
| 1551 |
} |
} |
| 1552 |
|
|
| 1553 |
/** |
/** |
| 1862 |
private function playListReverseButtonClicked(event:Event):void{ |
private function playListReverseButtonClicked(event:Event):void{ |
| 1863 |
var tempArrayCollection:ArrayCollection = new ArrayCollection(); |
var tempArrayCollection:ArrayCollection = new ArrayCollection(); |
| 1864 |
|
|
| 1865 |
|
var newIndex:int = -1; |
| 1866 |
|
if (dataGrid_playList != null) |
| 1867 |
|
{ |
| 1868 |
|
var selectedIndex:int = dataGrid_playList.selectedIndex; |
| 1869 |
|
if (selectedIndex != -1) |
| 1870 |
|
{ |
| 1871 |
|
newIndex = (playListProvider.length-1) - selectedIndex; |
| 1872 |
|
} |
| 1873 |
|
} |
| 1874 |
|
|
| 1875 |
for each(var object:Object in playListProvider){ |
for each(var object:Object in playListProvider){ |
| 1876 |
tempArrayCollection.addItemAt(object, 0); |
tempArrayCollection.addItemAt(object, 0); |
| 1877 |
} |
} |
| 1878 |
|
|
| 1879 |
playListProvider = tempArrayCollection; |
playListProvider = tempArrayCollection; |
| 1880 |
|
|
| 1881 |
|
if (dataGrid_playList != null && newIndex != -1) |
| 1882 |
|
{ |
| 1883 |
|
dataGrid_playList.selectedIndex = newIndex; |
| 1884 |
|
} |
| 1885 |
} |
} |
| 1886 |
|
|
| 1887 |
public function get playList():PlayList{ |
public function get playList():PlayList{ |