Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Actionscript: wats with the get days string!!!!!!!

Status
Not open for further replies.

theunchosenone21

Technical User
Dec 15, 2003
1
AU
i know how to use the get days feature, but i can't get it to work in unison with my project.
this is part of the whole script:

myday = mydate.getDay();
// gets days in numerical form with 0 =Sun, 1=mon, etc.
if (myday = 0) {
tellTarget ("saturday") {
gotoAndPlay(1);
}
tellTarget ("sunday") {
gotoAndPlay(2);
}
}
if (myday = 1) {
tellTarget ("sunday") {
gotoAndPlay(1);
}
tellTarget ("monday") {
gotoAndPlay(2);
}
}
.......etc, etc.
(for the gotoandplay strings, frame 1 can be said as being off and frame two is on

but instead of the script working so that on sunday, sunday would lite up and the others wont, andon monday, monday would lite up and the others wont, the script goes to the end and just always makes itseem that its saturday! even the myday string changes to show 6!

wats wrong! help!
 
2 "==" in an if comparisom statement?

if (myday == 0) {
tellTarget ("saturday") {
gotoAndPlay(1);
}
tellTarget ("sunday") {
gotoAndPlay(2);
}
}

Otherwise, with myday = 0, your actually setting the myday variable to 0.




Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top