Hi Rev World,
I have a function that I currently use two buttons for, Start and Stop. How do I combine those functions into one button so that the first click starts a media file (start player), clicking again stops the file (stop player)? I also want the stop to reset it to the beginning ready for another 'start' click.
Thanks in advance
G
Start and Stop buttons?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi G,
just make a button and set the script to:
regards
Bernd
just make a button and set the script to:
Code: Select all
on mouseUp
put the label of me into myLabel
if myLabel is not "Stop" then
set the label of me to "Stop"
start player 1
else
set the label of me to "Start"
stop player 1
-- this resets the player to the beginning
set the currenttime of player 1 to 0
end if
end mouseUp
Bernd
G,
you might want to add to the script of the player:
That will set the label of the start/stop button to start once the player is done.
regards
Bernd
you might want to add to the script of the player:
Code: Select all
on playstopped
set the label of button 1 to "Start"
end playstopped
regards
Bernd