質問編集履歴
1
全体的に編集
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Air NativeWindowクラス
|
1
|
+
Air NativeWindowクラスでつくった3つのウィンドウのmp4(動画)を同じタイミングで再生したい
|
test
CHANGED
@@ -1,125 +1,17 @@
|
|
1
1
|
AnimateとActionScript3を用いて、airファイルを作っているのですが、
|
2
2
|
|
3
|
-
3つのウィンドウを 3つのマルチディスプレイに全画面表示させる
|
3
|
+
3つのウィンドウを 3つのマルチディスプレイに全画面表示させるところまではできました。
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
-
|
7
|
+
キー1をおすと1の動画が始まる、2キーだと2が、といったかんじなのですが、
|
8
8
|
|
9
|
-
関係ありそうな部分を抜粋してみましたが、いかがでしょうか?
|
10
|
-
|
11
|
-
```ここに言語を入力
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
// ウィンドウ①設定
|
16
|
-
|
17
|
-
_meterWindow = stage.nativeWindow;
|
18
|
-
|
19
|
-
_meterWindow.x = lastPositionX;
|
20
|
-
|
21
|
-
_meterWindow.y = lastPositionY;
|
22
|
-
|
23
|
-
_meterWindow.activate();
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
var wakuW:Number = _meterWindow.width - stage.stageWidth;
|
28
|
-
|
29
|
-
var wakuH:Number = _meterWindow.height - stage.stageHeight;
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
// ウィンドウ②作成
|
34
|
-
|
35
|
-
var windowOptions:NativeWindowInitOptions = new NativeWindowInitOptions();windowOptions
|
36
|
-
|
37
|
-
windowOptions.systemChrome = NativeWindowSystemChrome.STANDARD;
|
38
|
-
|
39
|
-
windowOptions.type = NativeWindowType.NORMAL;
|
40
|
-
|
41
|
-
windowOptions.renderMode = NativeWindowRenderMode.DIRECT
|
42
|
-
|
43
|
-
_videoWindow = new NativeWindow(windowOptions);
|
44
|
-
|
45
|
-
_videoWindow.width = 1920 + wakuW;
|
46
|
-
|
47
|
-
|
9
|
+
毎回、再生のタイミングが0.2秒ほどずれてしまいます(ぴったり合うときもある)
|
48
10
|
|
49
11
|
|
50
12
|
|
51
|
-
|
13
|
+
ローディングクラス?など、何か使用して、タイミングを合わせることは可能でしょうか?
|
52
14
|
|
53
|
-
_videoWindow.stage.scaleMode = StageScaleMode.NO_SCALE;
|
54
15
|
|
55
|
-
_videoWindow.stage.color = 0x000000;
|
56
|
-
|
57
|
-
_videoWindow.activate();
|
58
|
-
|
59
|
-
```
|
60
|
-
|
61
|
-
```ここに言語を入力
|
62
|
-
|
63
|
-
// マルチスクリーン環境?
|
64
|
-
|
65
|
-
if (1 < Screen.screens.length)
|
66
|
-
|
67
|
-
{
|
68
|
-
|
69
|
-
var meterWindowX:int = Screen.mainScreen.bounds.x;
|
70
|
-
|
71
|
-
var meterWindowY:int = Screen.mainScreen.bounds.y;
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
for (var i:int = 0; i < Screen.screens.length; i++)
|
76
|
-
|
77
|
-
{
|
78
|
-
|
79
|
-
trace("Screen.screens[", i, "]", Screen.screens[i].bounds);
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
if (Screen.screens[i] != Screen.mainScreen)
|
84
|
-
|
85
|
-
{
|
86
|
-
|
87
|
-
meterWindowX = Screen.screens[i].bounds.x;
|
88
|
-
|
89
|
-
meterWindowY = Screen.screens[i].bounds.y;
|
90
|
-
|
91
|
-
break;
|
92
|
-
|
93
|
-
}
|
94
|
-
|
95
|
-
}
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
// ウィンドウ①をメインスクリーン外へ
|
100
|
-
|
101
|
-
_meterWindow.x = meterWindowX;//Screen.mainScreen.bounds.width;
|
102
|
-
|
103
|
-
_meterWindow.y = meterWindowY;//0;
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
// ウィンドウ①をフルスクリーン化
|
108
|
-
|
109
|
-
_videoWindow.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
// ビデオビューを画面にフィット
|
114
|
-
|
115
|
-
_videoView.width = Screen.mainScreen.bounds.width;
|
116
|
-
|
117
|
-
_videoView.height = Screen.mainScreen.bounds.height;
|
118
|
-
|
119
|
-
}
|
120
|
-
|
121
|
-
}
|
122
|
-
|
123
|
-
```
|
124
16
|
|
125
17
|
ご教示宜しくお願い致します。
|