teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

6

テストページをセキュリティ上削除させていただきました。

2020/06/26 05:02

投稿

miwmiw
miwmiw

スコア1

title CHANGED
File without changes
body CHANGED
@@ -4,17 +4,6 @@
4
4
  ・仕様としては、ページに複数のボタンがあり、マウスオーバーでバルーンの説明が出て、クリックするとページ遷移するというものです。
5
5
  ・タッチデバイスの場合は一度タッチしてバルーンが表示され、表示されている状態であれば遷移するという仕組みです。
6
6
 
7
-
8
-
9
- 6/25
10
- [テストページ](http://yohk.jp/test/test.html)
11
-
12
- 6/26
13
- [テストページ2](http://yohk.jp/test/test2.html)
14
-
15
- [テストページ3](http://yohk.jp/test/test3.html)
16
-
17
- [テストページ4](http://yohk.jp/test/test4.html)
18
7
  ### 発生している問題・エラーメッセージ
19
8
  ・IE11でjabascriptが正常に動作しません。
20
9
  ・IE11以外はほとんどのブラウザで動作に問題なし。(Windows-Edge、chrome、firefox/Mac-safari、iPadOS-safari)

5

更新しました。まだ解決できておりません。

2020/06/26 05:02

投稿

miwmiw
miwmiw

スコア1

title CHANGED
File without changes
body CHANGED
@@ -14,6 +14,7 @@
14
14
 
15
15
  [テストページ3](http://yohk.jp/test/test3.html)
16
16
 
17
+ [テストページ4](http://yohk.jp/test/test4.html)
17
18
  ### 発生している問題・エラーメッセージ
18
19
  ・IE11でjabascriptが正常に動作しません。
19
20
  ・IE11以外はほとんどのブラウザで動作に問題なし。(Windows-Edge、chrome、firefox/Mac-safari、iPadOS-safari)
@@ -40,10 +41,10 @@
40
41
  <head>
41
42
  <meta charset="UTF-8">
42
43
  <meta name="authoring-tool" content="Adobe_Animate_CC">
43
- <title>test3</title>
44
+ <title>test4</title>
44
45
  <!-- write your code here -->
45
- <script type="text/javascript" src="http://ie.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=BBLx_qliXB-Dk5al9fe2Ho--l9wDK_GqK8TEUWME6nkkInMo4jVI_PRanwyBVB1U" charset="UTF-8"></script><link rel="stylesheet" crossorigin="anonymous" href="http://ie.kis.v2.scr.kaspersky-labs.com/E3E8934C-235A-4B0E-825A-35A08381A191/abn/main.css?attr=aHR0cDovL3lvaGsuanAvdGVzdC90ZXN0My5odG1s"/><script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
46
- <script src="test3.js"></script>
46
+ <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
47
+ <script src="test4.js"></script>
47
48
  <script>
48
49
  var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation;
49
50
  function init() {

4

keys対策をjsの64行目に記載しました。

2020/06/26 02:36

投稿

miwmiw
miwmiw

スコア1

title CHANGED
File without changes
body CHANGED
@@ -12,6 +12,8 @@
12
12
  6/26
13
13
  [テストページ2](http://yohk.jp/test/test2.html)
14
14
 
15
+ [テストページ3](http://yohk.jp/test/test3.html)
16
+
15
17
  ### 発生している問題・エラーメッセージ
16
18
  ・IE11でjabascriptが正常に動作しません。
17
19
  ・IE11以外はほとんどのブラウザで動作に問題なし。(Windows-Edge、chrome、firefox/Mac-safari、iPadOS-safari)
@@ -38,26 +40,11 @@
38
40
  <head>
39
41
  <meta charset="UTF-8">
40
42
  <meta name="authoring-tool" content="Adobe_Animate_CC">
41
- <title>test2</title>
43
+ <title>test3</title>
42
44
  <!-- write your code here -->
43
- <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
44
- <script src="test2.js"></script>
45
+ <script type="text/javascript" src="http://ie.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=BBLx_qliXB-Dk5al9fe2Ho--l9wDK_GqK8TEUWME6nkkInMo4jVI_PRanwyBVB1U" charset="UTF-8"></script><link rel="stylesheet" crossorigin="anonymous" href="http://ie.kis.v2.scr.kaspersky-labs.com/E3E8934C-235A-4B0E-825A-35A08381A191/abn/main.css?attr=aHR0cDovL3lvaGsuanAvdGVzdC90ZXN0My5odG1s"/><script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
46
+ <script src="test3.js"></script>
45
47
  <script>
46
- // Global Scripts
47
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
48
- /*keys対策*/
49
- if(!Object.keys){
50
- Object.keys = function(obj){
51
- var keys = [];
52
- for(var i in obj){
53
- if(obj.hasOwnProperty(i)){
54
- keys.push(i);
55
- }
56
- }
57
- return keys;
58
- };
59
- }</script>
60
- <script>
61
48
  var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation;
62
49
  function init() {
63
50
  canvas = document.getElementById("canvas");

3

メタタグ、keys対策をグローバルの記述箇所にうつしたものをアップし直してみました。

2020/06/26 01:15

投稿

miwmiw
miwmiw

スコア1

title CHANGED
File without changes
body CHANGED
@@ -6,9 +6,12 @@
6
6
 
7
7
 
8
8
 
9
-
9
+ 6/25
10
10
  [テストページ](http://yohk.jp/test/test.html)
11
11
 
12
+ 6/26
13
+ [テストページ2](http://yohk.jp/test/test2.html)
14
+
12
15
  ### 発生している問題・エラーメッセージ
13
16
  ・IE11でjabascriptが正常に動作しません。
14
17
  ・IE11以外はほとんどのブラウザで動作に問題なし。(Windows-Edge、chrome、firefox/Mac-safari、iPadOS-safari)
@@ -35,11 +38,26 @@
35
38
  <head>
36
39
  <meta charset="UTF-8">
37
40
  <meta name="authoring-tool" content="Adobe_Animate_CC">
38
- <title>test</title>
41
+ <title>test2</title>
39
42
  <!-- write your code here -->
40
43
  <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
41
- <script src="test.js"></script>
44
+ <script src="test2.js"></script>
42
45
  <script>
46
+ // Global Scripts
47
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
48
+ /*keys対策*/
49
+ if(!Object.keys){
50
+ Object.keys = function(obj){
51
+ var keys = [];
52
+ for(var i in obj){
53
+ if(obj.hasOwnProperty(i)){
54
+ keys.push(i);
55
+ }
56
+ }
57
+ return keys;
58
+ };
59
+ }</script>
60
+ <script>
43
61
  var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation;
44
62
  function init() {
45
63
  canvas = document.getElementById("canvas");

2

タイトルが間違っていたので修正しました。

2020/06/26 00:13

投稿

miwmiw
miwmiw

スコア1

title CHANGED
@@ -1,1 +1,1 @@
1
- IE11でjabascriptが正常に動作しません。
1
+ IE11でjavascriptが正常に動作しません。
body CHANGED
File without changes

1

パブリッシュされたそのままのjsとhtmlをアップいたしました。長くてすみません。

2020/06/25 11:55

投稿

miwmiw
miwmiw

スコア1

title CHANGED
File without changes
body CHANGED
@@ -3,9 +3,12 @@
3
3
  ・AnimateCCからパブリッシュしたHTML5canvasです。
4
4
  ・仕様としては、ページに複数のボタンがあり、マウスオーバーでバルーンの説明が出て、クリックするとページ遷移するというものです。
5
5
  ・タッチデバイスの場合は一度タッチしてバルーンが表示され、表示されている状態であれば遷移するという仕組みです。
6
- テストページ
7
- http://yohk.jp/test/test.html
8
6
 
7
+
8
+
9
+
10
+ [テストページ](http://yohk.jp/test/test.html)
11
+
9
12
  ### 発生している問題・エラーメッセージ
10
13
  ・IE11でjabascriptが正常に動作しません。
11
14
  ・IE11以外はほとんどのブラウザで動作に問題なし。(Windows-Edge、chrome、firefox/Mac-safari、iPadOS-safari)
@@ -16,113 +19,82 @@
16
19
  ### 該当のソースコード
17
20
 
18
21
  ```javascript
22
+ そのままでは長すぎてアップできませんでした。
23
+ ```
24
+ ```html
25
+ <!DOCTYPE html>
26
+ <!--
27
+ NOTES:
28
+ 1. All tokens are represented by '$' sign in the template.
29
+ 2. You can write your code only wherever mentioned.
30
+ 3. All occurrences of existing tokens will be replaced by their appropriate values.
31
+ 4. Blank lines will be removed automatically.
32
+ 5. Remove unnecessary comments before creating your template.
33
+ -->
34
+ <html>
35
+ <head>
36
+ <meta charset="UTF-8">
37
+ <meta name="authoring-tool" content="Adobe_Animate_CC">
38
+ <title>test</title>
39
+ <!-- write your code here -->
40
+ <script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
41
+ <script src="test.js"></script>
42
+ <script>
43
+ var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation;
19
- var _this = this;
44
+ function init() {
20
- _this.stop();
21
-
22
- /*隠すアイテム*/
45
+ canvas = document.getElementById("canvas");
46
+ anim_container = document.getElementById("animation_container");
47
+ dom_overlay_container = document.getElementById("dom_overlay_container");
48
+ var comp=AdobeAn.getComposition("5FDE7BC209A410479D9DAFAC7D0A4B75");
23
- _this.t01.visible = false;
49
+ var lib=comp.getLibrary();
24
- _this.t02.visible = false;
25
- _this.t03.visible = false;
26
-
27
- /*タッチデバイス判定*/
28
- var isTouchSupported = createjs.Touch.isSupported();
50
+ var loader = new createjs.LoadQueue(false);
51
+ loader.addEventListener("fileload", function(evt){handleFileLoad(evt,comp)});
52
+ loader.addEventListener("complete", function(evt){handleComplete(evt,comp)});
29
- if (isTouchSupported) {
53
+ var lib=comp.getLibrary();
30
- stage.enableMouseOver(0);
54
+ loader.loadManifest(lib.properties.manifest);
31
- } else {
32
- stage.enableMouseOver(3);
33
55
  }
34
-
35
- /*ボタン挙動*/
36
-
37
- var displayedBalloon = null;
38
-
39
- this.btn01.addEventListener("click", btn_mc_event01);
40
- function btn_mc_event01(eventObject) {
56
+ function handleFileLoad(evt, comp) {
41
- if (isTouchSupported) {
57
+ var img=comp.getImages();
42
- if (_this.t01.visible) {
43
- _this.t01.visible = false;
44
- displayedBalloon = null;
45
- location.href = "01.html";
58
+ if (evt && (evt.item.type == "image")) { img[evt.item.id] = evt.result; }
46
- } else {
47
- if (displayedBalloon != null) {
48
- displayedBalloon.visible = false;
49
- }
50
- _this.t01.visible = true;
51
- displayedBalloon = _this.t01;
52
- }
53
- } else {
54
- _this.t01.visible = false;
55
- location.href = "01.html";
56
- }
57
59
  }
58
-
59
- this.btn02.addEventListener("click", btn_mc_event02);
60
- function btn_mc_event02(eventObject) {
60
+ function handleComplete(evt,comp) {
61
+ //This function is always called, irrespective of the content. You can use the variable "stage" after it is created in token create_stage.
61
- if (isTouchSupported) {
62
+ var lib=comp.getLibrary();
62
- if (_this.t02.visible) {
63
+ var ss=comp.getSpriteSheet();
63
- _this.t02.visible = false;
64
- displayedBalloon = null;
65
- location.href = "02.html";
64
+ var queue = evt.target;
66
- } else {
67
- if (displayedBalloon != null) {
68
- displayedBalloon.visible = false;
69
- }
70
- _this.t02.visible = true;
71
- displayedBalloon = _this.t02;
65
+ var ssMetadata = lib.ssMetadata;
72
- }
73
- } else {
74
- _this.t02.visible = false;
75
- location.href = "02.html";
66
+ for(i=0; i<ssMetadata.length; i++) {
67
+ ss[ssMetadata[i].name] = new createjs.SpriteSheet( {"images": [queue.getResult(ssMetadata[i].name)], "frames": ssMetadata[i].frames} )
76
68
  }
69
+ exportRoot = new lib.test0625();
70
+ stage = new lib.Stage(canvas);
71
+ stage.enableMouseOver();
72
+ //Registers the "tick" event listener.
73
+ fnStartAnimation = function() {
74
+ stage.addChild(exportRoot);
75
+ createjs.Ticker.framerate = lib.properties.fps;
76
+ createjs.Ticker.addEventListener("tick", stage);
77
+ }
78
+ //Code to support hidpi screens and responsive scaling.
79
+ AdobeAn.makeResponsive(false,'both',false,1,[canvas,anim_container,dom_overlay_container]);
80
+ AdobeAn.compositionLoaded(lib.properties.id);
81
+ fnStartAnimation();
77
82
  }
83
+ </script>
84
+ <!-- write your code here -->
85
+ </head>
86
+ <body onload="init();" style="margin:0px;">
87
+ <div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:1024px; height:768px">
88
+ <canvas id="canvas" width="1024" height="768" style="position: absolute; display: block; background-color:rgba(255, 255, 255, 1.00);"></canvas>
89
+ <div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:1024px; height:768px; position: absolute; left: 0px; top: 0px; display: block;">
90
+ </div>
91
+ </div>
92
+ </body>
93
+ </html>
94
+ ```
78
95
 
79
- this.btn03.addEventListener("click", btn_mc_event03);
80
- function btn_mc_event03(eventObject) {
81
- if (isTouchSupported) {
82
- if (_this.t03.visible) {
83
- _this.t03.visible = false;
84
- displayedBalloon = null;
85
- location.href = "03.html";
86
- } else {
87
- if (displayedBalloon != null) {
88
- displayedBalloon.visible = false;
89
- }
90
- _this.t03.visible = true;
91
- displayedBalloon = _this.t03;
92
- }
93
- } else {
94
- _this.t03.visible = false;
95
- location.href = "03.html";
96
- }
97
- }
98
96
 
99
- /*バルーン表示*/
100
- _this.btn01.on('mouseover', function () {
101
- _this.t01.visible = true;
102
- });
103
97
 
104
- _this.btn01.on('mouseout', function () {
105
- _this.t01.visible = false;
106
- });
107
-
108
- _this.btn02.on('mouseover', function () {
109
- _this.t02.visible = true;
110
- });
111
-
112
- _this.btn02.on('mouseout', function () {
113
- _this.t02.visible = false;
114
- });
115
-
116
- _this.btn03.on('mouseover', function () {
117
- _this.t03.visible = true;
118
- });
119
-
120
- _this.btn03.on('mouseout', function () {
121
- _this.t03.visible = false;
122
- });
123
-
124
- ```
125
-
126
98
  ### 試したこと
127
99
 
128
100
  ・IE11がjavascript有効になっているかどうか