Lift

Published on December 2016 | Categories: Documents | Downloads: 96 | Comments: 0 | Views: 623
of 18
Download PDF   Embed   Report

Comments

Content


function init_fl()
{
stdlt1 = "OFF";
stdlt2 = "OFF";
stdlt3 = "OFF";
stdlt4 = "OFF";
stdlt5 = "OFF";
stllt2u = "OFF";
stllt3u = "OFF";
stllt4u = "OFF";
stllt2d = "OFF";
stllt3d = "OFF";
stllt4d = "OFF";
statuslift = "free";
statuspintu = "tutup";
posisilift = 1;
statusmesin = "stop";
liftspeed = 20;
display_view();
about_mc._visible = false;
} // End of the function
function clearAllInt()
{
clearInterval(JALAN);
clearInterval(delay1);
clearInterval(delay2);
clearInterval(delay3);
clearInterval(bukaInt);
clearInterval(tutupInt);
} // End of the function
function reset_door()
{
dalam_mc.p_kanan._x = 0;
dalam_mc.p_kiri._x = -105;
pintu_slide.lt1_mc.p_kanan._x = 0;
pintu_slide.lt2_mc.p_kanan._x = 0;
pintu_slide.lt3_mc.p_kanan._x = 0;
pintu_slide.lt4_mc.p_kanan._x = 0;
pintu_slide.lt5_mc.p_kanan._x = 0;
pintu_slide.lt1_mc.p_kiri._x = -105;
pintu_slide.lt2_mc.p_kiri._x = -105;
pintu_slide.lt3_mc.p_kiri._x = -105;
pintu_slide.lt4_mc.p_kiri._x = -105;
pintu_slide.lt5_mc.p_kiri._x = -105;
} // End of the function
function reset_lift()
{
lift_mc._y = 476;
dalam_mc.lt1_btn.gotoAndStop(1);
dalam_mc.lt2_btn.gotoAndStop(1);
dalam_mc.lt3_btn.gotoAndStop(1);
dalam_mc.lt4_btn.gotoAndStop(1);
dalam_mc.lt5_btn.gotoAndStop(1);
pintu_slide.lt1up_btn.gotoAndStop(1);
pintu_slide.lt2up_btn.gotoAndStop(1);
pintu_slide.lt3up_btn.gotoAndStop(1);
pintu_slide.lt4up_btn.gotoAndStop(1);
pintu_slide.lt2dn_btn.gotoAndStop(1);
pintu_slide.lt3dn_btn.gotoAndStop(1);
pintu_slide.lt4dn_btn.gotoAndStop(1);
pintu_slide.lt5dn_btn.gotoAndStop(1);
} // End of the function
function flip_turun()
{
if (stllt2d == "ON")
{
stdlt2 = "ON";
} // end if
if (stllt3d == "ON")
{
stdlt3 = "ON";
} // end if
if (stllt4d == "ON")
{
stdlt4 = "ON";
} // end if
trace ("flipturun");
} // End of the function
function flip_naik()
{
if (stllt2u == "ON")
{
stdlt2 = "ON";
} // end if
if (stllt3u == "ON")
{
stdlt3 = "ON";
} // end if
if (stllt4u == "ON")
{
stdlt4 = "ON";
} // end if
trace ("flipnaik");
} // End of the function
function get_statuslift()
{
display_view();
switch (lift_mc._y)
{
case 476:
{
posisilift = 1;
if (stdlt1 == "ON")
{
stdlt1 = "OFF";
pintu_slide.lt1up_btn.gotoAndStop(1);
dalam_mc.lt1_btn.gotoAndStop(1);
statusmesin = "stop";
flip_naik();
} // end if
if (stdlt1 == "OFF" && stdlt2 == "OFF" && stdlt3 == "OFF" && stdlt4
== "OFF" && stdlt5 == "OFF")
{
statuslift = "free";
}
else if (stdlt2 == "ON" || stdlt3 == "ON" || stdlt4 == "ON" || stdlt
5 == "ON")
{
statuslift = "naik";
}
else
{
diluarkondisi();
} // end else if
break;
}
case 358:
{
posisilift = 2;
if (stdlt2 == "ON")
{
stdlt2 = "OFF";
dalam_mc.lt2_btn.gotoAndStop(1);
statusmesin = "stop";
if ((statuslift == "free" || statuslift == "turun") && stdlt1 ==
"OFF")
{
trace ("memenuhi4");
stllt2u = "OFF";
pintu_slide.lt2up_btn.gotoAndStop(1);
} // end if
if ((statuslift == "free" || statuslift == "naik") && (stdlt3 ==
"OFF" && stdlt4 == "OFF" && stdlt5 == "OFF"))
{
trace ("memenuhi3");
stllt2d = "OFF";
pintu_slide.lt2dn_btn.gotoAndStop(1);
} // end if
if (statuslift == "naik" || statuslift == "free")
{
trace ("memenuhi2");
stllt2u = "OFF";
pintu_slide.lt2up_btn.gotoAndStop(1);
} // end if
if (statuslift == "turun" || statuslift == "free")
{
trace ("memenuhi1");
stllt2d = "OFF";
pintu_slide.lt2dn_btn.gotoAndStop(1);
} // end if
if ((statuslift == "naik" || statuslift == "free") && (stdlt3 ==
"OFF" && stdlt4 == "OFF" && stdlt5 == "OFF"))
{
flip_turun();
}
else if ((statuslift == "turun" || statuslift == "free") && stdl
t1 == "OFF")
{
flip_naik();
} // end if
} // end else if
if (stdlt1 == "OFF" && stdlt2 == "OFF" && stdlt3 == "OFF" && stdlt4
== "OFF" && stdlt5 == "OFF")
{
statuslift = "free";
}
else if ((statuslift == "free" || statuslift == "turun") && stdlt1 =
= "ON")
{
statuslift = "turun";
}
else if ((statuslift == "free" || statuslift == "naik") && (stdlt3 =
= "ON" || stdlt4 == "ON" || stdlt5 == "ON"))
{
statuslift = "naik";
}
else if (statuslift == "naik" && stdlt1 == "ON" && stdlt3 == "OFF" &
& stdlt4 == "OFF" && stdlt5 == "OFF")
{
statuslift = "turun";
}
else if (statuslift == "turun" && stdlt1 == "OFF" && (stdlt3 == "ON"
|| stdlt4 == "ON" || stdlt5 == "ON"))
{
statuslift = "naik";
}
else
{
diluarkondisi();
trace ("LT1");
} // end else if
break;
}
case 241:
{
posisilift = 3;
if (stdlt3 == "ON")
{
stdlt3 = "OFF";
dalam_mc.lt3_btn.gotoAndStop(1);
statusmesin = "stop";
if ((statuslift == "free" || statuslift == "turun") && (stdlt1 =
= "OFF" || stdlt2 == "OFF"))
{
trace ("memenuhi3");
stllt3u = "OFF";
pintu_slide.lt3up_btn.gotoAndStop(1);
} // end if
if ((statuslift == "free" || statuslift == "naik") && (stdlt4 ==
"OFF" || stdlt5 == "OFF"))
{
trace ("memenuhi2");
stllt3d = "OFF";
pintu_slide.lt3dn_btn.gotoAndStop(1);
} // end if
if (statuslift == "naik" || statuslift == "free")
{
trace ("memenuhi");
stllt3u = "OFF";
pintu_slide.lt3up_btn.gotoAndStop(1);
} // end if
if (statuslift == "turun" || statuslift == "free")
{
trace ("memenuhi");
stllt3d = "OFF";
pintu_slide.lt3dn_btn.gotoAndStop(1);
} // end if
if ((statuslift == "naik" || statuslift == "free") && (stdlt4 ==
"OFF" && stdlt5 == "OFF"))
{
flip_turun();
}
else if ((statuslift == "turun" || statuslift == "free") && (std
lt1 == "OFF" && stdlt2 == "OFF"))
{
flip_naik();
} // end if
} // end else if
if (stdlt1 == "OFF" && stdlt2 == "OFF" && stdlt3 == "OFF" && stdlt4
== "OFF" && stdlt5 == "OFF")
{
statuslift = "free";
}
else if ((statuslift == "free" || statuslift == "turun") && (stdlt1
== "ON" || stdlt2 == "ON"))
{
statuslift = "turun";
}
else if ((statuslift == "free" || statuslift == "naik") && (stdlt4 =
= "ON" || stdlt5 == "ON"))
{
statuslift = "naik";
}
else if (statuslift == "naik" && (stdlt1 == "ON" || stdlt2 == "ON")
&& (stdlt4 == "OFF" && stdlt5 == "OFF"))
{
statuslift = "turun";
flip_turun();
}
else if (statuslift == "turun" && (stdlt1 == "OFF" && stdlt2 == "OFF
") && (stdlt4 == "ON" || stdlt5 == "ON"))
{
statuslift = "naik";
flip_naik();
}
else
{
diluarkondisi();
} // end else if
break;
}
case 124:
{
posisilift = 4;
if (stdlt4 == "ON")
{
stdlt4 = "OFF";
dalam_mc.lt4_btn.gotoAndStop(1);
statusmesin = "stop";
if ((statuslift == "free" || statuslift == "turun") && (stdlt1 =
= "OFF" && stdlt2 == "OFF" && stdlt3 == "OFF"))
{
trace ("memenuhi3");
stllt4u = "OFF";
pintu_slide.lt4up_btn.gotoAndStop(1);
} // end if
if ((statuslift == "free" || statuslift == "naik") && stdlt5 ==
"OFF")
{
trace ("memenuhi2");
stllt4d = "OFF";
pintu_slide.lt4dn_btn.gotoAndStop(1);
} // end if
if (statuslift == "naik" || statuslift == "free")
{
trace ("memenuhi");
stllt4u = "OFF";
pintu_slide.lt4up_btn.gotoAndStop(1);
} // end if
if (statuslift == "turun" || statuslift == "free")
{
trace ("memenuhi");
stllt4d = "OFF";
pintu_slide.lt4dn_btn.gotoAndStop(1);
} // end if
if ((statuslift == "naik" || statuslift == "free") && stdlt5 ==
"OFF")
{
flip_turun();
}
else if ((statuslift == "turun" || statuslift == "free") && (std
lt1 == "OFF" && stdlt2 == "OFF" && stdlt3 == "OFF"))
{
flip_naik();
} // end if
} // end else if
if (stdlt1 == "OFF" && stdlt2 == "OFF" && stdlt3 == "OFF" && stdlt4
== "OFF" && stdlt5 == "OFF")
{
statuslift = "free";
}
else if ((statuslift == "free" || statuslift == "turun") && (stdlt1
== "ON" || stdlt2 == "ON" || stdlt3 == "ON"))
{
statuslift = "turun";
}
else if ((statuslift == "free" || statuslift == "naik") && stdlt5 ==
"ON")
{
statuslift = "naik";
}
else if (statuslift == "naik" && (stdlt1 == "ON" || stdlt2 == "ON" |
| stdlt3 == "ON") && stdlt5 == "OFF")
{
statuslift = "turun";
flip_turun();
}
else if (statuslift == "turun" && (stdlt1 == "OFF" && stdlt2 == "OFF
" && stdlt3 == "OFF") && stdlt5 == "ON")
{
statuslift = "naik";
flip_naik();
}
else
{
diluarkondisi();
} // end else if
break;
}
case 7:
{
posisilift = 5;
if (stdlt5 == "ON")
{
stdlt5 = "OFF";
stllt5d = "OFF";
pintu_slide.lt5dn_btn.gotoAndStop(1);
dalam_mc.lt5_btn.gotoAndStop(1);
statusmesin = "stop";
flip_turun();
} // end if
if (stdlt1 == "OFF" && stdlt2 == "OFF" && stdlt3 == "OFF" && stdlt4
== "OFF" && stdlt5 == "OFF")
{
statuslift = "free";
}
else if (stdlt1 == "ON" || stdlt2 == "ON" || stdlt3 == "ON" || stdlt
4 == "ON")
{
statuslift = "turun";
} // end else if
break;
}
} // End of switch
} // End of the function
function start_up()
{
if (posisilift == 1 && stdlt1 == "ON" || posisilift == 2 && stdlt2 == "ON" |
| posisilift == 3 && stdlt3 == "ON" || posisilift == 4 && stdlt4 == "ON" || posi
silift == 5 && stdlt5 == "ON")
{
trace ("STARTUP IF");
}
else
{
get_statuslift();
trace ("STARTUP ELSE");
} // end else if
if ((statusmesin == "off" || statuslift == "free") && statuspintu == "tutup"
)
{
JALAN = setInterval(running, liftspeed);
statusmesin = "run";
trace ("run");
} // end if
} // End of the function
function ulang()
{
get_statuslift();
if (statusmesin == "stop" && statuspintu == "tutup")
{
clearInterval(JALAN);
delay1 = setInterval(delay1_func, 2000);
trace ("liftStop");
tingtong_wav.play();
get_statuslift();
statuspintu = "sedangbuka";
} // end if
} // End of the function
function lanjut()
{
trace ("lanjut..(GLOBAL)");
clearInterval(delay3);
if (posisilift == 1 && stdlt1 == "ON" || posisilift == 2 && stdlt2 == "ON" |
| posisilift == 3 && stdlt3 == "ON" || posisilift == 4 && stdlt4 == "ON" || posi
silift == 5 && stdlt5 == "ON")
{
ulang();
trace ("lanjut..(IF)");
}
else
{
"lanjut..(ELSE)";
get_statuslift();
if (!(statuslift == "free" || statusmesin == "run") && statuspintu == "t
utup")
{
trace ("lanjut..");
JALAN = setInterval(running, liftspeed);
statusmesin = "run";
} // end if
} // end else if
} // End of the function
function running()
{
flip2();
get_statuslift();
if (statusmesin == "run" && statuslift == "naik")
{
lift_mc._y = lift_mc._y - 1;
}
else if (statusmesin == "run" && statuslift == "turun")
{
lift_mc._y = lift_mc._y + 1;
}
else if (statusmesin == "stop")
{
clearInterval(JALAN);
delay1 = setInterval(delay1_func, 2000);
trace ("liftStop");
get_statuslift();
statuspintu = "sedangbuka";
if (s_stat == "ON")
{
tingtong_wav.play();
} // end if
dalam_mc.run2_view.gotoAndPlay(2);
}
else if (statuslift == "free")
{
} // end else if
} // End of the function
function delay1_func()
{
clearInterval(delay1);
bukaInt = setInterval(buka_pintu, 30);
trace ("sedang buka pintu");
lift_mc.pd.gotoAndStop(2);
dop_dop();
if (s_stat == "ON")
{
buka_wav.play();
} // end if
} // End of the function
function buka_pintu()
{
getstatuslift();
dalam_mc.p_kanan._x = dalam_mc.p_kanan._x + 1;
dalam_mc.p_kiri._x = dalam_mc.p_kiri._x - 1;
if (dalam_mc.p_kanan._x >= 82 || dalam_mc.p_kiri._x <= -189)
{
statuspintu = "buka";
clearInterval(bukaInt);
if (holdpintu != "ON")
{
delay2 = setInterval(delay2_func, pintudelay);
} // end if
lift_mc.pd.gotoAndStop(3);
dalam_mc.open_btn.gotoAndStop(1);
dop_buka();
} // end if
switch (posisilift)
{
case 1:
{
pintu_slide.lt1_mc.p_kanan._x = pintu_slide.lt1_mc.p_kanan._x + 1;
pintu_slide.lt1_mc.p_kiri._x = pintu_slide.lt1_mc.p_kiri._x - 1;
break;
}
case 2:
{
pintu_slide.lt2_mc.p_kanan._x = pintu_slide.lt2_mc.p_kanan._x + 1;
pintu_slide.lt2_mc.p_kiri._x = pintu_slide.lt2_mc.p_kiri._x - 1;
break;
}
case 3:
{
pintu_slide.lt3_mc.p_kanan._x = pintu_slide.lt3_mc.p_kanan._x + 1;
pintu_slide.lt3_mc.p_kiri._x = pintu_slide.lt3_mc.p_kiri._x - 1;
break;
}
case 4:
{
pintu_slide.lt4_mc.p_kanan._x = pintu_slide.lt4_mc.p_kanan._x + 1;
pintu_slide.lt4_mc.p_kiri._x = pintu_slide.lt4_mc.p_kiri._x - 1;
break;
}
case 5:
{
pintu_slide.lt5_mc.p_kanan._x = pintu_slide.lt5_mc.p_kanan._x + 1;
pintu_slide.lt5_mc.p_kiri._x = pintu_slide.lt5_mc.p_kiri._x - 1;
break;
}
} // End of switch
} // End of the function
function delay2_func()
{
clearInterval(delay2);
if (holdpintu != "ON")
{
tutupInt = setInterval(tutup_pintu, 30);
} // end if
trace ("sedang tutup pintu");
lift_mc.pd.gotoAndStop(2);
dop_dop();
if (s_stat == "ON")
{
tutup_wav.play();
} // end if
loop2 = "OFF";
} // End of the function
function tutup_pintu()
{
getstatuslift();
statuspintu = "sedangtutup";
dalam_mc.p_kanan._x = dalam_mc.p_kanan._x - 1;
dalam_mc.p_kiri._x = dalam_mc.p_kiri._x + 1;
if (dalam_mc.p_kanan._x <= 0 || dalam_mc.p_kiri._x >= -105)
{
trace ("clearINTtutup");
statuspintu = "tutup";
dalam_mc.close_btn.gotoAndStop(1);
clearInterval(tutupInt);
delay3 = setInterval(lanjut, 2000);
lift_mc.pd.gotoAndStop(1);
dop_tutup();
dalam_mc.run2_view.gotoAndStop(1);
} // end if
switch (posisilift)
{
case 1:
{
pintu_slide.lt1_mc.p_kanan._x = pintu_slide.lt1_mc.p_kanan._x - 1;
pintu_slide.lt1_mc.p_kiri._x = pintu_slide.lt1_mc.p_kiri._x + 1;
break;
}
case 2:
{
pintu_slide.lt2_mc.p_kanan._x = pintu_slide.lt2_mc.p_kanan._x - 1;
pintu_slide.lt2_mc.p_kiri._x = pintu_slide.lt2_mc.p_kiri._x + 1;
break;
}
case 3:
{
pintu_slide.lt3_mc.p_kanan._x = pintu_slide.lt3_mc.p_kanan._x - 1;
pintu_slide.lt3_mc.p_kiri._x = pintu_slide.lt3_mc.p_kiri._x + 1;
break;
}
case 4:
{
pintu_slide.lt4_mc.p_kanan._x = pintu_slide.lt4_mc.p_kanan._x - 1;
pintu_slide.lt4_mc.p_kiri._x = pintu_slide.lt4_mc.p_kiri._x + 1;
break;
}
case 5:
{
pintu_slide.lt5_mc.p_kanan._x = pintu_slide.lt5_mc.p_kanan._x - 1;
pintu_slide.lt5_mc.p_kiri._x = pintu_slide.lt5_mc.p_kiri._x + 1;
break;
}
} // End of switch
} // End of the function
function diluarkondisi()
{
trace ("DILUAR KONDISI !!! ");
} // End of the function
function force_open()
{
clearInterval(delay3);
if (s_stat == "ON")
{
buka_wav.play();
} // end if
statuspintu = "sedangbuka";
bukaInt = setInterval(buka_pintu, 30);
clearInterval(openInt);
} // End of the function
function force_close()
{
clearInterval(delay2);
loop2 == "OFF";
if (s_stat == "ON")
{
tutup_wav.play();
} // end if
statuspintu = "sedangtutup";
dalam_mc.close_btn.gotoAndStop(2);
tutupInt = setInterval(tutup_pintu, 30);
clearInterval(closeInt);
} // End of the function
function display_view()
{
if (statusmesin == "stop")
{
dalam_mc.run_view.gotoAndStop(1);
stop_view();
}
else if (statusmesin == "run")
{
dalam_mc.run_view.gotoAndStop(2);
run_view();
} // end else if
switch (statuslift)
{
case "naik":
{
Object(this).dalam_mc.status_view.gotoAndStop(1);
naik_view();
break;
}
case "turun":
{
Object(this).dalam_mc.status_view.gotoAndStop(2);
turun_view();
break;
}
case "free":
{
Object(this).dalam_mc.status_view.gotoAndStop(3);
free_view();
break;
}
} // End of switch
dalam_mc.num_view.gotoAndStop(posisilift);
pintu_slide.lt1_mc.num_view.gotoAndStop(posisilift);
pintu_slide.lt2_mc.num_view.gotoAndStop(posisilift);
pintu_slide.lt3_mc.num_view.gotoAndStop(posisilift);
pintu_slide.lt4_mc.num_view.gotoAndStop(posisilift);
pintu_slide.lt5_mc.num_view.gotoAndStop(posisilift);
} // End of the function
function naik_view()
{
pintu_slide.lt1_mc.status_view.gotoAndStop(1);
pintu_slide.lt2_mc.status_view.gotoAndStop(1);
pintu_slide.lt3_mc.status_view.gotoAndStop(1);
pintu_slide.lt4_mc.status_view.gotoAndStop(1);
pintu_slide.lt5_mc.status_view.gotoAndStop(1);
} // End of the function
function turun_view()
{
pintu_slide.lt1_mc.status_view.gotoAndStop(2);
pintu_slide.lt2_mc.status_view.gotoAndStop(2);
pintu_slide.lt3_mc.status_view.gotoAndStop(2);
pintu_slide.lt4_mc.status_view.gotoAndStop(2);
pintu_slide.lt5_mc.status_view.gotoAndStop(2);
} // End of the function
function free_view()
{
pintu_slide.lt1_mc.status_view.gotoAndStop(3);
pintu_slide.lt2_mc.status_view.gotoAndStop(3);
pintu_slide.lt3_mc.status_view.gotoAndStop(3);
pintu_slide.lt4_mc.status_view.gotoAndStop(3);
pintu_slide.lt5_mc.status_view.gotoAndStop(3);
} // End of the function
function run_view()
{
pintu_slide.lt1_mc.run_view.gotoAndStop(2);
pintu_slide.lt2_mc.run_view.gotoAndStop(2);
pintu_slide.lt3_mc.run_view.gotoAndStop(2);
pintu_slide.lt4_mc.run_view.gotoAndStop(2);
pintu_slide.lt5_mc.run_view.gotoAndStop(2);
} // End of the function
function stop_view()
{
pintu_slide.lt1_mc.run_view.gotoAndStop(1);
pintu_slide.lt2_mc.run_view.gotoAndStop(1);
pintu_slide.lt3_mc.run_view.gotoAndStop(1);
pintu_slide.lt4_mc.run_view.gotoAndStop(1);
pintu_slide.lt5_mc.run_view.gotoAndStop(1);
} // End of the function
function inform()
{
trace (statuslift);
trace ("L1=" + stdlt1 + ",L2=" + stdlt2 + ",L3=" + stdlt3 + ",L4=" + stdlt4
+ ",L5=" + stdlt5);
} // End of the function
function dop_buka()
{
switch (posisilift)
{
case 1:
{
pl1.gotoAndStop(3);
break;
}
case 2:
{
pl2.gotoAndStop(3);
break;
}
case 3:
{
pl3.gotoAndStop(3);
break;
}
case 4:
{
pl4.gotoAndStop(3);
break;
}
case 5:
{
pl5.gotoAndStop(3);
break;
}
} // End of switch
} // End of the function
function dop_tutup()
{
switch (posisilift)
{
case 1:
{
pl1.gotoAndStop(1);
break;
}
case 2:
{
pl2.gotoAndStop(1);
break;
}
case 3:
{
pl3.gotoAndStop(1);
break;
}
case 4:
{
pl4.gotoAndStop(1);
break;
}
case 5:
{
pl5.gotoAndStop(1);
break;
}
} // End of switch
} // End of the function
function dop_dop()
{
switch (posisilift)
{
case 1:
{
pl1.gotoAndStop(2);
break;
}
case 2:
{
pl2.gotoAndStop(2);
break;
}
case 3:
{
pl3.gotoAndStop(2);
break;
}
case 4:
{
pl4.gotoAndStop(2);
break;
}
case 5:
{
pl5.gotoAndStop(2);
break;
}
} // End of switch
} // End of the function
init_fl();
dalam_mc.lt1_btn.onPress = function ()
{
start_up();
dalam_mc.lt1_btn.gotoAndStop(2);
stdlt1 = "ON";
};
dalam_mc.lt2_btn.onPress = function ()
{
start_up();
dalam_mc.lt2_btn.gotoAndStop(2);
stdlt2 = "ON";
};
dalam_mc.lt3_btn.onPress = function ()
{
start_up();
dalam_mc.lt3_btn.gotoAndStop(2);
stdlt3 = "ON";
};
dalam_mc.lt4_btn.onPress = function ()
{
start_up();
dalam_mc.lt4_btn.gotoAndStop(2);
stdlt4 = "ON";
};
dalam_mc.lt5_btn.onPress = function ()
{
start_up();
dalam_mc.lt5_btn.gotoAndStop(2);
stdlt5 = "ON";
};
pintu_slide.lt1up_btn.onPress = function ()
{
start_up();
Object(this).gotoAndStop(2);
stdlt1 = "ON";
};
pintu_slide.lt2up_btn.onPress = function ()
{
start_up();
Object(this).gotoAndStop(2);
stllt2u = "ON";
if (statuslift == "free" || posisilift <= 2 && statuslift == "naik")
{
stdlt2 = "ON";
} // end if
};
pintu_slide.lt3up_btn.onPress = function ()
{
start_up();
Object(this).gotoAndStop(2);
stllt3u = "ON";
if (statuslift == "free" || posisilift <= 3 && statuslift == "naik")
{
stdlt3 = "ON";
} // end if
};
pintu_slide.lt4up_btn.onPress = function ()
{
start_up();
Object(this).gotoAndStop(2);
stllt4u = "ON";
if (statuslift == "free" || posisilift <= 4 && statuslift == "naik")
{
stdlt4 = "ON";
} // end if
};
pintu_slide.lt2dn_btn.onPress = function ()
{
start_up();
Object(this).gotoAndStop(2);
stllt2d = "ON";
if (statuslift == "free" || posisilift >= 2 && statuslift == "turun")
{
stdlt2 = "ON";
} // end if
};
pintu_slide.lt3dn_btn.onPress = function ()
{
start_up();
Object(this).gotoAndStop(2);
stllt3d = "ON";
if (statuslift == "free" || posisilift >= 3 && statuslift == "turun")
{
stdlt3 = "ON";
} // end if
};
pintu_slide.lt4dn_btn.onPress = function ()
{
start_up();
Object(this).gotoAndStop(2);
stllt4d = "ON";
if (statuslift == "free" || posisilift >= 4 && statuslift == "turun")
{
stdlt4 = "ON";
} // end if
};
pintu_slide.lt5dn_btn.onPress = function ()
{
start_up();
Object(this).gotoAndStop(2);
stdlt5 = "ON";
};
dalam_mc.open_btn.onPress = function ()
{
trace ("buka_ditekan");
dalam_mc.close_btn.gotoAndStop(1);
if ((statusmesin == "off" || statusmesin == "stop") && statuspintu == "tutup
")
{
trace ("buka_press");
force_open();
dalam_mc.open_btn.gotoAndStop(2);
}
else if ((statusmesin == "off" || statusmesin == "stop") && statuspintu == "
sedangtutup")
{
clearInterval(tutupInt);
openInt = setInterval(force_open, 100);
tutup_wav.gotoAndStop(1);
dalam_mc.open_btn.gotoAndStop(2);
} // end else if
};
dalam_mc.close_btn.onPress = function ()
{
trace ("tutup_ditekan");
dalam_mc.open_btn.gotoAndStop(1);
if ((statusmesin == "off" || statusmesin == "stop") && statuspintu == "buka"
)
{
trace ("tutup_press");
force_close();
}
else if ((statusmesin == "off" || statusmesin == "stop") && statuspintu == "
sedangbuka")
{
clearInterval(bukaInt);
closeInt = setInterval(force_close, 100);
buka_wav.gotoAndStop(1);
dalam_mc.close_btn.gotoAndStop(2);
} // end else if
};
holdpintu = "OFF";
loop1 = "OFF";
hold_btn.onPress = function ()
{
holdpintu = "ON";
if (statuspintu == "sedangtutup")
{
loop1 = "ON";
clearInterval(tutupInt);
openInt = setInterval(force_open, 100);
tutup_wav.gotoAndStop(1);
trace ("holdpress");
}
else if (statuspintu == "buka")
{
clearInterval(delay2);
} // end else if
};
loop2 = "OFF";
hold_btn.onRelease = function ()
{
holdpintu = "OFF";
if (statuspintu == "buka")
{
loop2 = "ON";
delay2 = setInterval(delay2_func, pintudelay);
trace ("holdreles");
} // end if
};
s_on_btn.gotoAndStop(2);
s_stat = "ON";
s_on_btn.onPress = function ()
{
s_on_btn.gotoAndStop(2);
s_off_btn.gotoAndStop(1);
s_stat = "ON";
};
s_off_btn.onPress = function ()
{
s_on_btn.gotoAndStop(1);
s_off_btn.gotoAndStop(2);
s_stat = "OFF";
};
speedslow_btn.onPress = function ()
{
speedslow_btn.gotoAndStop(2);
speedmed_btn.gotoAndStop(1);
speedfast_btn.gotoAndStop(1);
liftspeed = 50;
};
speedmed_btn.gotoAndStop(2);
speedmed_btn.onPress = function ()
{
speedslow_btn.gotoAndStop(1);
speedmed_btn.gotoAndStop(2);
speedfast_btn.gotoAndStop(1);
liftspeed = 20;
};
speedfast_btn.onPress = function ()
{
speedslow_btn.gotoAndStop(1);
speedmed_btn.gotoAndStop(1);
speedfast_btn.gotoAndStop(2);
liftspeed = 2;
};
delaylong_btn.onPress = function ()
{
delaylong_btn.gotoAndStop(2);
delaymed_btn.gotoAndStop(1);
delayfast_btn.gotoAndStop(1);
pintudelay = 7000;
};
delaymed_btn.gotoAndStop(2);
pintudelay = 3000;
delaymed_btn.onPress = function ()
{
delaylong_btn.gotoAndStop(1);
delaymed_btn.gotoAndStop(2);
delayfast_btn.gotoAndStop(1);
pintudelay = 3000;
};
delayfast_btn.onPress = function ()
{
delaylong_btn.gotoAndStop(1);
delaymed_btn.gotoAndStop(1);
delayfast_btn.gotoAndStop(2);
pintudelay = 500;
};
about_btn.onRelease = function ()
{
about_mc._visible = true;
about_mc.gotoAndPlay(2);
};
about_mc.onPress = function ()
{
about_mc._visible = false;
about_mc.gotoAndStop(1);
};
flip_btn.onRelease = function ()
{
flip2();
};
p1_btn.onRelease = function ()
{
lift_mc._y = 476;
};
p2_btn.onRelease = function ()
{
lift_mc._y = 358;
};
p3_btn.onRelease = function ()
{
lift_mc._y = 241;
};
p4_btn.onRelease = function ()
{
lift_mc._y = 124;
};
p5_btn.onRelease = function ()
{
lift_mc._y = 7;
};

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close