|
|
var App = {
|
|
|
doc: null,
|
|
|
page1Count: 0,
|
|
|
pageCount: {
|
|
|
|
|
|
},
|
|
|
init_doc: function() {
|
|
|
this.doc = HYPE.documents[hype_name];
|
|
|
startLoading();
|
...
|
...
|
@@ -17,14 +19,54 @@ var App = { |
|
|
goSceneList: function() {
|
|
|
this.doc.showSceneNamed(`scene_1`, this.doc.kSceneTransitionPushLeftToRight, 0.8);
|
|
|
},
|
|
|
goToPlayVideo: function() {
|
|
|
$(`#scene_single_4_movie`)[0].play()
|
|
|
},
|
|
|
gotoNextPage: function(scene) {
|
|
|
console.log(scene);
|
|
|
if (!this.page1Count) {
|
|
|
this.page1Count += 1;
|
|
|
this.doc.startTimelineNamed('show_sub_action_timeline');
|
|
|
// console.log('scene==',scene);
|
|
|
let timelineName = '';
|
|
|
let sceneName = '';
|
|
|
|
|
|
switch (scene) {
|
|
|
case 'scene_single_1':
|
|
|
timelineName = 'show_goods_timeline_1';
|
|
|
sceneName = 'scene_single_1_2';
|
|
|
break;
|
|
|
|
|
|
case 'scene_single_2':
|
|
|
timelineName = 'show_goods_timeline_2';
|
|
|
sceneName = 'scene_single_2_2';
|
|
|
break;
|
|
|
|
|
|
case 'scene_single_3':
|
|
|
timelineName = 'show_goods_timeline_3';
|
|
|
sceneName = 'scene_single_3_2';
|
|
|
break;
|
|
|
|
|
|
case 'scene_single_4':
|
|
|
timelineName = 'show_goods_timeline_4';
|
|
|
sceneName = 'scene_single_4_2';
|
|
|
break;
|
|
|
|
|
|
case 'scene_single_5':
|
|
|
timelineName = 'show_goods_timeline_5';
|
|
|
sceneName = 'scene_single_5_2';
|
|
|
break;
|
|
|
|
|
|
case 'scene_single_6':
|
|
|
timelineName = 'show_goods_timeline_6';
|
|
|
sceneName = 'scene_single_6_2';
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
if (!this.pageCount[scene]) {
|
|
|
this.doc.startTimelineNamed(timelineName);
|
|
|
this.pageCount[scene] = true;
|
|
|
} else {
|
|
|
this.doc.showSceneNamed('scene_2', this.doc.kSceneTransitionPushRightToLeft, 0.8);
|
|
|
this.doc.showSceneNamed(sceneName, this.doc.kSceneTransitionPushRightToLeft, 0.8);
|
|
|
}
|
|
|
|
|
|
},
|
|
|
clearPageStatus: function(scene) {
|
|
|
this.pageCount[scene] = false;
|
|
|
}
|
|
|
}; |
|
|
}; |
|
|
\ No newline at end of file |
...
|
...
|
|