Browse Subversion Repository
Diff of /NNDDv2/trunk/src/org/mineap/nndd/view/VideoInfoView.as
Parent Directory
| Revision Log
| Patch
| 1313 |
} |
} |
| 1314 |
|
|
| 1315 |
/** |
/** |
| 1316 |
|
* プレイリストをシャッフルします |
| 1317 |
|
* |
| 1318 |
|
* @details edvakf氏のソースをマージ |
| 1319 |
|
* @see https://github.com/edvakf/NNDDMOD/commit/6984ba8919727a98c249e1bc8a4848705de27df5 |
| 1320 |
|
*/ |
| 1321 |
|
public function shufflePlayList():void{ |
| 1322 |
|
var tempArrayCollection:ArrayCollection = new ArrayCollection(); |
| 1323 |
|
for each(var object:Object in playListProvider){ |
| 1324 |
|
tempArrayCollection.addItem(object); |
| 1325 |
|
} |
| 1326 |
|
var i:int = tempArrayCollection.length; |
| 1327 |
|
while (--i) { |
| 1328 |
|
var j:int = Math.floor( Math.random() * (i + 1) ); |
| 1329 |
|
if (i == j) { |
| 1330 |
|
continue; |
| 1331 |
|
} |
| 1332 |
|
var object:Object = tempArrayCollection.getItemAt(i); |
| 1333 |
|
tempArrayCollection.setItemAt( tempArrayCollection.getItemAt(j), i ); |
| 1334 |
|
tempArrayCollection.setItemAt( object, j ); |
| 1335 |
|
} |
| 1336 |
|
playListProvider = tempArrayCollection; |
| 1337 |
|
} |
| 1338 |
|
|
| 1339 |
|
/** |
| 1340 |
* |
* |
| 1341 |
* @param index |
* @param index |
| 1342 |
* @return |
* @return |
| 1417 |
resetPlayList(); |
resetPlayList(); |
| 1418 |
} |
} |
| 1419 |
|
|
| 1420 |
|
public function playListShuffleButtonClicked(event:MouseEvent):void{ |
| 1421 |
|
shufflePlayList(); |
| 1422 |
|
} |
| 1423 |
|
|
| 1424 |
/** |
/** |
| 1425 |
* |
* |
| 1426 |
* @param event |
* @param event |
|
|
Legend:
| Removed from v.439 |
|
| changed lines |
| |
Added in v.476 |
|
|
|