Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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