movie command

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

movie command

Post by maxs » Sun Apr 08, 2007 8:11 am

How do hold off sending code to my app until my movie is paused? The "wait until the movie = done " does not work.


start player "max"
wait until the movie = done
hide player "Max"

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Sun Apr 08, 2007 4:53 pm

Hi maxs,

you can script the player to act when it is done :-)
Check the "playstopped" message in the docs.

Use it like this (in the player's script):

on playstopped
hide me
end playstopped

Please note that "playstopped" is also sent to the player when the user stops it (e.g. via QT controller bar)!


Best

Klaus Major

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Sun Apr 08, 2007 4:53 pm

Do you just want to hide the player after the movies has ended while allowing the user to continue clicking around - or is your goal to prevent the user from doing anything until the movie has ended?
Case 1. Just hide the player at the end of the movie:
- handle the 'playStopped' message to hide the player after it's done

Code: Select all

on playStopped
hide the target
end playStopped
Case 2. No user interaction until end of movie:
- create a transparent button as large as your card, and bring it to the front
- this button will intercept all mouseclicks and absorb them
- so all you need to do is start the player, show the button, and cleanup at the playStopped message

Hope this helped,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Thanks and another ?

Post by maxs » Tue Apr 10, 2007 4:57 am

Thank you Jan and Klaus

How do I play a movie stored in the videoclips area of my project?

(Where 's the documentation on this area of quicktime movies?)

Thanks, Max

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Tue Apr 10, 2007 2:23 pm

Hi maxs,

check the "play" command in the docs.

But you are quite limited when using imported videofiles!


Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”