elmimmo
03-08-2001, 10:56 AM
I am trying to launch quicktime, avi and mpg movies from flash and for this I use 2 techniques, one for windows users and another for mac users. For windows I call one of those programs that call the default executable for a certain document (the movie) that is passed as its arguments (one i'm using is shelexec.exe). For macs I call an applescript with the same name as the movie (without the extension) that calls the movie in question.
In the first place I manually define which system (win or mac) is the projector intended for with an action in the first frame stating:
var System = "mac";
And then in each button supposed to launch the movie I assign the following action:
on (release) {
if (System == "win") {
fscommand ("exec", "movies\\ShelExec.exe\tmovies\\movie01.mov");
} else {
fscommand ("exec", ":movies:movie01");
}
}
Except that I change the name of each movie to be launched. With this I define the variable "system", publish one of the projectors, and just by redefining it again and publishing the other projector I have both version with minimum hassle. I've tested this and it works.
Anyhow there are dozens of buttons launching movies so I tried to define the function to launch the movies just once and call it from every button like this: First I changed the action I defined in the first frame to:
var System = "mac";
function LaunchMovie (NameMovie, ExtensionMovie) {
if (System == "win") {
fscommand ("exec", "movies\\ShelExec.exe\tmovies\\" + NameMovie + "." + ExtensionMovie);
} else {
fscommand ("exec", ":movies:" + NameMovie);
}
}
and in each button I changed the action defined simply to:
on (release) {
LaunchMovie (movie01, mov);
}
I've tried this only on Mac OS for the moment (that's why the variable "System" is defined as "mac") but it does not work any more. Any help, pleeease?
elmimmo
In the first place I manually define which system (win or mac) is the projector intended for with an action in the first frame stating:
var System = "mac";
And then in each button supposed to launch the movie I assign the following action:
on (release) {
if (System == "win") {
fscommand ("exec", "movies\\ShelExec.exe\tmovies\\movie01.mov");
} else {
fscommand ("exec", ":movies:movie01");
}
}
Except that I change the name of each movie to be launched. With this I define the variable "system", publish one of the projectors, and just by redefining it again and publishing the other projector I have both version with minimum hassle. I've tested this and it works.
Anyhow there are dozens of buttons launching movies so I tried to define the function to launch the movies just once and call it from every button like this: First I changed the action I defined in the first frame to:
var System = "mac";
function LaunchMovie (NameMovie, ExtensionMovie) {
if (System == "win") {
fscommand ("exec", "movies\\ShelExec.exe\tmovies\\" + NameMovie + "." + ExtensionMovie);
} else {
fscommand ("exec", ":movies:" + NameMovie);
}
}
and in each button I changed the action defined simply to:
on (release) {
LaunchMovie (movie01, mov);
}
I've tried this only on Mac OS for the moment (that's why the variable "System" is defined as "mac") but it does not work any more. Any help, pleeease?
elmimmo