×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

LM2 Controller Wanted

LM2 Controller Wanted

LM2 Controller Wanted

(OP)
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.

RE: LM2 Controller Wanted

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;
}

RE: LM2 Controller Wanted

(OP)
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.

RE: LM2 Controller Wanted

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.

RE: LM2 Controller Wanted

(OP)
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.

RE: LM2 Controller Wanted

(OP)
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.

RE: LM2 Controller Wanted

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!

RE: LM2 Controller Wanted

(OP)
Sounds impressive. Is it up and running on a website somewhere?

Bill B.

RE: LM2 Controller Wanted

It was for a few months. I'll check if it's still active and give you the URL.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close