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 808 - (hide annotations) (download)
Wed May 2 05:31:56 2012 UTC (11 years, 11 months ago) by mineap
File size: 58971 byte(s)
NicoSound対応
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    
1165    
1166 mineap 370 confValue = ConfigManager.getInstance().getItem("relationSortIndex");
1167     if(confValue == null){
1168     //���������������
1169     }else{
1170     relationSortIndex = int(confValue);
1171     }
1172    
1173     confValue = ConfigManager.getInstance().getItem("relationOrderIndex");
1174     if(confValue == null){
1175     //���������������
1176     }else{
1177     relationOrderIndex = int(confValue);
1178     }
1179    
1180     confValue = ConfigManager.getInstance().getItem("isNgUpEnable");
1181     if(confValue == null){
1182     // ���������������
1183     }else{
1184     isNgUpEnable = ConfUtil.parseBoolean(confValue);
1185     }
1186    
1187 mineap 487 confValue = ConfigManager.getInstance().getItem("isSmoothing");
1188     if(confValue != null){
1189     isSmoothing = ConfUtil.parseBoolean(confValue);
1190     }
1191     if(playerController != null){
1192     playerController.setVideoSmoothing(this.isSmoothing);
1193     }
1194 mineap 439
1195 mineap 529 confValue = ConfigManager.getInstance().getItem("isSmoothingOnlyNotPixelIdenticalDimensions");
1196     if(confValue != null){
1197     isSmoothingOnlyNotPixelIdenticalDimensions = ConfUtil.parseBoolean(confValue);
1198     }
1199    
1200 mineap 498 confValue = ConfigManager.getInstance().getItem("playerQuality");
1201     if(confValue != null){
1202     playerQuality = int(confValue);
1203     }
1204     if(playerController != null){
1205     playerController.setPlayerQuality(this.playerQuality);
1206     }
1207 mineap 487
1208 mineap 498 confValue = ConfigManager.getInstance().getItem("isEnableWideMode");
1209     if(confValue != null){
1210     isEnableWideMode = ConfUtil.parseBoolean(confValue);
1211     }
1212    
1213 mineap 526 confValue = ConfigManager.getInstance().getItem("isFollowInfoViewHeight");
1214     if (confValue != null)
1215     {
1216     isFollowInfoViewHeight = ConfUtil.parseBoolean(confValue);
1217     }
1218    
1219 mineap 605 confValue = ConfigManager.getInstance().getItem("isNotPlayNicowari");
1220     if (confValue != null)
1221     {
1222     isNotPlayNicowari = ConfUtil.parseBoolean(confValue);
1223     }
1224    
1225 mineap 711 confValue = ConfigManager.getInstance().getItem("isOpenFileDialogWhenOpenPlayer");
1226     if (confValue != null)
1227     {
1228     this.isOpenFileDialogWhenOpenPlayer = ConfUtil.parseBoolean(confValue);
1229     }
1230    
1231 mineap 370 }catch(error:Error){
1232     trace(error.getStackTrace());
1233     Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1234     logManager.addLog(Message.FAIL_LOAD_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1235     }
1236    
1237     }
1238    
1239     public function saveStore():void{
1240    
1241     try{
1242    
1243     trace("saveStore_videoInfoView");
1244    
1245     /*������������������������������������*/
1246     ConfigManager.getInstance().removeItem("isPlayListRepeat");
1247     ConfigManager.getInstance().setItem("isPlayListRepeat", isPlayListRepeat);
1248    
1249     ConfigManager.getInstance().removeItem("isSyncComment");
1250     ConfigManager.getInstance().setItem("isSyncComment", isSyncComment);
1251    
1252     ConfigManager.getInstance().removeItem("isPlayerFollow");
1253     ConfigManager.getInstance().setItem("isPlayerFollow", isPlayerFollow);
1254    
1255     ConfigManager.getInstance().removeItem("isRenewCommentEachPlay");
1256     ConfigManager.getInstance().setItem("isRenewCommentEachPlay", isRenewCommentEachPlay);
1257    
1258     ConfigManager.getInstance().removeItem("isResizePlayerEachPlay");
1259     ConfigManager.getInstance().setItem("isResizePlayerEachPlay", isResizePlayerEachPlay);
1260    
1261     ConfigManager.getInstance().removeItem("isHideUnderController");
1262     ConfigManager.getInstance().setItem("isHideUnderController", isHideUnderController);
1263    
1264     // ������������������������������������
1265     ConfigManager.getInstance().removeItem("controllerWindowPosition_x");
1266     ConfigManager.getInstance().setItem("controllerWindowPosition_x", lastRect.x);
1267    
1268     ConfigManager.getInstance().removeItem("controllerWindowPosition_y");
1269     ConfigManager.getInstance().setItem("controllerWindowPosition_y", lastRect.y);
1270    
1271     ConfigManager.getInstance().removeItem("controllerWindowPosition_w");
1272     ConfigManager.getInstance().setItem("controllerWindowPosition_w", lastRect.width);
1273    
1274     ConfigManager.getInstance().removeItem("controllerWindowPosition_h");
1275     ConfigManager.getInstance().setItem("controllerWindowPosition_h", lastRect.height);
1276    
1277     ConfigManager.getInstance().removeItem("commentScale");
1278     ConfigManager.getInstance().setItem("commentScale", commentScale);
1279    
1280     ConfigManager.getInstance().removeItem("commentFps");
1281     ConfigManager.getInstance().setItem("commentFps", fps);
1282    
1283     ConfigManager.getInstance().removeItem("isShowOnlyPermissionComment");
1284     ConfigManager.getInstance().setItem("isShowOnlyPermissionComment", isShowOnlyPermissionComment);
1285    
1286     ConfigManager.getInstance().removeItem("showCommentCount");
1287 mineap 507 ConfigManager.getInstance().setItem("showCommentCount", showCommentCountPerMin);
1288 mineap 370
1289 mineap 507 ConfigManager.getInstance().removeItem("showOwnerCommentCount");
1290     ConfigManager.getInstance().setItem("showOwnerCommentCount", showOwnerCommentCountPerMin);
1291    
1292 mineap 370 ConfigManager.getInstance().removeItem("showCommentSec");
1293     ConfigManager.getInstance().setItem("showCommentSec", showCommentSec);
1294    
1295     ConfigManager.getInstance().removeItem("isRenewOtherCommentWithCommentEachPlay");
1296     ConfigManager.getInstance().setItem("isRenewOtherCommentWithCommentEachPlay", isRenewOtherCommentWithCommentEachPlay);
1297    
1298     ConfigManager.getInstance().removeItem("isAntiAlias");
1299     ConfigManager.getInstance().setItem("isAntiAlias", isAntiAlias);
1300    
1301     ConfigManager.getInstance().removeItem("commentAlpha");
1302     ConfigManager.getInstance().setItem("commentAlpha", commentAlpha);
1303    
1304     ConfigManager.getInstance().removeItem("isEnableJump");
1305     ConfigManager.getInstance().setItem("isEnableJump", isEnableJump);
1306    
1307     ConfigManager.getInstance().removeItem("isAskToUserOnJump");
1308     ConfigManager.getInstance().setItem("isAskToUserOnJump", isAskToUserOnJump);
1309    
1310     ConfigManager.getInstance().removeItem("isInfoViewAlwaysFront");
1311     ConfigManager.getInstance().setItem("isInfoViewAlwaysFront", isInfoViewAlwaysFront);
1312    
1313     ConfigManager.getInstance().removeItem("selectedResizeType");
1314     ConfigManager.getInstance().setItem("selectedResizeType", selectedResizeType);
1315    
1316     ConfigManager.getInstance().removeItem("isCommentFontBold");
1317     ConfigManager.getInstance().setItem("isCommentFontBold", isCommentFontBold);
1318    
1319     ConfigManager.getInstance().removeItem("isShowAlwaysNicowariArea");
1320     ConfigManager.getInstance().setItem("isShowAlwaysNicowariArea", isShowAlwaysNicowariArea);
1321    
1322     ConfigManager.getInstance().removeItem("isAlwaysEconomyForStreaming");
1323     ConfigManager.getInstance().setItem("isAlwaysEconomyForStreaming", isAlwaysEconomyForStreaming);
1324    
1325     ConfigManager.getInstance().removeItem("isHideTagArea");
1326     ConfigManager.getInstance().setItem("isHideTagArea", isHideTagArea);
1327    
1328     ConfigManager.getInstance().removeItem("isAppendComment");
1329     ConfigManager.getInstance().setItem("isAppendComment", isAppendComment);
1330    
1331     ConfigManager.getInstance().removeItem("isHideSekaShinComment");
1332     ConfigManager.getInstance().setItem("isHideSekaShinComment", isHideSekaShinComment);
1333    
1334     ConfigManager.getInstance().removeItem("isShowHTMLOwnerComment");
1335     ConfigManager.getInstance().setItem("isShowHTMLOwnerComment", isShowHTMLOwnerComment);
1336    
1337     ConfigManager.getInstance().removeItem("relationSortIndex");
1338     ConfigManager.getInstance().setItem("relationSortIndex", relationSortIndex);
1339    
1340     ConfigManager.getInstance().removeItem("relationOrderIndex");
1341     ConfigManager.getInstance().setItem("relationSortIndex", relationSortIndex);
1342    
1343     ConfigManager.getInstance().removeItem("isNgUpEnable");
1344     ConfigManager.getInstance().setItem("isNgUpEnable", isNgUpEnable);
1345    
1346 mineap 487 ConfigManager.getInstance().removeItem("isSmoothing");
1347     ConfigManager.getInstance().setItem("isSmoothing",isSmoothing);
1348    
1349 mineap 529 ConfigManager.getInstance().removeItem("isSmoothingOnlyNotPixelIdenticalDimensions");
1350     ConfigManager.getInstance().setItem("isSmoothingOnlyNotPixelIdenticalDimensions", isSmoothingOnlyNotPixelIdenticalDimensions);
1351    
1352 mineap 498 ConfigManager.getInstance().removeItem("playerQuality");
1353     ConfigManager.getInstance().setItem("playerQuality", playerQuality);
1354    
1355     ConfigManager.getInstance().removeItem("isEnableWideMode");
1356     ConfigManager.getInstance().setItem("isEnableWideMode", isEnableWideMode);
1357    
1358 mineap 799 ConfigManager.getInstance().removeItem("useOldVersionVideoSize");
1359     ConfigManager.getInstance().setItem("useOldVersionVideoSize", useOldVersionVideoSize);
1360    
1361 mineap 526 ConfigManager.getInstance().removeItem("isFollowInfoViewHeight");
1362     ConfigManager.getInstance().setItem("isFollowInfoViewHeight", isFollowInfoViewHeight);
1363    
1364 mineap 605 ConfigManager.getInstance().removeItem("isNotPlayNicowari");
1365     ConfigManager.getInstance().setItem("isNotPlayNicowari", isNotPlayNicowari);
1366    
1367 mineap 628
1368     /* DataGrid��������������� */
1369     if (dataGrid_comment != null)
1370     {
1371     DataGridColumnWidthUtil.save(dataGrid_comment, new Vector.<String>("mail_column"));
1372     }
1373    
1374     if (dataGrid_oldComment != null)
1375     {
1376     DataGridColumnWidthUtil.save(dataGrid_oldComment, new Vector.<String>("mail_column"));
1377     }
1378    
1379 mineap 711 ConfigManager.getInstance().removeItem("isOpenFileDialogWhenOpenPlayer");
1380     ConfigManager.getInstance().setItem("isOpenFileDialogWhenOpenPlayer", isOpenFileDialogWhenOpenPlayer);
1381 mineap 628
1382 mineap 370 ConfigManager.getInstance().save();
1383    
1384     }catch(error:Error){
1385     Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1386     logManager.addLog(Message.FAIL_SAVE_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1387     trace(error.getStackTrace());
1388     }
1389    
1390     }
1391    
1392     public function resetWindowPosition():void{
1393     // ������������������������������������
1394     try{
1395    
1396     // ������������������������������������������������������������
1397     ConfigManager.getInstance().removeItem("controllerWindowPosition_x");
1398     ConfigManager.getInstance().setItem("controllerWindowPosition_x", 0);
1399    
1400     ConfigManager.getInstance().removeItem("controllerWindowPosition_y");
1401     ConfigManager.getInstance().setItem("controllerWindowPosition_y", 0);
1402    
1403     ConfigManager.getInstance().removeItem("controllerWindowPosition_w");
1404     ConfigManager.getInstance().setItem("controllerWindowPosition_w", 400);
1405    
1406     ConfigManager.getInstance().removeItem("controllerWindowPosition_h");
1407     ConfigManager.getInstance().setItem("controllerWindowPosition_h", 580);
1408    
1409     ConfigManager.getInstance().save();
1410    
1411     this.readStore();
1412    
1413     }catch(error:Error){
1414     Alert.show(Message.M_CONF_FILE_IS_BROKEN, Message.M_ERROR);
1415     logManager.addLog(Message.FAIL_SAVE_CONF_FILE_FOR_VIDEO_INFO_VIEW + ":" + Message.M_CONF_FILE_IS_BROKEN + ":" + ConfigManager.getInstance().confFileNativePath + ":" + error);
1416     trace(error.getStackTrace());
1417     }
1418    
1419     if(this.nativeWindow != null && !(this as Window).closed){
1420    
1421     this.visible = true;
1422    
1423     this.nativeWindow.x = 0;
1424     this.nativeWindow.y = 0;
1425    
1426     this.width = 380;
1427     this.height = 520;
1428     }
1429     }
1430    
1431     /**
1432     *
1433     * @param urlList
1434     * @param videoNameList
1435     * @param playListName
1436     */
1437     public function setPlayList(urlList:Array, videoNameList:Array, playListName:String):void{
1438    
1439     this.playListName = playListName;
1440     label_playListTitle_dataProvider = playListName;
1441    
1442     for each(var title:String in videoNameList){
1443     playListProvider.addItem(title);
1444     }
1445    
1446     for(var index:int = 0; index<urlList.length; index++){
1447     videoUrlMap[videoNameList[index]] = urlList[index];
1448     }
1449    
1450     if(this.dataGrid_playList != null){
1451     // (dataGrid_playList as DataGrid).validateDisplayList();
1452     }
1453     }
1454    
1455     /**
1456     *
1457     * @param url
1458     * @param title
1459     *
1460     */
1461     public function addPlayListItem(url:String, title:String):void{
1462    
1463     videoUrlMap[title] = url;
1464    
1465     }
1466    
1467     /**
1468     *
1469     * @param url
1470     * @param title
1471     * @param index
1472     *
1473     */
1474     public function addPlayListItemWithList(url:String, title:String, index:int):void{
1475     playListProvider.addItemAt(title,index);
1476    
1477     addPlayListItem(url, title);
1478    
1479     if(this.dataGrid_playList != null){
1480     (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1481     (dataGrid_playList as DataGrid).validateDisplayList();
1482     }
1483    
1484     }
1485    
1486    
1487     /**
1488     *
1489     * @param title
1490     * @param index
1491     *
1492     */
1493     public function removePlayListItem(index:int):void{
1494     var title:String = String(playListProvider.removeItemAt(index));
1495    
1496     //���������������������������������������������������������������
1497     for each(var videoName:String in playListProvider){
1498     if(title == videoName){
1499     //������������������videoUrlMap���������������������
1500     return;
1501     }
1502     }
1503     //���������������������videoUrlMap������������
1504     videoUrlMap[title] = null;
1505    
1506     if(this.dataGrid_playList != null){
1507     (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1508     (dataGrid_playList as DataGrid).validateDisplayList();
1509     }
1510     }
1511    
1512     /**
1513     *
1514     * @return
1515     *
1516     */
1517     public function getPlayList():Array{
1518     var array:Array = new Array();
1519     for(var i:int = 0; i<playListProvider.length; i++){
1520     array.push(String(playListProvider[i]));
1521     }
1522    
1523     var returnArray:Array = new Array();
1524    
1525     for each(var title:String in array){
1526     returnArray.push(videoUrlMap[title]);
1527     }
1528    
1529     return returnArray;
1530     }
1531    
1532     /**
1533     * ���������������������������������������������������������������
1534     * @return
1535     *
1536     */
1537     public function getNameList():Array{
1538     var array:Array = new Array();
1539     for(var i:int = 0; i<playListProvider.length; i++){
1540     array.push(String(playListProvider[i]));
1541     }
1542    
1543     return array;
1544     }
1545    
1546     /**
1547     *
1548     *
1549     */
1550     public function resetPlayList():void{
1551     this.playListName = "";
1552     if(label_playListTitle != null){
1553     label_playListTitle.text = playListName;
1554     }else{
1555     canvas_videoInfo.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
1556     canvas_playList.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
1557     label_playListTitle.text = playListName;
1558     });
1559     });
1560     }
1561    
1562     videoUrlMap = new Object();
1563    
1564     playListProvider.removeAll();
1565    
1566     if(this.dataGrid_playList != null){
1567     (dataGrid_playList as DataGrid).dataProvider = playListProvider;
1568     (dataGrid_playList as DataGrid).validateDisplayList();
1569     (dataGrid_playList as DataGrid).validateNow();
1570     }
1571     }
1572    
1573     /**
1574 mineap 476 * ���������������������������������������������
1575 mineap 370 *
1576 mineap 476 * @details edvakf���������������������������
1577     * @see https://github.com/edvakf/NNDDMOD/commit/6984ba8919727a98c249e1bc8a4848705de27df5
1578     */
1579     public function shufflePlayList():void{
1580 mineap 786
1581     var selectedObject:Object = null;
1582     if (dataGrid_playList != null)
1583     {
1584     selectedObject = dataGrid_playList.selectedItem;
1585     }
1586    
1587 mineap 476 var tempArrayCollection:ArrayCollection = new ArrayCollection();
1588     for each(var object:Object in playListProvider){
1589     tempArrayCollection.addItem(object);
1590     }
1591     var i:int = tempArrayCollection.length;
1592     while (--i) {
1593     var j:int = Math.floor( Math.random() * (i + 1) );
1594     if (i == j) {
1595     continue;
1596     }
1597     var object:Object = tempArrayCollection.getItemAt(i);
1598     tempArrayCollection.setItemAt( tempArrayCollection.getItemAt(j), i );
1599     tempArrayCollection.setItemAt( object, j );
1600     }
1601     playListProvider = tempArrayCollection;
1602 mineap 786
1603     if (dataGrid_playList != null && selectedObject != null)
1604     {
1605     dataGrid_playList.selectedItem = selectedObject;
1606     }
1607 mineap 476 }
1608    
1609     /**
1610     *
1611 mineap 370 * @param index
1612     * @return
1613     *
1614     */
1615     public function getPlayListUrl(index:int):String{
1616     var videoTitle:String = playListProvider[index];
1617    
1618     return videoUrlMap[videoTitle];
1619     }
1620    
1621     /**
1622     *
1623     * @param event
1624     *
1625     */
1626     public function playListDragDropHandler(event:DragEvent):void{
1627     if(event.dragInitiator == dataGrid_playList){
1628    
1629     //���������������(������������������������������������������)
1630    
1631     }else{
1632    
1633     //DataGrid���������Drag������������������������������
1634    
1635     if(event.dragInitiator as DataGrid){
1636     var selectedItems:Array = (event.dragInitiator as DataGrid).selectedItems;
1637     var addItems:Array = new Array();
1638    
1639     for(var i:int=0; i<selectedItems.length; i++){
1640    
1641     //������������������������
1642     var url:String = selectedItems[i].dataGridColumn_videoPath;
1643     if(url == null || url == ""){
1644     //��������������� or ���������videoPath���������������������
1645     url = selectedItems[i].dataGridColumn_nicoVideoUrl;
1646    
1647     if(url == null || url == ""){
1648     //������������������������������
1649     url = selectedItems[i].dataGridColumn_videoLocalPath;
1650    
1651     if(url == null || url == ""){
1652     //������������������videoLocalPath���������������������
1653     url = selectedItems[i].dataGridColumn_videoUrl;
1654    
1655     if(url == null || url == ""){
1656     //������������������������
1657     continue;
1658     }
1659     }
1660     }
1661     }
1662    
1663     var title:String = selectedItems[i].dataGridColumn_videoName;
1664     var index:int = title.indexOf("\n");
1665     if(index != -1){
1666     //������������������������������������������������������������������������
1667     title = title.substring(0, index);
1668     }
1669    
1670     addItems.push(title);
1671     addPlayListItem(url, title);
1672     }
1673    
1674     }
1675    
1676     event.dragSource = new DragSource();
1677     event.dragSource.addData(addItems, "items");
1678     }
1679     }
1680    
1681     /**
1682     *
1683     * @param event
1684     *
1685     */
1686     public function playListClearButtonClicked(event:MouseEvent):void{
1687     resetPlayList();
1688     }
1689    
1690 mineap 476 public function playListShuffleButtonClicked(event:MouseEvent):void{
1691     shufflePlayList();
1692     }
1693    
1694 mineap 370 /**
1695     *
1696     * @param event
1697     *
1698     */
1699     public function playListItemDeleteButtonClicked(event:MouseEvent):void{
1700     var selectedIndices:Array = (dataGrid_playList as DataGrid).selectedIndices;
1701    
1702     for(var index:int = selectedIndices.length; index != 0; index--){
1703     removePlayListItem(selectedIndices[index-1]);
1704     }
1705     }
1706    
1707     /**
1708     *
1709     * @param event
1710     *
1711     */
1712     public function playListSaveButtonClicked(event:MouseEvent):void{
1713     //1.���������������������������������������������������������or���������������
1714     //2.���������������������������������������������
1715     //3.������������������������������������
1716     var urlArray:Array = new Array();
1717     var nameArray:Array = new Array();
1718     for each(var name:String in playListProvider){
1719     urlArray.push(videoUrlMap[name]);
1720     nameArray.push(name);
1721     }
1722    
1723     var isExist:Boolean = false;
1724     if(playListName != null){
1725     var playList:PlayList = PlayListManager.instance.isExist(playListName);
1726    
1727     if(playList != null){
1728     isExist = true;
1729     }
1730     }
1731    
1732     if(!isExist){
1733     // ���������������������������
1734     playerController.addNewPlayList(urlArray, nameArray);
1735     }else{
1736 mineap 652 FlexGlobals.topLevelApplication.activate();
1737 mineap 370 Alert.show("���������������������������(" + playListName + ")���������������������������\n���������������������������������������������������������������������������������������", Message.M_MESSAGE, Alert.YES | Alert.NO | Alert.CANCEL, null, function(event:CloseEvent):void{
1738     if(event.detail == Alert.YES){
1739     // ���������
1740     playerController.updatePlayList(playListName, urlArray, nameArray);
1741     }else if(event.detail == Alert.NO){
1742 mineap 652 // ���������������
1743 mineap 370 var title:String = playerController.addNewPlayList(urlArray, nameArray);
1744     label_playListTitle_dataProvider = title;
1745     }else{
1746    
1747     }
1748     });
1749    
1750     }
1751    
1752     }
1753    
1754     /**
1755     *
1756     * @param index
1757     *
1758     */
1759     public function showPlayingTitle(index:int):void{
1760     if(dataGrid_playList != null){
1761     (dataGrid_playList as DataGrid).scrollToIndex(index);
1762     (dataGrid_playList as DataGrid).selectedIndex = index;
1763     }else{
1764     canvas_playList.addEventListener(FlexEvent.CREATION_COMPLETE, function(event:FlexEvent):void{
1765     (dataGrid_playList as DataGrid).scrollToIndex(index);
1766     (dataGrid_playList as DataGrid).selectedIndex = index;
1767     });
1768     }
1769     }
1770    
1771     /**
1772     *
1773     * @param event
1774     *
1775     */
1776     public function tagListDoubleClickEventHandler(event:ListEvent):void{
1777     if(event.itemRenderer.data != null){
1778     if(event.itemRenderer.data is String){
1779     var word:String = String(event.itemRenderer.data);
1780     Application.application.search(new SearchItem(word,
1781     SearchSortString.convertSortTypeFromIndex(4), SearchType.TAG, word));
1782     }
1783     }
1784     }
1785    
1786     /**
1787     *
1788     * @param event
1789     *
1790     */
1791     public function button_goToWebClicked(event:Event):void{
1792     this.playerController.watchOnWeb();
1793     }
1794    
1795     /**
1796     *
1797     * @param event
1798     *
1799     */
1800     public function tweet(event:Event):void{
1801     this.playerController.tweet();
1802     }
1803    
1804     /**
1805     *
1806     * @param event
1807     *
1808     */
1809     public function addHatenaBookmark(event:Event):void{
1810     this.playerController.addHatenaBookmark();
1811     }
1812    
1813     /**
1814     *
1815     * @param event
1816     *
1817     */
1818     public function openNicoSound(event:Event):void{
1819     this.playerController.openNicoSound();
1820     }
1821    
1822 mineap 808 public function openNicoStarSound(event:Event):void
1823     {
1824     this.playerController.openNicoStarSound();
1825     }
1826    
1827 mineap 370 /**
1828     *
1829     * @param event
1830     *
1831     */
1832     public function openNicomimi(event:Event):void{
1833     this.playerController.openNicomimi();
1834     }
1835    
1836     /**
1837     *
1838     * @param event
1839     *
1840     */
1841     public function button_addDownloadList(event:Event):void{
1842    
1843     this.playerController.addDlList();
1844    
1845     }
1846    
1847     /**
1848     *
1849     * @param event
1850     *
1851     */
1852     public function myListAddButtonClicked(event:Event):void{
1853     var selectedItem:Object = comboBox_mylist.selectedItem;
1854    
1855     if(selectedItem != null){
1856     var name:String = String(selectedItem);
1857     this.playerController.addMyList(myListMap[name]);
1858    
1859     }else{
1860    
1861     }
1862     }
1863    
1864     /**
1865     *
1866     * @param myListNames
1867     * @param myListNums
1868     *
1869     */
1870     public function setMyLists(myListNames:Array, myListNums:Array):void{
1871    
1872     var selectedIndex:int = comboBox_mylist.selectedIndex;
1873     var selectedName:String = myListDataProvider[selectedIndex];
1874    
1875     myListDataProvider = new Array();
1876     for(var i:int = 0; i<myListNames.length; i++){
1877     myListMap[myListNames[i]] = myListNums[i];
1878     myListDataProvider[i] = myListNames[i];
1879     if(selectedName == myListDataProvider[i]){
1880     selectedIndex = i;
1881     }
1882     }
1883    
1884     comboBox_mylist.dataProvider = myListDataProvider;
1885    
1886     if(myListDataProvider.length >= 1){
1887     comboBox_mylist.selectedIndex = 0;
1888     }
1889    
1890     comboBox_mylist.validateNow();
1891    
1892     if(selectedIndex == -1){
1893     var value:Object = ConfigManager.getInstance().getItem("infoViewSelectedMyListIndex");
1894     if(value != null){
1895     selectedIndex = int(value);
1896     }else{
1897     selectedIndex = 0;
1898     }
1899     }
1900     comboBox_mylist.selectedIndex = selectedIndex;
1901    
1902     }
1903    
1904     private function ownerTextLinkClicked(event:TextEvent):void{
1905 mineap 675 if (event.text.indexOf("mylist/") != -1)
1906     {
1907 mineap 370 // trace(event.text);
1908 mineap 675 FlexGlobals.topLevelApplication.renewMyList(event.text);
1909     }else if (event.text.indexOf("channel/") != -1)
1910     {
1911     FlexGlobals.topLevelApplication.renewMyList(event.text);
1912     }else if (event.text.indexOf("watch/") != -1)
1913     {
1914 mineap 370 var videoId:String = PathMaker.getVideoID(event.text);
1915     // trace(videoId);
1916     playerController.playMovie("http://www.nicovideo.jp/watch/" + videoId);
1917 mineap 675 }else
1918     {
1919 mineap 370 trace(event);
1920     }
1921     }
1922    
1923     private function playListReverseButtonClicked(event:Event):void{
1924     var tempArrayCollection:ArrayCollection = new ArrayCollection();
1925    
1926 mineap 786 var newIndex:int = -1;
1927     if (dataGrid_playList != null)
1928     {
1929     var selectedIndex:int = dataGrid_playList.selectedIndex;
1930     if (selectedIndex != -1)
1931     {
1932     newIndex = (playListProvider.length-1) - selectedIndex;
1933     }
1934     }
1935    
1936 mineap 370 for each(var object:Object in playListProvider){
1937     tempArrayCollection.addItemAt(object, 0);
1938     }
1939    
1940     playListProvider = tempArrayCollection;
1941 mineap 786
1942     if (dataGrid_playList != null && newIndex != -1)
1943     {
1944     dataGrid_playList.selectedIndex = newIndex;
1945     }
1946 mineap 370 }
1947    
1948     public function get playList():PlayList{
1949     var playList:PlayList = null;
1950    
1951     if(getPlayList().length > 0){
1952    
1953     playList = new PlayList();
1954    
1955     playList.name = playListName;
1956    
1957     for(var index:int = 0; index < (getPlayList() as Array).length; index++){
1958     var path:String = getPlayList()[index];
1959     var name:String = getNameList()[index];
1960     var nnddVideo:NNDDVideo = new NNDDVideo(path, name);
1961    
1962     playList.items.push(nnddVideo);
1963     }
1964     }
1965    
1966     return playList;
1967     }

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