how to play a video when user hold a key

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
krishna
Posts: 2
Joined: Tue Oct 15, 2013 3:47 am

how to play a video when user hold a key

Post by krishna » Tue Oct 15, 2013 3:57 am

Hi All,
iam developing a gaming application in livecode, when user press and hold a button the video should be played, and if he releases the key the video should be paused or stopped, again if user hold the key the video should play, its my requirement.But iam unable to get code for it. please help me

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: how to play a video when user hold a key

Post by Simon » Tue Oct 15, 2013 6:44 pm

Hi krishna,
Welcome to the forums :)

You should look up in the dictionary:
"keyDown" used with "play" to start the video
"keyUp" with "play pause" to pause the video

Both of those will allow you to specify a key to be used.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply

Return to “Games”