/** * Created by can on 15/7/15. */ var imageData = [ {name: "bj", path: basePath + "bj.jpg" }, {name: "bulk", path: basePath + "bulk.png" }, {name: "next", path: basePath + "next.png" }, {name: "Q10_10", path: basePath + "Q10_10.png" }, {name: "Q10_a", path: basePath + "Q10_a.png" }, {name: "Q10_b", path: basePath + "Q10_b.png" }, {name: "Q10_c", path: basePath + "Q10_c.png" }, {name: "Q10_d", path: basePath + "Q10_d.png" }, {name: "Q10_答案正确", path: basePath + "Q10_答案正确.png" }, {name: "Q10_答案错误", path: basePath + "Q10_答案错误.png" }, {name: "Q1_1", path: basePath + "Q1_1.png" }, {name: "Q1_a", path: basePath + "Q1_a.png" }, {name: "Q1_b", path: basePath + "Q1_b.png" }, {name: "Q1_c", path: basePath + "Q1_c.png" }, {name: "Q1_d", path: basePath + "Q1_d.png" }, {name: "Q1_答案正确", path: basePath + "Q1_答案正确.png" }, {name: "Q1_答案错误", path: basePath + "Q1_答案错误.png" }, {name: "Q2_2", path: basePath + "Q2_2.png" }, {name: "Q2_a", path: basePath + "Q2_a.png" }, {name: "Q2_b", path: basePath + "Q2_b.png" }, {name: "Q2_c", path: basePath + "Q2_c.png" }, {name: "Q2_d", path: basePath + "Q2_d.png" }, {name: "Q2_答案正确", path: basePath + "Q2_答案正确.png" }, {name: "Q2_答案错误", path: basePath + "Q2_答案错误.png" }, {name: "Q3_3", path: basePath + "Q3_3.png" }, {name: "Q3_a", path: basePath + "Q3_a.png" }, {name: "Q3_b", path: basePath + "Q3_b.png" }, {name: "Q3_c", path: basePath + "Q3_c.png" }, {name: "Q3_d", path: basePath + "Q3_d.png" }, {name: "Q3_答案正确", path: basePath + "Q3_答案正确.png" }, {name: "Q3_答案错误", path: basePath + "Q3_答案错误.png" }, {name: "Q4_4", path: basePath + "Q4_4.png" }, {name: "Q4_a", path: basePath + "Q4_a.png" }, {name: "Q4_b", path: basePath + "Q4_b.png" }, {name: "Q4_c", path: basePath + "Q4_c.png" }, {name: "Q4_d", path: basePath + "Q4_d.png" }, {name: "Q4_答案正确", path: basePath + "Q4_答案正确.png" }, {name: "Q4_答案错误", path: basePath + "Q4_答案错误.png" }, {name: "Q5_5", path: basePath + "Q5_5.png" }, {name: "Q5_a", path: basePath + "Q5_a.png" }, {name: "Q5_b", path: basePath + "Q5_b.png" }, {name: "Q5_c", path: basePath + "Q5_c.png" }, {name: "Q5_d", path: basePath + "Q5_d.png" }, {name: "Q5_答案正确", path: basePath + "Q5_答案正确.png" }, {name: "Q5_答案错误", path: basePath + "Q5_答案错误.png" }, {name: "Q6_6", path: basePath + "Q6_6.png" }, {name: "Q6_a", path: basePath + "Q6_a.png" }, {name: "Q6_b", path: basePath + "Q6_b.png" }, {name: "Q6_c", path: basePath + "Q6_c.png" }, {name: "Q6_d", path: basePath + "Q6_d.png" }, {name: "Q6_答案正确", path: basePath + "Q6_答案正确.png" }, {name: "Q6_答案错误", path: basePath + "Q6_答案错误.png" }, {name: "Q7_7", path: basePath + "Q7_7.png" }, {name: "Q7_a", path: basePath + "Q7_a.png" }, {name: "Q7_b", path: basePath + "Q7_b.png" }, {name: "Q7_c", path: basePath + "Q7_c.png" }, {name: "Q7_d", path: basePath + "Q7_d.png" }, {name: "Q7_答案正确", path: basePath + "Q7_答案正确.png" }, {name: "Q7_答案错误", path: basePath + "Q7_答案错误.png" }, {name: "Q8_8", path: basePath + "Q8_8.png" }, {name: "Q8_a", path: basePath + "Q8_a.png" }, {name: "Q8_b", path: basePath + "Q8_b.png" }, {name: "Q8_c", path: basePath + "Q8_c.png" }, {name: "Q8_d", path: basePath + "Q8_d.png" }, {name: "Q8_答案正确", path: basePath + "Q8_答案正确.png" }, {name: "Q8_答案错误", path: basePath + "Q8_答案错误.png" }, {name: "Q9_9", path: basePath + "Q9_9.png" }, {name: "Q9_a", path: basePath + "Q9_a.png" }, {name: "Q9_b", path: basePath + "Q9_b.png" }, {name: "Q9_c", path: basePath + "Q9_c.png" }, {name: "Q9_d", path: basePath + "Q9_d.png" }, {name: "Q9_答案正确", path: basePath + "Q9_答案正确.png" }, {name: "Q9_答案错误", path: basePath + "Q9_答案错误.png" }, {name: "rightbulk", path: basePath + "rightbulk.png" }, {name: "wbulk", path: basePath + "wbulk.png" }, {name: "welcome", path: basePath + "welcome.jpg" }, {name: "over", path: basePath + "over.jpg" }, {name: "over2", path: basePath + "over2.jpg" }, {name: "share", path: basePath + "share.png" }, {name: "start", path: basePath + "start.png" } ]; for(var i=0;i= pages.length) { curr_index=pages.length-1; over(); return; } if (curr_index < 0) { curr_index = 0; return; } transition_in = true; LGlobal.setFrameRate(1000/60); var transObj = range > 0 ? transObj1 : transObj2; transObj.onComplete = function (child) { child.x = child.y = 0; child.alpha = child.alpha = 1; child.scaleX = child.scaleY = 1; transition_in = false; LGlobal.setFrameRate(1000/25); } var layer; if (layer1.is_front) { layer = layer2; bgLayer.setChildIndex(layer2, 1); bgLayer.setChildIndex(layer1, 0); layer1.is_front = false; layer2.is_front = true; } else { layer = layer1; bgLayer.setChildIndex(layer1, 1); bgLayer.setChildIndex(layer2, 0); layer1.is_front = true; layer2.is_front = false; } layer.removeAllChild(); layer.addChild(create_page(curr_index)); LTransitionManager.start(layer, transObj); } function create_page(index) { var layer = new LSprite(); var config = getPages()[index]; //addElements(config, layer); layer.addChild(new Question(config)); return layer; }