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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LM2 Controller Wanted 1

Status
Not open for further replies.

bsquared18

Technical User
Jun 10, 2001
329
0
0
US
I'm looking for an LM2 script or .liv file that allows a user to control the playing of an LM2 animation the way buttons control the playing in, for example, Media Player: for instance, play, pause, and rewind buttons. Any suggestions?

While on the topic of LM2 scripts, I've searched the web without finding many (any?) good libraries of LM2 scripts. Any help would be greatly appreciated.

Thanks,

Bill B.
 
Hi Bill,
Saw your post on this same subject in the Adobe Forums. I only know how to put the script in for a Pause/Play button. But I imagine that with a little scripting work, you could also do the Rewind as well with similar or additions on this script. I created one button that had PAUSE/PLAY text on the button. Here's what I did and hope this kinda helps!

for OnLoad button:

go = false;
sound = false;

for the onButtonPress:

if (go == false) {
_root.stop();
go = true;
} else {
_root.play();
go = false;
}
 
Thanks again.

I'm new to LiveMotion (as you can no doubt tell). Your code will give me an incentive to learn more about how to use scripting in LiveMotion. (Where to place it, etc.)

You wouldn't by any chance have the .liv file with the button that I could download to see how it all works. If not, I'll work at figuring it out.

Regards,

Bill B.
 
Hi Bill,
The Liv file is really HUGE. I could email the zipped file (11 MB) to you to look over if you like. But If you look at my script, all I did was create the button, grouped it then went to the script editor and select the OnLoad handler and entered the
go = false;
sound = false;

Then select the OnButtonPress handler and enter
if (go == false) {
_root.stop();
go = true;
} else {
_root.play();
go = false;
}

Now I had sound (voiceover) in my Liv file which is why the reference to sound = false;

If you want to see the actual .liv file provide your email address and I can send a zipped file.
 
Pixelchik,

Yes, 11 Mb is a bit on the large side!

When I get a chance later today, I'll work with the info you've given me, plus studying the scripting user guide. Then, I'll let you know if I have any further questions.

Bill B.
 
Pixelchik,

I think looking at your .liv file would help. Since I have DSL, a large download wouldn't be a problem, or you could delete the large portion, save under a different name, and send me just the button portion.

My address is bmb@pro-ns.net.

Thanks! Greatly appreciated.

Bill B.
 
Hi Bill,
Okay! I will send this Liv file to you. I deleted ALL other animation and shortened the timeline and just added one other element and audio file so you could see that when you Preview the file in your browser and click on and off the Pause/Play button, the motion and sound go off and on. It's a crude sample but you can see how it works. The original file contained over 100 objects and was over 3 minutes long!
 
Sounds impressive. Is it up and running on a website somewhere?

Bill B.
 
It was for a few months. I'll check if it's still active and give you the URL.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top