Develop and Download Open Source Software

Browse Subversion Repository

Diff of /NNDDv2/trunk/src/org/mineap/nndd/view/VideoInfoView.as

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 439 by mineap, Sat Jan 15 08:15:06 2011 UTC revision 476 by mineap, Sun Mar 20 06:53:20 2011 UTC
# Line 1313  public function resetPlayList():void{ Line 1313  public function resetPlayList():void{
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
# Line 1393  public function playListClearButtonClick Line 1417  public function playListClearButtonClick
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

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26