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

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