Menu
The effect is as follows:
1, the production of several graphics and film components as display components.
2, the main scene on the first frame:
MN Boolean switch
var mn = false;
Store four button coordinate initial values
var positionm0y = m0._y;
var positionm1y = m1._y;
var positionm2y = m2._y;
var positionm3y = m3._y;
V Move Speed
var v = 5;
Set Menu Name
var myarraytitle1 = new Array ("School of Excellence", "Chinese Heaven and Earth", "The Kingdom of Mathematics", "English World");
var myarraytitle2 = new Array ("Top Leadership", "Classical Poetry", "Logical Reasoning", "Memory Secret");
var myarraytitle3 = new Array ("Teacher Team", "Modern Literature", "Mathematical Application", "spoken venues");
Onenterframe = function () {
for (var i = 0; i<=3; i++) {
Assignment Display Menu Name
_root["M" +i].t.text = Myarraytitle1[i];
_root["M" +i].mm.tt.text = Myarraytitle2[i];
_root["M" +i].mmm.ttt.text = Myarraytitle3[i];
Dot Gray small button retraction
_root["m" +i].b1.onpress = function () {
This._parent.gotoandplay ("Gogo");
};
Dot Green small button retraction
_root["m" +i].b2.onpress = function () {
This._parent.gotoandplay ("Gogo");
};
}
//........... The following are logical judgments ...
... dan....****** if the m0********** is clicked
if (MN = = "M0") {
The position of the M0 is unchanged; M1, M2, M3 move down.
m0._y = positionm0y;
m1._y = M1._y+v;
m2._y = M2._y+v;
m3._y = M3._y+v;
M1, M2, M3 internal small button retraction concealment
M1.gotoandstop ("Start0");
M2.gotoandstop ("Start0");
M3.gotoandstop ("Start0");
M1, M2, M3 on the right triangle returns the initial state
M1.jiao.gotoAndStop ("N1");
M2.jiao.gotoAndStop ("N1");
M3.jiao.gotoAndStop ("N1");
If the M3 arrives at the specified position, M1, M2, M3 stop the movement
if (m3._y>=195) {
m1._y = 136.5;
m2._y = 166.5;
m3._y = 195.5;
}
//********************************************
//..... To the same extent as ... Dan .........
else if (MN = = "M1") {
m1._y = positionm1y;
m2._y = M2._y+v;
m3._y = M3._y+v;
M0.gotoandstop ("Start0");
M2.gotoandstop ("Start0");
M3.gotoandstop ("Start0");
M0.jiao.gotoAndStop ("N1");
M2.jiao.gotoAndStop ("N1");
M3.jiao.gotoAndStop ("N1");
if (m3._y>=194) {
m2._y = 164.5;
m3._y = 194.5;
}
else if (mn = = "M2") {
m2._y = positionm2y;
m1._y = positionm1y;
m3._y = M3._y+v;
M0.gotoandstop ("Start0");
M1.gotoandstop ("Start0");
M3.gotoandstop ("Start0");
M0.jiao.gotoAndStop ("N1");
M1.jiao.gotoAndStop ("N1");
M3.jiao.gotoAndStop ("N1");
if (m3._y>=194) {
m3._y = 194.5;
}
else if (MN = = "M3") {
m1._y = positionm1y;
m2._y = positionm2y;
m3._y = positionm3y;
M0.gotoandstop ("Start0");
M1.gotoandstop ("Start0");
M2.gotoandstop ("Start0");
M0.jiao.gotoAndStop ("N1");
M1.jiao.gotoAndStop ("N1");
M2.jiao.gotoAndStop ("N1");
//..... The above above ... dan ...........
~~~~~~~~~~~~~~~~~~~~~ If you don't click on any button ~~~~~~~~~~~~~~~~~~~
else if (!mn) {
M1, M2, M3 back to the original position.
m0._y = positionm0y;
m1._y = positionm1y;
m2._y = positionm2y;
m3._y = positionm3y;
M1, M2, M3 internal small button retraction concealment
M0.gotoandstop ("Start0");
M1.gotoandstop ("Start0");
M2.gotoandstop ("Start0");
M3.gotoandstop ("Start0");
}
};