PDA

View Full Version : several action to a button


zaknbou
11-27-2006, 11:10 AM
-how can i make several action to a button for example when i press a button the music background stop then when i press the same again the music start again .

yosik
11-27-2006, 12:17 PM
Use Audio.TogglePlay

holtgrewe
11-27-2006, 12:19 PM
Here's one example:

Let's assume Label_1 exists with text of "Play Music"

On page preload
my_click = 0;

Label Object:
On Click:
--toggle music on & Off
if my_click == 0 then
--change Label_1 text to "Pause Music"
--code your music start up
my_click = 1; -- 1=music is playing
else
--change Label_1 text to "Play Music"
--code your music pause
my_click=0; -- 0= music is paused
end

This is very rudimentary example of a toggle technique.
Good luck

zaknbou
11-28-2006, 10:18 AM
thanks guys i will try that