Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 817 - (hide annotations) (download)
Wed May 2 12:27:43 2012 UTC (11 years, 11 months ago) by mineap
File size: 59040 byte(s)
「古いバージョンの動画サイズを使う」チェックボックスの設定がPlayerのサイズ設定に反映されないことがある問題を修正
1 mineap 370 /**
2     * VideoInfoView.as
3     *
4     * Copyright (c) 2008-2009 MAP - MineApplicationProject. All Rights Reserved.
5     *
6     * @author shiraminekeisuke
7     *
8     */
9    
10 mineap 628 import flash.display.StageDisplayState;
11 mineap 498 import flash.display.StageQuality;
12 mineap 370 import flash.events.Event;
13     import flash.events.MouseEvent;
14     import flash.events.NativeWindowBoundsEvent;
15     import flash.events.TextEvent;
16     import flash.geom.Rectangle;
17 mineap 498 import flash.sampler.getInvocationCount;
18 mineap 370 import flash.utils.Timer;
19    
20     import mx.collections.ArrayCollection;
21     import mx.collections.Sort;
22     import mx.collections.SortField;
23     import mx.controls.Alert;
24     import mx.controls.CheckBox;
25 mineap 628 import mx.controls.ComboBox;
26 mineap 370 import mx.controls.DataGrid;
27     import mx.controls.HSlider;
28     import mx.controls.RadioButton;
29     import mx.core.Application;
30     import mx.core.DragSource;
31 mineap 498 import mx.core.FlexGlobals;
32 mineap 526 import mx.core.Window;
33 mineap 370 import mx.events.AIREvent;
34     import mx.events.CloseEvent;
35     import mx.events.DataGridEvent;
36     import mx.events.DragEvent;
37     import mx.events.FlexEvent;
38     import mx.events.ListEvent;
39 mineap 507 import mx.events.NumericStepperEvent;
40 mineap 370 import mx.events.SliderEvent;
41    
42 mineap 439 import org.mineap.nicovideo4as.model.SearchType;
43 mineap 370 import org.mineap.nndd.LogManager;
44     import org.mineap.nndd.Message;
45     import org.mineap.nndd.model.NNDDVideo;
46     import org.mineap.nndd.model.PlayList;
47     import org.mineap.nndd.model.SearchItem;
48     import org.mineap.nndd.model.SearchSortString;
49     import org.mineap.nndd.playList.PlayListManager;
50     import org.mineap.nndd.player.PlayerController;
51 mineap 628 import org.mineap.nndd.util.DataGridColumnWidthUtil;
52 mineap 370 import org.mineap.nndd.util.PathMaker;
53     import org.mineap.util.config.ConfUtil;
54     import org.mineap.util.config.ConfigManager;
55 mineap 628 import org.mineap.util.font.FontUtil;
56 mineap 370
57     private var videoPlayer:VideoPlayer;
58     private var playerController:PlayerController;
59     private var logManager:LogManager;
60    
61     public var isPlayListRepeat:Boolean = false;
62     public var isSyncComment:Boolean = true;
63     public var isPlayerFollow:Boolean = true;
64     public var isRenewCommentEachPlay:Boolean = false;
65     public var isRenewOtherCommentWithCommentEachPlay:Boolean = false;
66     public var isResizePlayerEachPlay:Boolean = true;
67     public var isHideUnderController:Boolean = false;
68     public var commentScale:Number = 1.0;
69     public var fps:Number = 15;
70     public var isShowOnlyPermissionComment:Boolean = false;
71 mineap 507 public var showCommentCountPerMin:int = 50;
72     public var showOwnerCommentCountPerMin:int = 50;
73 mineap 370 public var showCommentSec:int = 3;
74     public var isAntiAlias:Boolean = true;
75     public var commentAlpha:int = 100;
76     public var isEnableJump:Boolean = true;
77     public var isAskToUserOnJump:Boolean = true;
78     public var isInfoViewAlwaysFront:Boolean = false;
79     public var isCommentFontBold:Boolean = true;
80     public var isShowAlwaysNicowariArea:Boolean = false;
81     public var selectedResizeType:int = RESIZE_TYPE_NICO;
82     public var isAlwaysEconomyForStreaming:Boolean = false;
83     public var isHideTagArea:Boolean = false;
84     public var isAppendComment:Boolean = false;
85     public var isHideSekaShinComment:Boolean = false;
86     public var isShowHTMLOwnerComment:Boolean = true;
87     public var isEnableWideMode:Boolean = true;
88 mineap 799 public var useOldVersionVideoSize:Boolean = false;
89 mineap 370 public var relationSortIndex:int = 0;
90     public var relationOrderIndex:int = 0;
91     public var isNgUpEnable:Boolean = true;
92 mineap 487 public var isSmoothing:Boolean = true;
93 mineap 529 public var isSmoothingOnlyNotPixelIdenticalDimensions:Boolean = true;
94 mineap 498 public var playerQuality:int = 2;
95 mineap 526 public var isFollowInfoViewHeight:Boolean = false;
96 mineap 605 public var isNotPlayNicowari:Boolean = false;
97 mineap 711 public var isOpenFileDialogWhenOpenPlayer:Boolean = false;
98 mineap 370
99     public static const RESIZE_TYPE_NICO:int = 1;
100     public static const RESIZE_TYPE_VIDEO:int = 2;
101    
102     public var videoUrlMap:Object = new Object();
103    
104     public var myListMap:Object = new Object();
105    
106     private var lastRect:Rectangle = new Rectangle();
107    
108     private var seekTimer:Timer;
109     private var seekValue:Number = 0;
110    
111     public var isActive:Boolean = false;
112    
113     public var playListName:String = "";
114    
115     [Bindable]
116     public var commentListProvider:ArrayCollection = new ArrayCollection();
117     [Bindable]
118     public var ownerCommentProvider:ArrayCollection = new ArrayCollection();
119     [Bindable]
120     private var playListProvider:ArrayCollection = new ArrayCollection();
121     [Bindable]
122     public var localTagProvider:Array = new Array();
123     [Bindable]
124     public var nicoTagProvider:Array = new Array();
125     [Bindable]
126     public var ichibaLocalProvider:ArrayCollection = new ArrayCollection();
127     [Bindable]
128     public var ichibaNicoProvider:ArrayCollection = new ArrayCollection();
129     [Bindable]
130     public var ngListProvider:ArrayCollection = new ArrayCollection();
131     [Bindable]
132     public var owner_text_nico:String = "";
133     [Bindable]
134     public var owner_text_local:String = "";
135     [Bindable]
136     private var myListDataProvider:Array = new Array();
137     [Bindable]
138     public var savedCommentListProvider:Array = new Array();
139     [Bindable]
140     public var owner_text_temp:String = "";
141     [Bindable]
142     public var relationDataProvider:ArrayCollection = new ArrayCollection();
143     [Bindable]
144     public var relationSortComboboxDataProvider:Array = new Array("���������������", "���������������", "���������", "���������");
145     [Bindable]
146     public var relationOrderComboboxDataProvider:Array = new Array("������", "������");
147     [Bindable]
148     private var label_playListTitle_dataProvider:String = "";
149 mineap 484 [Bindable]
150     public var videoType:String = "";
151     [Bindable]
152     public var connectionType:String = "";
153     [Bindable]
154     public var videoServerUrl:String = "";
155     [Bindable]
156     public var messageServerUrl:String = "";
157 mineap 490 [Bindable]
158     public var economyMode:String = "";
159     [Bindable]
160     public var nickName:String = "";
161     [Bindable]
162     public var isPremium:String = "";
163     [Bindable]
164     public var pubUserNameIconUrl:String = "";
165     [Bindalbe]
166     public var pubUserName:String = "";
167     [Bindalbe]
168     public var pubUserLinkButtonText:String = "";
169 mineap 796 [Bindable]
170     public var currentWindowSize:String = "";
171     [Bindable]
172     public var format:String = "";
173     [Bindable]
174     public var videoSize:String = "";
175 mineap 370
176     public function init(playerController:PlayerController, videoPlayer:VideoPlayer, logManager:LogManager):void{
177     this.videoPlayer = videoPlayer;
178     this.playerController = playerController;
179     this.logManager = logManager;
180    
181     this.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
182     stage.addEventListener(AIREvent.WINDOW_ACTIVATE, function(event:AIREvent):void{
183     isActive = true;
184     });
185     stage.addEventListener(AIREvent.WINDOW_DEACTIVATE, function(event:AIREvent):void{
186     isActive = false;
187     });
188     });
189    
190     readStore();
191     }
192    
193     public function resetInfo():void{
194     localTagProvider = new Array();
195     nicoTagProvider = new Array();
196     ichibaLocalProvider = new ArrayCollection();
197     ichibaNicoProvider = new ArrayCollection();
198    
199     owner_text_local = "";
200     owner_text_nico = "";
201     owner_text_temp = "";
202     }
203    
204     private function windowClosing(event:Event):void{
205    
206     event.preventDefault();
207    
208     // if(this.videoPlayer != null && !this.videoPlayer.closed){
209     // this.videoPlayer.close();
210     // }
211     //
212     // this.playerController.destructor();
213    
214     this.visible = false;
215    
216     }
217    
218     private function play():void{
219     this.playerController.play();
220     }
221    
222     private function stop():void{
223     this.playerController.stop();
224     }
225    
226     private function checkBoxAppendCommentChanged(event:Event):void{
227     this.isAppendComment = event.target.selected;
228 mineap 529 FlexGlobals.topLevelApplication.setAppendComment(this.isAppendComment);
229 mineap 370 }
230    
231     public function setAppendComment(boolean:Boolean):void{
232     this.isAppendComment = boolean;
233     if(checkBox_isAppendComment != null){
234     checkBox_isAppendComment.selected = boolean;
235     }
236     }
237    
238     public function relationItemDoubleClickHandler(event:ListEvent):void{
239     if(relationDataProvider.length > event.rowIndex){
240     var url:String = relationDataProvider[event.rowIndex].col_link;
241     if(url != null && url.length > 0){
242     var videoId:String = PathMaker.getVideoID(url);
243     if(videoId != null){
244     playerController.playMovie(url);
245     }
246     }
247     }
248     }
249    
250     public function checkBoxNgUpChanged(event:Event):void{
251     this.isNgUpEnable = checkBox_isNgUpEnable.selected;
252     if(this.playerController != null){
253     this.playerController.reloadLocalComment();
254     }
255     }
256    
257 mineap 796 public function checkBoxIsLengthwisePreferredChanged(event:Event):void
258     {
259     var checkBox:CheckBox = (event.currentTarget as CheckBox);
260    
261     if (checkBox.selected)
262     {
263     ConfigManager.getInstance().setItem("isLengthwisePreferred", "true");
264     }
265     else
266     {
267     ConfigManager.getInstance().setItem("isLengthwisePreferred", "false");
268     }
269 mineap 797
270     this.playerController.isLengthwisePreferred = checkBox.selected;
271    
272 mineap 796 ConfigManager.getInstance().save();
273     }
274    
275 mineap 487 public function checkBoxSmoothingChanged(event:Event):void{
276     this.isSmoothing = checkBox_isSmoothing.selected;
277 mineap 529 checkBox_isSmoothingOnlyNotPixelIdenticalDimensions.enabled = this.isSmoothing;
278 mineap 487 if(this.playerController != null){
279     this.playerController.setVideoSmoothing(this.isSmoothing);
280     }
281     }
282    
283 mineap 529 public function checkBoxSmoothingOnlyNotPixelIdenticalDimensionsChanged(event:Event):void
284     {
285     this.isSmoothingOnlyNotPixelIdenticalDimensions = checkBox_isSmoothingOnlyNotPixelIdenticalDimensions.selected;
286     if (this.playerController != null)
287     {
288     this.playerController.setVideoSmoothing(this.isSmoothing);
289     }
290     }
291    
292 mineap 370 private function checkBoxPlayerAlwaysFrontChanged(event:Event):void{
293     this.videoPlayer.isAlwaysFront = (event.currentTarget as CheckBox).selected;
294     this.videoPlayer.alwaysInFront = (event.currentTarget as CheckBox).selected;
295     }
296    
297     private function checkBoxInfoViewAlwaysFrontChanged(event:Event):void{
298     this.isInfoViewAlwaysFront = (event.currentTarget as CheckBox).selected;
299     this.alwaysInFront = (event.currentTarget as CheckBox).selected;
300     }
301    
302     private function checkBoxCommentFontBoldChanged(event:Event):void{
303     this.isCommentFontBold = this.checkBox_commentBold.selected;
304     playerController.setCommentFontBold(this.isCommentFontBold);
305     }
306    
307     private function checkboxSyncCommentChanged():void{
308     this.isSyncComment = this.checkbox_SyncComment.selected;
309     this.commentListProvider.sort = new Sort();
310     this.commentListProvider.sort.fields = [new SortField("vpos_column",true)];
311     this.commentListProvider.refresh();
312     }
313    
314     private function checkboxRepeatAllChanged():void{
315     this.isPlayListRepeat = this.checkBox_repeatAll.selected;
316     if(isPlayListRepeat){
317     videoPlayer.setIsRepeat(false);
318     }
319     }
320    
321     private function checkboxPlayerFollowChanged(event:Event):void{
322     this.isPlayerFollow = this.checkbox_playerFollow.selected;
323     if((event.currentTarget as CheckBox).selected){
324     this.videoPlayer.followInfoView(this.videoPlayer.lastRect);
325     }
326     }
327    
328 mineap 526 private function checkboxFollowInfoViewHeight(event:Event):void
329     {
330     this.isFollowInfoViewHeight = this.checkbox_followInfoViewHeight.selected;
331     if ((event.currentTarget as CheckBox).selected)
332     {
333     this.videoPlayer.resizeInfoView();
334     }
335     }
336    
337 mineap 370 private function checkboxHideUnderControllerChanged(event:Event):void{
338     this.isHideUnderController = this.checkbox_hideUnderController.selected;
339     if(this.videoPlayer.stage.displayState != StageDisplayState.FULL_SCREEN_INTERACTIVE){
340     if((event.currentTarget as CheckBox).selected){
341     //������������������������������
342     this.videoPlayer.showUnderController(false, true);
343     }else{
344     //������������������������������
345     this.videoPlayer.showUnderController(true, true);
346     }
347     }
348     this.videoPlayer.videoController.resetAlpha(true);
349     }
350    
351     private function checkboxHideTagAreaChanged(event:Event):void{
352     this.isHideTagArea = this.checkbox_hideTagArea.selected;
353     if(this.videoPlayer.stage.displayState != StageDisplayState.FULL_SCREEN_INTERACTIVE){
354     if((event.currentTarget as CheckBox).selected){
355     //���������������������������
356     this.videoPlayer.showTagArea(false, true);
357     }else{
358     //������������������������������������
359     this.videoPlayer.showTagArea(true, true);
360     }
361     }
362     this.videoPlayer.videoController.resetAlpha(true);
363     }
364    
365     public function changeWideMode():void{
366     if(isResizePlayerEachPlay){
367     if(this.selectedResizeType == VideoInfoView.RESIZE_TYPE_NICO){
368     isEnableWideMode = !isEnableWideMode;
369     if(checkbox_enableWideMode != null){
370     checkbox_enableWideMode.selected = isEnableWideMode;
371     }
372     this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
373     }
374     }
375     }
376    
377     private function checkboxResizePlayerEachPlay(event:Event):void{
378     this.isResizePlayerEachPlay = this.checkbox_resizePlayerEachPlay.selected;
379     radioGroup_resizeType.selectedValue = selectedResizeType;
380     if(this.isResizePlayerEachPlay){
381     this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
382     this.radioButton_resizeNicoDou.enabled = true;
383     this.radioButton_resizeVideo.enabled = true;
384     if(this.selectedResizeType == VideoInfoView.RESIZE_TYPE_NICO){
385     this.checkbox_enableWideMode.enabled = true;
386     }else{
387     this.checkbox_enableWideMode.enabled = false;
388     }
389     }else{
390     this.videoPlayer.nowRatio = -1;
391     this.radioButton_resizeNicoDou.enabled = false;
392     this.radioButton_resizeVideo.enabled = false;
393     this.checkbox_enableWideMode.enabled = false;
394     }
395    
396     }
397    
398     private function checkBoxAlwaysEconomyChanged(event:Event):void{
399     isAlwaysEconomyForStreaming = this.checkBox_isAlwaysEconomyForStreaming.selected;
400     }
401    
402    
403     private function checkBoxShowAlwaysNicowariAreaChanged(event:Event):void{
404     isShowAlwaysNicowariArea = this.checkBox_showAlwaysNicowariArea.selected;
405     videoPlayer.setShowAlwaysNicowariArea(isShowAlwaysNicowariArea);
406     }
407    
408 mineap 605 private function checkBoxIsNotPlayNicowariChanged(event:Event):void
409     {
410     this.isNotPlayNicowari = this.checkBox_isNotPlayNicowari.selected;
411    
412     if (isNotPlayNicowari)
413     {
414     playerController.stopNicowari();
415     videoPlayer.hideNicowariArea();
416     }
417     else if (isShowAlwaysNicowariArea)
418     {
419     videoPlayer.showNicowariArea();
420     }
421     }
422    
423 mineap 370 public function setShowAlwaysNicowariArea(isShow:Boolean):void{
424     if(this.checkBox_showAlwaysNicowariArea != null){
425     this.checkBox_showAlwaysNicowariArea.selected = isShow;
426     }
427     isShowAlwaysNicowariArea = isShow;
428     }
429    
430     private function checkBoxRenewCommentChanged():void{
431     isRenewCommentEachPlay = checkBox_renewComment.selected;
432     checkBox_renewTagAndNicowari.enabled = isRenewCommentEachPlay;
433     checkBox_isAppendComment.enabled = isRenewCommentEachPlay;
434     }
435    
436     private function checkBoxCommentBoldChanged(event:Event):void{
437     this.isCommentFontBold = checkBox_commentBold.selected;
438     playerController.setCommentFontBold(this.isCommentFontBold);
439     }
440    
441     public function setRelationComboboxEnable(enabled:Boolean):void{
442     if(combobox_relationSort != null){
443     (combobox_relationSort as ComboBox).enabled = enabled;
444     }
445     if(combobox_relationOrder != null){
446     (combobox_relationOrder as ComboBox).enabled = enabled;
447     }
448     }
449    
450     private function thumbPress(event:SliderEvent):void{
451     this.playerController.sliderChanging = true;
452     }
453    
454     private function thumbRelease(event:SliderEvent):void{
455     this.playerController.sliderChanging = false;
456     this.playerController.seek(event.value);
457     }
458    
459     private function sliderVolumeChanged(evt:SliderEvent):void{
460     this.playerController.setVolume(evt.value);
461     }
462    
463     private function sliderFpsChanged(event:SliderEvent):void{
464     this.fps = getFps(event.value);
465     this.playerController.changeFps(this.fps);
466     }
467    
468 mineap 507
469     private function commentCountNumStepperChanged(event:NumericStepperEvent):void
470     {
471     this.showCommentCountPerMin = event.value;
472 mineap 370 }
473    
474 mineap 507 private function ownerCommentCountNumStepperChanged(event:NumericStepperEvent):void
475     {
476     this.showOwnerCommentCountPerMin = event.value;
477     }
478    
479 mineap 370 private function addNGListIdButtonClicked():void{
480     var index:int = -1;
481     if(tabNavigator_comment.selectedIndex == 0){
482     index = this.dataGrid_comment.selectedIndex;
483     }else if(tabNavigator_comment.selectedIndex == 1){
484     index = this.dataGrid_oldComment.selectedIndex;
485     }
486     if(index > -1){
487     this.playerController.ngListManager.addNgID(commentListProvider.getItemAt(index).user_id_column);
488     }
489     }
490    
491     private function addNGListWordButtonClicked():void{
492     var index:int = -1;
493     if(tabNavigator_comment.selectedIndex == 0){
494     index = this.dataGrid_comment.selectedIndex;
495     }else if(tabNavigator_comment.selectedIndex == 1){
496     index = this.dataGrid_oldComment.selectedIndex;
497     }
498     if(index > -1){
499     this.playerController.ngListManager.addNgWord(commentListProvider.getItemAt(index).comment_column);
500     }
501     }
502    
503     private function addPermissionIdButtonClicked():void{
504     var index:int = -1;
505     if(tabNavigator_comment.selectedIndex == 0){
506     index = this.dataGrid_comment.selectedIndex;
507     }else if(tabNavigator_comment.selectedIndex == 1){
508     index = this.dataGrid_oldComment.selectedIndex;
509     }
510     if(index > -1){
511     this.playerController.ngListManager.addPermissionId(commentListProvider.getItemAt(index).user_id_column);
512     }
513     }
514    
515     private function headerReleaseHandler(event:DataGridEvent):void{
516     if(event.columnIndex == 1){
517     this.isSyncComment = false;
518     this.checkbox_SyncComment.selected = false;
519     }
520     }
521    
522     /**
523     * TextInput������������������������ID���NG���������������������������
524     *
525     */
526     private function addItemToNgList():void{
527     playerController.ngListManager.addItemToNgList(textInput_ng.text, combobox_ngKind.selectedLabel);
528     }
529    
530     private function ngListItemClicked(event:ListEvent):void{
531     playerController.ngListManager.ngListItemClicked(event);
532     }
533    
534     /**
535     * ���������������������NG���������NG������������������������������������
536     *
537     */
538     private function removeItemFromNgList():void{
539     playerController.ngListManager.removeItemFromNgList();
540     }
541    
542     private function ngTextInputEnter(event:FlexEvent):void{
543     playerController.ngListManager.addItemToNgList(textInput_ng.text, combobox_ngKind.selectedLabel);
544     }
545    
546     private function fpsDataTipFormatFunction(value:Number):String{
547     return new String(getFps(value));
548     }
549    
550     private function getFps(value:Number):Number{
551     switch(value){
552     case 1:
553     return 7.5;
554     case 2:
555     return 15;
556     case 3:
557     return 30;
558     case 4:
559     return 60;
560     case 5:
561     return 120;
562     default:
563     return 15;
564     }
565     }
566    
567     private function getValueByFps(fps:Number):int{
568     switch(fps){
569     case 7.5:
570     return 1;
571     case 15:
572     return 2;
573     case 30:
574     return 3;
575     case 60:
576     return 4;
577     case 120:
578     return 5;
579     default:
580     return 2;
581     }
582     }
583    
584     private function keyListener(event:KeyboardEvent):void{
585     if(event.keyCode == Keyboard.ESCAPE){
586     }else if(event.keyCode == Keyboard.F11 || (event.keyCode == Keyboard.F && (event.controlKey || event.commandKey))){
587     // trace("Ctrl + " + event.keyCode);
588     this.videoPlayer.changeFull();
589     }else if(event.keyCode == Keyboard.C){
590     // trace(event.keyCode);
591     this.stage.nativeWindow.activate();
592     }else if(event.keyCode == Keyboard.SPACE){
593     this.playerController.play();
594     }else if(event.keyCode == Keyboard.LEFT){
595     //���
596     if(seekTimer != null){
597     seekTimer.stop();
598     }
599     seekTimer = new Timer(100, 1);
600     seekTimer.addEventListener(TimerEvent.TIMER_COMPLETE, function(event:Event):void{
601     var newValue:Number = videoPlayer.videoController.slider_timeline.value + seekValue;
602     if(newValue <= (videoPlayer.videoController.slider_timeline as HSlider).minimum){
603     newValue = 0;
604     }else if(newValue >= (videoPlayer.videoController.slider_timeline as HSlider).maximum){
605     newValue = (videoPlayer.videoController.slider_timeline as HSlider).maximum;
606     }
607     trace(newValue +" = "+videoPlayer.videoController.slider_timeline.value +"+"+ seekValue);
608     playerController.seek(newValue);
609     seekValue = 0;
610     });
611     seekTimer.start();
612     this.seekValue -= 10;
613     }else if(event.keyCode == Keyboard.RIGHT){
614     //���
615     if(seekTimer != null){
616     seekTimer.stop();
617     }
618     seekTimer = new Timer(100, 1);
619     seekTimer.addEventListener(TimerEvent.TIMER_COMPLETE, function(event:Event):void{
620     var newValue:Number = videoPlayer.videoController.slider_timeline.value + seekValue;
621     if(newValue <= (videoPlayer.videoController.slider_timeline as HSlider).minimum){
622     newValue = 0;
623     }else if(newValue >= (videoPlayer.videoController.slider_timeline as HSlider).maximum){
624     newValue = (videoPlayer.videoController.slider_timeline as HSlider).maximum;
625     }
626     trace(newValue +" = "+videoPlayer.videoController.slider_timeline.value +"+"+ seekValue);
627     playerController.seek(newValue);
628     seekValue = 0;
629     });
630     seekTimer.start();
631     this.seekValue += 10;
632     }else if(event.keyCode == Keyboard.UP){
633     this.playerController.setVolume(this.videoPlayer.videoController.slider_volume.value + 0.05);
634     }else if(event.keyCode == Keyboard.DOWN){
635     this.playerController.setVolume(this.videoPlayer.videoController.slider_volume.value - 0.05);
636     }
637     }
638    
639     private function radioButtonResizeTypeChanged(event:Event):void{
640     this.selectedResizeType = int(RadioButton(event.currentTarget).value);
641    
642     if(this.selectedResizeType == VideoInfoView.RESIZE_TYPE_NICO){
643     this.checkbox_enableWideMode.enabled = true;
644 mineap 807 this.checkbox_useOldVersionVideoSize.enabled = true;
645 mineap 370 }else{
646     this.checkbox_enableWideMode.enabled = false;
647 mineap 807 this.checkbox_useOldVersionVideoSize.enabled = false;
648 mineap 370 }
649    
650     this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
651     }
652    
653     private function checkboxEnableWideModeChanged(event:Event):void{
654     this.isEnableWideMode = event.target.selected;
655     this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
656     }
657    
658 mineap 799 private function checkboxUseOldVersionVideoSizeChanged(event:Event):void
659     {
660     this.useOldVersionVideoSize = event.target.selected;
661     this.playerController.isUseOldVersionVideoSize(this.useOldVersionVideoSize);
662     this.playerController.resizePlayerJustVideoSize(this.videoPlayer.nowRatio);
663     }
664    
665 mineap 370 private function checkBox_repeatAllCompleteHandler(event:FlexEvent):void{
666     checkBox_repeatAll.selected = isPlayListRepeat;
667     }
668    
669     private function checkBoxIsSOPCChanged(event:MouseEvent):void{
670     isShowOnlyPermissionComment = checkBox_isShowOnlyPermissionComment.selected;
671     if(this.playerController != null){
672     this.playerController.reloadLocalComment();
673     }
674     }
675    
676     private function checkBoxRenewTagNicowariChanged():void{
677     isRenewOtherCommentWithCommentEachPlay = checkBox_renewTagAndNicowari.selected;
678     }
679    
680     private function checkBoxIsEnableJump(event:MouseEvent):void{
681     isEnableJump = event.currentTarget.selected;
682     (checkBox_askToUserOnJump as CheckBox).enabled = isEnableJump;
683     }
684    
685     private function checkBoxIsAskToUserOnJump(event:MouseEvent):void{
686     isAskToUserOnJump = event.currentTarget.selected;
687     }
688    
689     private function checkBoxHideSekaShinComment(event:MouseEvent):void{
690     isHideSekaShinComment = event.currentTarget.selected;
691    
692     if(this.playerController != null){
693     this.playerController.reloadLocalComment();
694     }
695     }
696    
697     private function commentListDoubleClicked(event:ListEvent):void{
698     var time:String = event.target.selectedItem.vpos_column;
699    
700     var min:int = int(time.substring(0,time.indexOf(":")));
701     var sec:int = int(time.substring(time.indexOf(":")+1));
702    
703     if(playerController.windowType == PlayerController.WINDOW_TYPE_FLV){
704     this.playerController.seek(min*60 + sec);
705     }else{
706     this.playerController.seek((min*60 + sec)*playerController.swfFrameRate);
707     }
708     }
709    
710     private function ichibaDataGridDoubleClicked(event:ListEvent):void{
711     trace((event.currentTarget as DataGrid).dataProvider[event.rowIndex].col_link);
712     var url:String = (event.currentTarget as DataGrid).dataProvider[event.rowIndex].col_link;
713     if(url != null){
714     navigateToURL(new URLRequest(url));
715     }
716     }
717    
718     private function commentScaleSliderChanged(event:SliderEvent):void{
719     this.commentScale = event.value;
720     this.playerController.windowResized(true);
721     }
722    
723     private function sliderShowCommentTimeChanged(event:SliderEvent):void{
724     this.showCommentSec = event.value;
725     }
726    
727     private function sliderCommentAlphaChanged(event:SliderEvent):void{
728     this.commentAlpha = event.value;
729     playerController.getCommentManager().setCommentAlpha(this.commentAlpha/100);
730     }
731    
732     private function myDataTipFormatFunction(value:Number):String{
733     var nowSec:String="00",nowMin:String="0";
734     nowSec = String(int(value%60));
735     nowMin = String(int(value/60));
736    
737     if(nowSec.length == 1){
738     nowSec = "0" + nowSec;
739     }
740     if(nowMin.length == 1){
741     nowMin = "0" + nowMin;
742     }
743     return nowMin + ":" + nowSec;
744     }
745    
746     private function windowCompleteHandler():void{
747    
748     videoPlayer.alwaysInFront = videoPlayer.isAlwaysFront;
749     this.alwaysInFront = this.isInfoViewAlwaysFront;
750    
751     // checkbox_repeat.selected = isRepeat;
752     // checkbox_showComment.selected = isShowComment;
753     checkbox_SyncComment.selected = isSyncComment;
754     checkBox_isShowOnlyPermissionComment.selected = isShowOnlyPermissionComment;
755     checkbox_showHtml.selected = isShowHTMLOwnerComment;
756    
757     videoPlayer.setShowAlwaysNicowariArea(isShowAlwaysNicowariArea);
758     playerController.setCommentFontBold(this.isCommentFontBold);
759    
760     videoPlayer.showUnderController(!isHideUnderController, true);
761     videoPlayer.showTagArea(!isHideTagArea, true);
762    
763     this.setStyle("fontFamily", ConfigManager.getInstance().getItem("fontFamily"));
764 mineap 439 this.setStyle("fontSize", Number(ConfigManager.getInstance().getItem("fontSize")));
765 mineap 370 }
766    
767 mineap 652 private function comboboxRelationOrderCreationCompleteHandler(event:FlexEvent):void
768     {
769 mineap 370 combobox_relationOrder.selectedIndex = relationOrderIndex;
770 mineap 652 }
771    
772     private function comboboxRelationSortCreationCompleteHandler(event:FlexEvent):void
773     {
774 mineap 370 combobox_relationSort.selectedIndex = relationSortIndex;
775     }
776    
777     private function relationSortComboboxChange(event:Event):void{
778     relationSortIndex = combobox_relationSort.selectedIndex;
779     playerController.setNicoRelationInfoForRelationSortTypeChange();
780     }
781    
782     private function relationOrderComboboxChange(event:Event):void{
783     relationOrderIndex = combobox_relationOrder.selectedIndex;
784     playerController.setNicoRelationInfoForRelationSortTypeChange();
785     }
786    
787 mineap 498 private function playerQualitySliderChanged(event:Event):void{
788     playerQuality = slider_playerQuality.value;
789 mineap 370
790 mineap 498 if(playerController != null){
791     playerController.setPlayerQuality(playerQuality);
792     }
793     }
794    
795     private function configCanvas1CreationCompleteHandler(event:FlexEvent):void{
796 mineap 370 checkbox_resizePlayerEachPlay.selected = isResizePlayerEachPlay;
797 mineap 498
798 mineap 370 if(isResizePlayerEachPlay){
799     radioButton_resizeNicoDou.enabled = true;
800     radioButton_resizeVideo.enabled = true;
801     }else{
802     radioButton_resizeNicoDou.enabled = false;
803     radioButton_resizeVideo.enabled = false;
804     }
805    
806 mineap 807 radioGroup_resizeType.selectedValue = selectedResizeType;
807     if (selectedResizeType != 1)
808     {
809     checkbox_useOldVersionVideoSize.enabled = false;
810     checkbox_enableWideMode.enabled = false;
811     }
812 mineap 799 checkbox_useOldVersionVideoSize.selected = useOldVersionVideoSize;
813 mineap 807 checkbox_enableWideMode.selected = isEnableWideMode;
814 mineap 799
815 mineap 498 checkBox_isSmoothing.selected = isSmoothing;
816 mineap 529 checkBox_isSmoothingOnlyNotPixelIdenticalDimensions.enabled = isSmoothing;
817     checkBox_isSmoothingOnlyNotPixelIdenticalDimensions.selected = isSmoothingOnlyNotPixelIdenticalDimensions;
818 mineap 370
819 mineap 498 if(playerController.getCommentManager() != null){
820     playerController.getCommentManager().setAntiAlias(isAntiAlias);
821     }
822    
823     checkBox_isAlwaysEconomyForStreaming.selected = isAlwaysEconomyForStreaming;
824    
825     slider_playerQuality.value = playerQuality;
826    
827     }
828    
829     private function configCanvas2CreationCompleteHandler(event:FlexEvent):void{
830 mineap 370 checkBox_commentBold.selected = isCommentFontBold;
831 mineap 498 checkBox_hideSekaShinComment.selected = isHideSekaShinComment;
832     checkBox_isNgUpEnable.selected = isNgUpEnable;
833 mineap 370
834     slider_commentScale.value = commentScale;
835     slider_fps.value = getValueByFps(fps);
836 mineap 507
837     commentNumStepper.value = showCommentCountPerMin;
838     ownerCommentNumStepper.value = showOwnerCommentCountPerMin;
839    
840 mineap 370 slider_showCommentTime.value = showCommentSec;
841     slider_commentAlpha.value = commentAlpha;
842    
843 mineap 796 var value:String = ConfigManager.getInstance().getItem("isLengthwisePreferred");
844     if (value != null)
845     {
846     var isLengthwisePreferred:Boolean = ConfUtil.parseBoolean(value);
847     checkBox_isLengthwisePreferred.selected = isLengthwisePreferred;
848     }
849 mineap 498 }
850    
851     private function configCanvas3CreationCompleteHandler(event:FlexEvent):void{
852     checkbox_PlayerAlwaysFront.selected = videoPlayer.isAlwaysFront;
853     checkbox_InfoViewAlwaysFront.selected = isInfoViewAlwaysFront;
854 mineap 370
855 mineap 498 checkbox_playerFollow.selected = isPlayerFollow;
856     checkBox_renewComment.selected = isRenewCommentEachPlay;
857     checkBox_renewTagAndNicowari.selected = isRenewOtherCommentWithCommentEachPlay;
858     checkBox_renewTagAndNicowari.enabled = isRenewCommentEachPlay;
859 mineap 370
860 mineap 498 isAppendComment = FlexGlobals.topLevelApplication.getAppendComment();
861 mineap 370 checkBox_isAppendComment.selected = isAppendComment;
862     checkBox_isAppendComment.enabled = isRenewCommentEachPlay;
863    
864 mineap 527 checkbox_followInfoViewHeight.selected = isFollowInfoViewHeight;
865 mineap 370
866 mineap 605 checkBox_isNotPlayNicowari.selected = isNotPlayNicowari;
867 mineap 498 checkBox_showAlwaysNicowariArea.selected = isShowAlwaysNicowariArea;
868     checkbox_hideTagArea.selected = isHideTagArea;
869     checkbox_hideUnderController.selected = isHideUnderController;
870    
871     checkBox_enableJump.selected = isEnableJump;
872     checkBox_askToUserOnJump.selected = isAskToUserOnJump;
873     checkBox_askToUserOnJump.enabled = isEnableJump;
874 mineap 605
875    
876 mineap 370 }
877    
878 mineap 498
879 mineap 370 public function isRepeatAll():Boolean{
880     return this.isPlayListRepeat;
881     }
882    
883     private function windowResized(event:NativeWindowBoundsEvent):void{
884     lastRect = event.afterBounds;
885     }
886    
887     private function windowMove(event:NativeWindowBoundsEvent):void{
888     lastRect = event.afterBounds;
889     }
890    
891     public function playListDoubleClicked():void{
892     if(playListProvider.length > 0){
893     var url:String = videoUrlMap[playListProvider[dataGrid_playList.selectedIndex]];
894     playerController.initForVideoPlayer(url, dataGrid_playList.selectedIndex);
895     }
896     }
897    
898     /**
899     * ���������������������������������������������������������������������������������������������������
900     *
901     */
902     public function selectComment(no:Number):void{
903    
904     for(var i:int = 0; i<commentListProvider.length; i++){
905     if(commentListProvider[i].no_column == no){
906     (dataGrid_comment as DataGrid).selectedIndex = i;
907    
908     return;
909     }
910     }
911    
912     }
913    
914     private function readStore():void{
915    
916     try{
917     /*���������������������������������������������*/
918    
919     var confValue:String = null;
920     confValue = ConfigManager.getInstance().getItem("isPlayListRepeat");
921     if (confValue == null) {
922     //���������������
923     }else{
924     isPlayListRepeat = ConfUtil.parseBoolean(confValue);
925     }
926    
927     confValue = ConfigManager.getInstance().getItem("isSyncComment");
928     if (confValue == null) {
929     //���������������
930     }else{
931     isSyncComment = ConfUtil.parseBoolean(confValue);
932     }
933    
934     confValue = ConfigManager.getInstance().getItem("isPlayerFollow");
935     if (confValue == null) {
936     //���������������
937     }else{
938     isPlayerFollow = ConfUtil.parseBoolean(confValue);
939     }
940    
941     confValue = ConfigManager.getInstance().getItem("isRenewCommentEachPlay");
942     if (confValue == null) {
943     //���������������
944     }else{
945     isRenewCommentEachPlay = ConfUtil.parseBoolean(confValue);
946     }
947    
948     confValue = ConfigManager.getInstance().getItem("isResizePlayerEachPlay");
949     if (confValue == null) {
950     //���������������
951     }else{
952     isResizePlayerEachPlay = ConfUtil.parseBoolean(confValue);
953     }
954    
955     confValue = ConfigManager.getInstance().getItem("isHideUnderController");
956     if (confValue == null) {
957     //���������������
958     }else{
959     isHideUnderController = ConfUtil.parseBoolean(confValue);
960     }
961    
962     confValue = ConfigManager.getInstance().getItem("commentScale");
963     if (confValue == null) {
964     //���������������
965     }else{
966     commentScale = Number(confValue);
967     }
968    
969     confValue = ConfigManager.getInstance().getItem("commentFps");
970     if (confValue == null) {
971     //���������������
972     }else{
973     this.fps = Number(confValue);
974     this.playerController.changeFps(this.fps);
975     }
976    
977     confValue = ConfigManager.getInstance().getItem("isShowOnlyPermissionComment");
978     if (confValue == null) {
979     //���������������
980     }else{
981     isShowOnlyPermissionComment = ConfUtil.parseBoolean(confValue);
982     }
983    
984     confValue = ConfigManager.getInstance().getItem("showCommentCount");
985     if (confValue == null) {
986     //���������������
987     }else{
988 mineap 507 showCommentCountPerMin = int(confValue);
989 mineap 370 }
990    
991 mineap 507 confValue = ConfigManager.getInstance().getItem("showOwnerCommentCount");
992     if (confValue == null) {
993     showOwnerCommentCountPerMin = showCommentCountPerMin;
994     }else{
995     showOwnerCommentCountPerMin = int(confValue);
996     }
997    
998 mineap 370 confValue = ConfigManager.getInstance().getItem("showCommentSec");
999     if (confValue == null) {
1000     //���������������
1001     }else{
1002     showCommentSec = int(confValue);
1003     }
1004    
1005     confValue = ConfigManager.getInstance().getItem("isRenewOtherCommentWithCommentEachPlay");
1006     if (confValue == null) {
1007     //���������������
1008     }else{
1009     isRenewOtherCommentWithCommentEachPlay = ConfUtil.parseBoolean(confValue);
1010     }
1011    
1012     confValue = ConfigManager.getInstance().getItem("isAntiAlias");
1013     if (confValue == null) {
1014     //���������������
1015     }else{
1016     isAntiAlias = ConfUtil.parseBoolean(confValue);
1017     }
1018    
1019     confValue = ConfigManager.getInstance().getItem("commentAlpha");
1020     if (confValue == null) {
1021     //���������������
1022     }else{
1023     commentAlpha = int(confValue);
1024     }
1025    
1026     confValue = ConfigManager.getInstance().getItem("isEnableJump");
1027     if (confValue == null) {
1028     //���������������
1029     }else{
1030     isEnableJump = ConfUtil.parseBoolean(confValue);
1031     }
1032    
1033     confValue = ConfigManager.getInstance().getItem("isAskToUserOnJump");
1034     if (confValue == null) {
1035     //���������������
1036     }else{
1037     isAskToUserOnJump = ConfUtil.parseBoolean(confValue);
1038     }
1039    
1040     confValue = ConfigManager.getInstance().getItem("isInfoViewAlwaysFront");
1041     if (confValue == null) {
1042     //���������������
1043     }else{
1044     isInfoViewAlwaysFront = ConfUtil.parseBoolean(confValue);
1045     }
1046    
1047     confValue = ConfigManager.getInstance().getItem("selectedResizeType");
1048     if (confValue == null) {
1049     //���������������
1050     }else{
1051     selectedResizeType = int(confValue);
1052     }
1053    
1054     confValue = ConfigManager.getInstance().getItem("isCommentFontBold");
1055     if (confValue == null) {
1056     //���������������
1057     }else{
1058     isCommentFontBold = ConfUtil.parseBoolean(confValue);
1059     }
1060    
1061     confValue = ConfigManager.getInstance().getItem("isShowAlwaysNicowariArea");
1062     if (confValue == null) {
1063     //���������������
1064     }else{
1065     isShowAlwaysNicowariArea = ConfUtil.parseBoolean(confValue);
1066     }
1067    
1068     confValue = ConfigManager.getInstance().getItem("isHideTagArea");
1069     if (confValue == null) {
1070     //���������������
1071     }else{
1072     isHideTagArea = ConfUtil.parseBoolean(confValue);
1073     }
1074    
1075     confValue = ConfigManager.getInstance().getItem("isAlwaysEconomyForStreaming");
1076     if (confValue == null) {
1077     //���������������
1078     }else{
1079     isAlwaysEconomyForStreaming = ConfUtil.parseBoolean(confValue);
1080     }
1081    
1082     confValue = ConfigManager.getInstance().getItem("isAppendComment");
1083     if (confValue == null) {
1084     //���������������
1085     }else{
1086     isAppendComment = ConfUtil.parseBoolean(confValue);
1087     }
1088    
1089     confValue = ConfigManager.getInstance().getItem("isHideSekaShinComment");
1090     if (confValue == null) {
1091     //���������������
1092     }else{
1093     isHideSekaShinComment = ConfUtil.parseBoolean(confValue);
1094     }
1095    
1096     confValue = ConfigManager.getInstance().getItem("isShowHTMLOwnerComment");
1097     if (confValue == null) {
1098     //���������������
1099     }else{
1100     isShowHTMLOwnerComment = ConfUtil.parseBoolean(confValue);
1101     }
1102    
1103     //x,y,w,h
1104     confValue = ConfigManager.getInstance().getItem("controllerWindowPosition_x");
1105     var controllerPosition_x:Number = 0;
1106     if (confValue == null) {
1107     //���������������
1108     }else{
1109     controllerPosition_x = Number(confValue);
1110     this.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{
1111     nativeWindow.x = lastRect.x = controllerPosition_x;
1112     });
1113     }
1114    
1115     confValue = ConfigManager.getInstance().getItem("controllerWindowPosition_y");
1116     var controllerPosition_y:Number = 0;
1117     if (confValue == null) {
1118     //���������������
1119     }else{
1120     controllerPosition_y = Number(confValue);
1121     this.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{
1122     nativeWindow.y = lastRect.y = controllerPosition_y;
1123     });
1124     }
1125    
1126     confValue = ConfigManager.getInstance().getItem("controllerWindowPosition_w");
1127     var controllerPosition_w:Number = 380;
1128     if (confValue == null) {
1129     //���������������
1130     }else{
1131     controllerPosition_w = Number(confValue);
1132     this.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{
1133     nativeWindow.width = lastRect.width = controllerPosition_w;
1134     });
1135     }
1136    
1137     confValue = ConfigManager.getInstance().getItem("controllerWindowPosition_h");
1138     var controllerPosition_h:Number = 520;
1139     if (confValue == null) {
1140     //���������������
1141     }else{
1142     controllerPosition_h = Number(confValue);
1143     this.addEventListener(FlexEvent.CREATION_COMPLETE, function():void{
1144     nativeWindow.height = lastRect.height = controllerPosition_h;
1145     });
1146     }
1147    
1148     confValue = ConfigManager.getInstance().getItem("isEnableWideMode");
1149     if(confValue == null){
1150     //���������������
1151     isEnableWideMode = true;
1152     }else{
1153     isEnableWideMode = ConfUtil.parseBoolean(confValue);
1154     }
1155    
1156 mineap 799 confValue = ConfigManager.getInstance().getItem("useOldVersionVideoSize");
1157     if (confValue == null)
1158     {
1159     useOldVersionVideoSize = false;
1160     }else
1161     {
1162     useOldVersionVideoSize = ConfUtil.parseBoolean(confValue);
1163     }
1164 mineap 817 playerController.isUseOldVersionVideoSize(useOldVersionVideoSize);
1165 mineap 799
1166    
1167 mineap 370 confValue = ConfigManager.getInstance().getItem("relationSortIndex");
1168     if(confValue == null){
1169     //���������������
1170     }else{
1171     relationSortIndex = int(confValue);
1172     }
1173    
1174     confValue = ConfigManager.getInstance().getItem("relationOrderIndex");
1175     if(confValue == null){
1176     //���������������
1177     }else{
1178     relationOrderIndex = int(confValue);
1179     }
1180    
1181     confValue = ConfigManager.getInstance().getItem("isNgUpEnable");
1182     if(confValue == null){
1183     // ���������������
1184     }else{
1185     isNgUpEnable = ConfUtil.parseBoolean(confValue);
1186     }
1187    
1188 mineap 487 confValue = ConfigManager.getInstance().getItem("isSmoothing");
1189     if(confValue != null){
1190     isSmoothing = ConfUtil.parseBoolean(confValue);
1191     }
1192     if(playerController != null){
1193     playerController.setVideoSmoothing(this.isSmoothing);
1194     }
1195 mineap 439
1196 mineap 529 confValue = ConfigManager.getInstance().getItem("isSmoothingOnlyNotPixelIdenticalDimensions");
1197     if(confValue != null){
1198     isSmoothingOnlyNotPixelIdenticalDimensions = ConfUtil.parseBoolean(confValue);
1199     }
1200    
1201 mineap 498 confValue = ConfigManager.getInstance().getItem("playerQuality");
1202     if(confValue != null){
1203     playerQuality = int(confValue);
1204     }
1205     if(playerController != null){
1206     playerController.setPlayerQuality(this.playerQuality);
1207     }
1208 mineap 487
1209 mineap 498 confValue = ConfigManager.getInstance().getItem("isEnableWideMode");
1210     if(confValue != null){
1211     isEnableWideMode = ConfUtil.parseBoolean(confValue);
1212     }
1213    
1214 mineap 526 confValue = ConfigManager.getInstance().getItem("isFollowInfoViewHeight");
1215     if (confValue != null)
1216     {
1217     isFollowInfoViewHeight = ConfUtil.parseBoolean(confValue);
1218     }
1219    
1220 mineap 605 confValue = ConfigManager.getInstance().getItem("isNotPlayNicowari");
1221     if (confValue != null)
1222     {
1223     isNotPlayNicowari = ConfUtil.parseBoolean(confValue);
1224     }
1225    
1226 mineap 711 confValue = ConfigManager.getInstance().getItem("isOpenFileDialogWhenOpenPlayer");
1227     if (confValue != null)
1228     {
1229     this.isOpenFileDialogWhenOpenPlayer = ConfUtil.parseBoolean(confValue);
1230     }
1231    
1232 mineap 370 }catch(error:Error){
1233     trace(error.getStackTrace());
1234     Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1235     logManager.addLog(Message.FAIL_LOAD_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1236     }
1237    
1238     }
1239    
1240     public function saveStore():void{
1241    
1242     try{
1243    
1244     trace("saveStore_videoInfoView");
1245    
1246     /*������������������������������������*/
1247     ConfigManager.getInstance().removeItem("isPlayListRepeat");
1248     ConfigManager.getInstance().setItem("isPlayListRepeat", isPlayListRepeat);
1249    
1250     ConfigManager.getInstance().removeItem("isSyncComment");
1251     ConfigManager.getInstance().setItem("isSyncComment", isSyncComment);
1252    
1253     ConfigManager.getInstance().removeItem("isPlayerFollow");
1254     ConfigManager.getInstance().setItem("isPlayerFollow", isPlayerFollow);
1255    
1256     ConfigManager.getInstance().removeItem("isRenewCommentEachPlay");
1257     ConfigManager.getInstance().setItem("isRenewCommentEachPlay", isRenewCommentEachPlay);
1258    
1259     ConfigManager.getInstance().removeItem("isResizePlayerEachPlay");
1260     ConfigManager.getInstance().setItem("isResizePlayerEachPlay", isResizePlayerEachPlay);
1261    
1262     ConfigManager.getInstance().removeItem("isHideUnderController");
1263     ConfigManager.getInstance().setItem("isHideUnderController", isHideUnderController);
1264    
1265     // ������������������������������������
1266     ConfigManager.getInstance().removeItem("controllerWindowPosition_x");
1267     ConfigManager.getInstance().setItem("controllerWindowPosition_x", lastRect.x);
1268    
1269     ConfigManager.getInstance().removeItem("controllerWindowPosition_y");
1270     ConfigManager.getInstance().setItem("controllerWindowPosition_y", lastRect.y);
1271    
1272     ConfigManager.getInstance().removeItem("controllerWindowPosition_w");
1273     ConfigManager.getInstance().setItem("controllerWindowPosition_w", lastRect.width);
1274    
1275     ConfigManager.getInstance().removeItem("controllerWindowPosition_h");
1276     ConfigManager.getInstance().setItem("controllerWindowPosition_h", lastRect.height);
1277    
1278     ConfigManager.getInstance().removeItem("commentScale");
1279     ConfigManager.getInstance().setItem("commentScale", commentScale);
1280    
1281     ConfigManager.getInstance().removeItem("commentFps");
1282     ConfigManager.getInstance().setItem("commentFps", fps);
1283    
1284     ConfigManager.getInstance().removeItem("isShowOnlyPermissionComment");
1285     ConfigManager.getInstance().setItem("isShowOnlyPermissionComment", isShowOnlyPermissionComment);
1286    
1287     ConfigManager.getInstance().removeItem("showCommentCount");
1288 mineap 507 ConfigManager.getInstance().setItem("showCommentCount", showCommentCountPerMin);
1289 mineap 370
1290 mineap 507 ConfigManager.getInstance().removeItem("showOwnerCommentCount");
1291     ConfigManager.getInstance().setItem("showOwnerCommentCount", showOwnerCommentCountPerMin);
1292    
1293 mineap 370 ConfigManager.getInstance().removeItem("showCommentSec");
1294     ConfigManager.getInstance().setItem("showCommentSec", showCommentSec);
1295    
1296     ConfigManager.getInstance().removeItem("isRenewOtherCommentWithCommentEachPlay");
1297     ConfigManager.getInstance().setItem("isRenewOtherCommentWithCommentEachPlay", isRenewOtherCommentWithCommentEachPlay);
1298    
1299     ConfigManager.getInstance().removeItem("isAntiAlias");
1300     ConfigManager.getInstance().setItem("isAntiAlias", isAntiAlias);
1301    
1302     ConfigManager.getInstance().removeItem("commentAlpha");
1303     ConfigManager.getInstance().setItem("commentAlpha", commentAlpha);
1304    
1305     ConfigManager.getInstance().removeItem("isEnableJump");
1306     ConfigManager.getInstance().setItem("isEnableJump", isEnableJump);
1307    
1308     ConfigManager.getInstance().removeItem("isAskToUserOnJump");
1309     ConfigManager.getInstance().setItem("isAskToUserOnJump", isAskToUserOnJump);
1310    
1311     ConfigManager.getInstance().removeItem("isInfoViewAlwaysFront");
1312     ConfigManager.getInstance().setItem("isInfoViewAlwaysFront", isInfoViewAlwaysFront);
1313    
1314     ConfigManager.getInstance().removeItem("selectedResizeType");
1315     ConfigManager.getInstance().setItem("selectedResizeType", selectedResizeType);
1316    
1317     ConfigManager.getInstance().removeItem("isCommentFontBold");
1318     ConfigManager.getInstance().setItem("isCommentFontBold", isCommentFontBold);
1319    
1320     ConfigManager.getInstance().removeItem("isShowAlwaysNicowariArea");
1321     ConfigManager.getInstance().setItem("isShowAlwaysNicowariArea", isShowAlwaysNicowariArea);
1322    
1323     ConfigManager.getInstance().removeItem("isAlwaysEconomyForStreaming");
1324     ConfigManager.getInstance().setItem("isAlwaysEconomyForStreaming", isAlwaysEconomyForStreaming);
1325    
1326     ConfigManager.getInstance().removeItem("isHideTagArea");
1327     ConfigManager.getInstance().setItem("isHideTagArea", isHideTagArea);
1328    
1329     ConfigManager.getInstance().removeItem("isAppendComment");
1330     ConfigManager.getInstance().setItem("isAppendComment", isAppendComment);
1331    
1332     ConfigManager.getInstance().removeItem("isHideSekaShinComment");
1333     ConfigManager.getInstance().setItem("isHideSekaShinComment", isHideSekaShinComment);
1334    
1335     ConfigManager.getInstance().removeItem("isShowHTMLOwnerComment");
1336     ConfigManager.getInstance().setItem("isShowHTMLOwnerComment", isShowHTMLOwnerComment);
1337    
1338     ConfigManager.getInstance().removeItem("relationSortIndex");
1339     ConfigManager.getInstance().setItem("relationSortIndex", relationSortIndex);
1340    
1341     ConfigManager.getInstance().removeItem("relationOrderIndex");
1342     ConfigManager.getInstance().setItem("relationSortIndex", relationSortIndex);
1343    
1344     ConfigManager.getInstance().removeItem("isNgUpEnable");
1345     ConfigManager.getInstance().setItem("isNgUpEnable", isNgUpEnable);
1346    
1347 mineap 487 ConfigManager.getInstance().removeItem("isSmoothing");
1348     ConfigManager.getInstance().setItem("isSmoothing",isSmoothing);
1349    
1350 mineap 529 ConfigManager.getInstance().removeItem("isSmoothingOnlyNotPixelIdenticalDimensions");
1351     ConfigManager.getInstance().setItem("isSmoothingOnlyNotPixelIdenticalDimensions", isSmoothingOnlyNotPixelIdenticalDimensions);
1352    
1353 mineap 498 ConfigManager.getInstance().removeItem("playerQuality");
1354     ConfigManager.getInstance().setItem("playerQuality", playerQuality);
1355    
1356     ConfigManager.getInstance().removeItem("isEnableWideMode");
1357     ConfigManager.getInstance().setItem("isEnableWideMode", isEnableWideMode);
1358    
1359 mineap 799 ConfigManager.getInstance().removeItem("useOldVersionVideoSize");
1360     ConfigManager.getInstance().setItem("useOldVersionVideoSize", useOldVersionVideoSize);
1361    
1362 mineap 526 ConfigManager.getInstance().removeItem("isFollowInfoViewHeight");
1363     ConfigManager.getInstance().setItem("isFollowInfoViewHeight", isFollowInfoViewHeight);
1364    
1365 mineap 605 ConfigManager.getInstance().removeItem("isNotPlayNicowari");
1366     ConfigManager.getInstance().setItem("isNotPlayNicowari", isNotPlayNicowari);
1367    
1368 mineap 628
1369     /* DataGrid��������������� */
1370     if (dataGrid_comment != null)
1371     {
1372     DataGridColumnWidthUtil.save(dataGrid_comment, new Vector.<String>("mail_column"));
1373     }
1374    
1375     if (dataGrid_oldComment != null)
1376     {
1377     DataGridColumnWidthUtil.save(dataGrid_oldComment, new Vector.<String>("mail_column"));
1378     }
1379    
1380 mineap 711 ConfigManager.getInstance().removeItem("isOpenFileDialogWhenOpenPlayer");
1381     ConfigManager.getInstance().setItem("isOpenFileDialogWhenOpenPlayer", isOpenFileDialogWhenOpenPlayer);
1382 mineap 628
1383 mineap 370 ConfigManager.getInstance().save();
1384    
1385     }catch(error:Error){
1386     Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1387     logManager.addLog(Message.FAIL_SAVE_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1388     trace(error.getStackTrace());
1389     }
1390    
1391     }
1392    
1393     public function resetWindowPosition():void{
1394     // ������������������������������������
1395     try{
1396    
1397     // ������������������������������������������������������������
1398     ConfigManager.getInstance().removeItem("controllerWindowPosition_x");
1399     ConfigManager.getInstance().setItem("controllerWindowPosition_x", 0);
1400    
1401     ConfigManager.getInstance().removeItem("controllerWindowPosition_y");
1402     ConfigManager.getInstance().setItem("controllerWindowPosition_y", 0);
1403    
1404     ConfigManager.getInstance().removeItem("controllerWindowPosition_w");
1405     ConfigManager.getInstance().setItem("controllerWindowPosition_w", 400);
1406    
1407     ConfigManager.getInstance().removeItem("controllerWindowPosition_h");
1408     ConfigManager.getInstance().setItem("controllerWindowPosition_h", 580);
1409    
1410     ConfigManager.getInstance().save();
1411    
1412     this.readStore();
1413    
1414     }catch(error:Error){
1415     Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1416     logManager.addLog(Message.FAIL_SAVE_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1417     trace(error.getStackTrace());
1418     }
1419    
1420     if(this.nativeWindow != null && !(this as Window).closed){
1421    
1422     this.visible = true;
1423    
1424     this.nativeWindow.x = 0;
1425     this.nativeWindow.y = 0;
1426    
1427     this.width = 380;
1428     this.height = 520;
1429     }
1430     }
1431    
1432     /**
1433     *
1434     * @param urlList
1435     * @param videoNameList
1436     * @param playListName
1437     */
1438     public function setPlayList(urlList:Array, videoNameList:Array, playListName:String):void{
1439    
1440     this.playListName = playListName;
1441     label_playListTitle_dataProvider = playListName;
1442    
1443     for each(var title:String in videoNameList){
1444     playListProvider.addItem(title);
1445     }
1446    
1447     for(var index:int = 0; index<urlList.length; index++){
1448     videoUrlMap[videoNameList[index]] = urlList[index];
1449     }
1450    
1451     if(this.dataGrid_playList != null){
1452     // (dataGrid_playList as DataGrid).validateDisplayList();
1453     }
1454     }
1455    
1456     /**
1457     *
1458     * @param url
1459     * @param title
1460     *
1461     */
1462     public function addPlayListItem(url:String, title:String):void{
1463    
1464     videoUrlMap[title] = url;
1465    
1466     }
1467    
1468     /**
1469     *
1470     * @param url
1471     * @param title
1472     * @param index
1473     *
1474     */
1475     public function addPlayListItemWithList(url:String, title:String, index:int):void{
1476     playListProvider.addItemAt(title,index);
1477    
1478     addPlayListItem(url, title);
1479    
1480     if(this.dataGrid_playList != null){
1481     (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1482     (dataGrid_playList as DataGrid).validateDisplayList();
1483     }
1484    
1485     }
1486    
1487    
1488     /**
1489     *
1490     * @param title
1491     * @param index
1492     *
1493     */
1494     public function removePlayListItem(index:int):void{
1495     var title:String = String(playListProvider.removeItemAt(index));
1496    
1497     //���������������������������������������������������������������
1498     for each(var videoName:String in playListProvider){
1499     if(title == videoName){
1500     //������������������videoUrlMap���������������������
1501     return;
1502     }
1503     }
1504     //���������������������videoUrlMap������������
1505     videoUrlMap[title] = null;
1506    
1507     if(this.dataGrid_playList != null){
1508     (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1509     (dataGrid_playList as DataGrid).validateDisplayList();
1510     }
1511     }
1512    
1513     /**
1514     *
1515     * @return
1516     *
1517     */
1518     public function getPlayList():Array{
1519     var array:Array = new Array();
1520     for(var i:int = 0; i<playListProvider.length; i++){
1521     array.push(String(playListProvider[i]));
1522     }
1523    
1524     var returnArray:Array = new Array();
1525    
1526     for each(var title:String in array){
1527     returnArray.push(videoUrlMap[title]);
1528     }
1529    
1530     return returnArray;
1531     }
1532    
1533     /**
1534     * ���������������������������������������������������������������
1535     * @return
1536     *
1537     */
1538     public function getNameList():Array{
1539     var array:Array = new Array();
1540     for(var i:int = 0; i<playListProvider.length; i++){
1541     array.push(String(playListProvider[i]));
1542     }
1543    
1544     return array;
1545     }
1546    
1547     /**
1548     *
1549     *
1550     */
1551     public function resetPlayList():void{
1552     this.playListName = "";
1553     if(label_playListTitle != null){
1554     label_playListTitle.text = playListName;
1555     }else{
1556     canvas_videoInfo.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
1557     canvas_playList.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
1558     label_playListTitle.text = playListName;
1559     });
1560     });
1561     }
1562    
1563     videoUrlMap = new Object();
1564    
1565     playListProvider.removeAll();
1566    
1567     if(this.dataGrid_playList != null){
1568     (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1569     (dataGrid_playList as DataGrid).validateDisplayList();
1570     (dataGrid_playList as DataGrid).validateNow();
1571     }
1572     }
1573    
1574     /**
1575 mineap 476 * ���������������������������������������������
1576 mineap 370 *
1577 mineap 476 * @details edvakf���������������������������
1578     * @see https://github.com/edvakf/NNDDMOD/commit/6984ba8919727a98c249e1bc8a4848705de27df5
1579     */
1580     public function shufflePlayList():void{
1581 mineap 786
1582     var selectedObject:Object = null;
1583     if (dataGrid_playList != null)
1584     {
1585     selectedObject = dataGrid_playList.selectedItem;
1586     }
1587    
1588 mineap 476 var tempArrayCollection:ArrayCollection = new ArrayCollection();
1589     for each(var object:Object in playListProvider){
1590     tempArrayCollection.addItem(object);
1591     }
1592     var i:int = tempArrayCollection.length;
1593     while (--i) {
1594     var j:int = Math.floor( Math.random() * (i + 1) );
1595     if (i == j) {
1596     continue;
1597     }
1598     var object:Object = tempArrayCollection.getItemAt(i);
1599     tempArrayCollection.setItemAt( tempArrayCollection.getItemAt(j), i );
1600     tempArrayCollection.setItemAt( object, j );
1601     }
1602     playListProvider = tempArrayCollection;
1603 mineap 786
1604     if (dataGrid_playList != null && selectedObject != null)
1605     {
1606     dataGrid_playList.selectedItem = selectedObject;
1607     }
1608 mineap 476 }
1609    
1610     /**
1611     *
1612 mineap 370 * @param index
1613     * @return
1614     *
1615     */
1616     public function getPlayListUrl(index:int):String{
1617     var videoTitle:String = playListProvider[index];
1618    
1619     return videoUrlMap[videoTitle];
1620     }
1621    
1622     /**
1623     *
1624     * @param event
1625     *
1626     */
1627     public function playListDragDropHandler(event:DragEvent):void{
1628     if(event.dragInitiator == dataGrid_playList){
1629    
1630     //���������������(������������������������������������������)
1631    
1632     }else{
1633    
1634     //DataGrid���������Drag������������������������������
1635    
1636     if(event.dragInitiator as DataGrid){
1637     var selectedItems:Array = (event.dragInitiator as DataGrid).selectedItems;
1638     var addItems:Array = new Array();
1639    
1640     for(var i:int=0; i<selectedItems.length; i++){
1641    
1642     //������������������������
1643     var url:String = selectedItems[i].dataGridColumn_videoPath;
1644     if(url == null || url == ""){
1645     //��������������� or ���������videoPath���������������������
1646     url = selectedItems[i].dataGridColumn_nicoVideoUrl;
1647    
1648     if(url == null || url == ""){
1649     //������������������������������
1650     url = selectedItems[i].dataGridColumn_videoLocalPath;
1651    
1652     if(url == null || url == ""){
1653     //������������������videoLocalPath���������������������
1654     url = selectedItems[i].dataGridColumn_videoUrl;
1655    
1656     if(url == null || url == ""){
1657     //������������������������
1658     continue;
1659     }
1660     }
1661     }
1662     }
1663    
1664     var title:String = selectedItems[i].dataGridColumn_videoName;
1665     var index:int = title.indexOf("\n");
1666     if(index != -1){
1667     //������������������������������������������������������������������������
1668     title = title.substring(0, index);
1669     }
1670    
1671     addItems.push(title);
1672     addPlayListItem(url, title);
1673     }
1674    
1675     }
1676    
1677     event.dragSource = new DragSource();
1678     event.dragSource.addData(addItems, "items");
1679     }
1680     }
1681    
1682     /**
1683     *
1684     * @param event
1685     *
1686     */
1687     public function playListClearButtonClicked(event:MouseEvent):void{
1688     resetPlayList();
1689     }
1690    
1691 mineap 476 public function playListShuffleButtonClicked(event:MouseEvent):void{
1692     shufflePlayList();
1693     }
1694    
1695 mineap 370 /**
1696     *
1697     * @param event
1698     *
1699     */
1700     public function playListItemDeleteButtonClicked(event:MouseEvent):void{
1701     var selectedIndices:Array = (dataGrid_playList as DataGrid).selectedIndices;
1702    
1703     for(var index:int = selectedIndices.length; index != 0; index--){
1704     removePlayListItem(selectedIndices[index-1]);
1705     }
1706     }
1707    
1708     /**
1709     *
1710     * @param event
1711     *
1712     */
1713     public function playListSaveButtonClicked(event:MouseEvent):void{
1714     //1.���������������������������������������������������������or���������������
1715     //2.���������������������������������������������
1716     //3.������������������������������������
1717     var urlArray:Array = new Array();
1718     var nameArray:Array = new Array();
1719     for each(var name:String in playListProvider){
1720     urlArray.push(videoUrlMap[name]);
1721     nameArray.push(name);
1722     }
1723    
1724     var isExist:Boolean = false;
1725     if(playListName != null){
1726     var playList:PlayList = PlayListManager.instance.isExist(playListName);
1727    
1728     if(playList != null){
1729     isExist = true;
1730     }
1731     }
1732    
1733     if(!isExist){
1734     // ���������������������������
1735     playerController.addNewPlayList(urlArray, nameArray);
1736     }else{
1737 mineap 652 FlexGlobals.topLevelApplication.activate();
1738 mineap 370 Alert.show("���������������������������(" + playListName + ")���������������������������\n���������������������������������������������������������������������������������������", Message.M_MESSAGE, Alert.YES | Alert.NO | Alert.CANCEL, null, function(event:CloseEvent):void{
1739     if(event.detail == Alert.YES){
1740     // ���������
1741     playerController.updatePlayList(playListName, urlArray, nameArray);
1742     }else if(event.detail == Alert.NO){
1743 mineap 652 // ���������������
1744 mineap 370 var title:String = playerController.addNewPlayList(urlArray, nameArray);
1745     label_playListTitle_dataProvider = title;
1746     }else{
1747    
1748     }
1749     });
1750    
1751     }
1752    
1753     }
1754    
1755     /**
1756     *
1757     * @param index
1758     *
1759     */
1760     public function showPlayingTitle(index:int):void{
1761     if(dataGrid_playList != null){
1762     (dataGrid_playList as DataGrid).scrollToIndex(index);
1763     (dataGrid_playList as DataGrid).selectedIndex = index;
1764     }else{
1765     canvas_playList.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
1766     (dataGrid_playList as DataGrid).scrollToIndex(index);
1767     (dataGrid_playList as DataGrid).selectedIndex = index;
1768     });
1769     }
1770     }
1771    
1772     /**
1773     *
1774     * @param event
1775     *
1776     */
1777     public function tagListDoubleClickEventHandler(event:ListEvent):void{
1778     if(event.itemRenderer.data != null){
1779     if(event.itemRenderer.data is String){
1780     var word:String = String(event.itemRenderer.data);
1781     Application.application.search(new SearchItem(word,
1782     SearchSortString.convertSortTypeFromIndex(4), SearchType.TAG, word));
1783     }
1784     }
1785     }
1786    
1787     /**
1788     *
1789     * @param event
1790     *
1791     */
1792     public function button_goToWebClicked(event:Event):void{
1793     this.playerController.watchOnWeb();
1794     }
1795    
1796     /**
1797     *
1798     * @param event
1799     *
1800     */
1801     public function tweet(event:Event):void{
1802     this.playerController.tweet();
1803     }
1804    
1805     /**
1806     *
1807     * @param event
1808     *
1809     */
1810     public function addHatenaBookmark(event:Event):void{
1811     this.playerController.addHatenaBookmark();
1812     }
1813    
1814     /**
1815     *
1816     * @param event
1817     *
1818     */
1819     public function openNicoSound(event:Event):void{
1820     this.playerController.openNicoSound();
1821     }
1822    
1823 mineap 808 public function openNicoStarSound(event:Event):void
1824     {
1825     this.playerController.openNicoStarSound();
1826     }
1827    
1828 mineap 370 /**
1829     *
1830     * @param event
1831     *
1832     */
1833     public function openNicomimi(event:Event):void{
1834     this.playerController.openNicomimi();
1835     }
1836    
1837     /**
1838     *
1839     * @param event
1840     *
1841     */
1842     public function button_addDownloadList(event:Event):void{
1843    
1844     this.playerController.addDlList();
1845    
1846     }
1847    
1848     /**
1849     *
1850     * @param event
1851     *
1852     */
1853     public function myListAddButtonClicked(event:Event):void{
1854     var selectedItem:Object = comboBox_mylist.selectedItem;
1855    
1856     if(selectedItem != null){
1857     var name:String = String(selectedItem);
1858     this.playerController.addMyList(myListMap[name]);
1859    
1860     }else{
1861    
1862     }
1863     }
1864    
1865     /**
1866     *
1867     * @param myListNames
1868     * @param myListNums
1869     *
1870     */
1871     public function setMyLists(myListNames:Array, myListNums:Array):void{
1872    
1873     var selectedIndex:int = comboBox_mylist.selectedIndex;
1874     var selectedName:String = myListDataProvider[selectedIndex];
1875    
1876     myListDataProvider = new Array();
1877     for(var i:int = 0; i<myListNames.length; i++){
1878     myListMap[myListNames[i]] = myListNums[i];
1879     myListDataProvider[i] = myListNames[i];
1880     if(selectedName == myListDataProvider[i]){
1881     selectedIndex = i;
1882     }
1883     }
1884    
1885     comboBox_mylist.dataProvider = myListDataProvider;
1886    
1887     if(myListDataProvider.length >= 1){
1888     comboBox_mylist.selectedIndex = 0;
1889     }
1890    
1891     comboBox_mylist.validateNow();
1892    
1893     if(selectedIndex == -1){
1894     var value:Object = ConfigManager.getInstance().getItem("infoViewSelectedMyListIndex");
1895     if(value != null){
1896     selectedIndex = int(value);
1897     }else{
1898     selectedIndex = 0;
1899     }
1900     }
1901     comboBox_mylist.selectedIndex = selectedIndex;
1902    
1903     }
1904    
1905     private function ownerTextLinkClicked(event:TextEvent):void{
1906 mineap 675 if (event.text.indexOf("mylist/") != -1)
1907     {
1908 mineap 370 // trace(event.text);
1909 mineap 675 FlexGlobals.topLevelApplication.renewMyList(event.text);
1910     }else if (event.text.indexOf("channel/") != -1)
1911     {
1912     FlexGlobals.topLevelApplication.renewMyList(event.text);
1913     }else if (event.text.indexOf("watch/") != -1)
1914     {
1915 mineap 370 var videoId:String = PathMaker.getVideoID(event.text);
1916     // trace(videoId);
1917     playerController.playMovie("http://www.nicovideo.jp/watch/" + videoId);
1918 mineap 675 }else
1919     {
1920 mineap 370 trace(event);
1921     }
1922     }
1923    
1924     private function playListReverseButtonClicked(event:Event):void{
1925     var tempArrayCollection:ArrayCollection = new ArrayCollection();
1926    
1927 mineap 786 var newIndex:int = -1;
1928     if (dataGrid_playList != null)
1929     {
1930     var selectedIndex:int = dataGrid_playList.selectedIndex;
1931     if (selectedIndex != -1)
1932     {
1933     newIndex = (playListProvider.length-1) - selectedIndex;
1934     }
1935     }
1936    
1937 mineap 370 for each(var object:Object in playListProvider){
1938     tempArrayCollection.addItemAt(object, 0);
1939     }
1940    
1941     playListProvider = tempArrayCollection;
1942 mineap 786
1943     if (dataGrid_playList != null && newIndex != -1)
1944     {
1945     dataGrid_playList.selectedIndex = newIndex;
1946     }
1947 mineap 370 }
1948    
1949     public function get playList():PlayList{
1950     var playList:PlayList = null;
1951    
1952     if(getPlayList().length > 0){
1953    
1954     playList = new PlayList();
1955    
1956     playList.name = playListName;
1957    
1958     for(var index:int = 0; index < (getPlayList() as Array).length; index++){
1959     var path:String = getPlayList()[index];
1960     var name:String = getNameList()[index];
1961     var nnddVideo:NNDDVideo = new NNDDVideo(path, name);
1962    
1963     playList.items.push(nnddVideo);
1964     }
1965     }
1966    
1967     return playList;
1968     }

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