Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | [flasher] setting up conditionals, functions |
| From: | Kathleen McGuinness |
| Date: | Fri, 09 Mar 2001 17:59:56 -0000 |
I'm just learning code and finally getting a route on a "aMap" mci to
go from one dot to the next and stop. A Start Button with at text
variable "display" and a Stop Button with at text variable "display2"
then appear. At the bottom of this post I've included the buttons'
code.
My problem is, I think in the stop button. I can't get the IcPak.swf
to load when the display text reads "Play Ice Pack Movie", instead
LitAm2.swf loads. Any clues?
Also there are several more movies I have to set up to load and I was
thinking this code might be a candidate for a "function", but am a
bit cowardly to try. That whole placing placeholders then passing
appropriate values to buttons is pretty scary.
And do I really need to use "with (aMap) {setProperty ("aMap", _alpha, "100");"
when I have the aMap in the setProperty line?
Thanks for taking the time to read this.
Kathleen
"Start Button Code"
on (release) {
setProperty ("aMap", _alpha, 40);
if (display == "Play Southern Ocean Movie") {
loadMovieNum ("SoOcean2.swf", 1);
display2 = "Stop Southern Ocean Movie";
} else if (display == "Play Ice Pack Movie") {
loadMovieNum ("IcPak.swf", 2);
display2 = "Stop Ice Pack";
} else if (display == "Play Little America Movie") {
loadMovieNum ("LitAm2.swf", 3);
display2 = "Stop Little America Movie";
}
}
"Stop Button Code"
on (release) {
with (aMap) {
setProperty ("aMap", _alpha, "100");
}
unloadMovieNum (1);
with (aMap) {
play();
display = "Play Ice Pack Movie";
}
if (display == "Play Ice Pack Movie") {
unloadMovieNum (2);
with (aMap) {
play ();
setProperty ("aMap", _alpha, "100");
display = "Play Little America Movie";
}
} else if (display == "Play Little America") {
unloadMovieNum (3);
with (aMap) {
play ();
setProperty ("aMap", _alpha, "100");
}
}
}
--
Kathleen McGuinness
South Pasadena, CA
<www.tennisss.com/k>
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

