Page 1 of 1

2questions flash and music on/off button...

Posted: Fri Jun 10, 2005 9:56 pm
by kane
First off I have this simple code 3 lines to play music

;start music mp3
InitMovie()
LoadMovie(0,"./launcher.mp3")
PlayMovie(0,WindowID())
;end music mp3

Now when I want to stop the music it's

Case #Button_13 ; music off
StopMovie()

now what happends if I want make a multi button so click again turns it on.. could you post full code if possible what be from here

Case #Button_13 ; music off
StopMovie()

Thanks..

Also could I get flash into my project and if so is it hard? I want make a launcher for a game be cool have small window on launcher shows some action shots of the in game part when I make into small simple flash video :)

Posted: Sat Jun 11, 2005 4:29 am
by kane
bump :D

Posted: Sat Jun 11, 2005 4:39 am
by Sparkie

Code: Select all

If OpenWindow(0, 0, 0, 200, 200, #PB_Window_SystemMenu | #PB_Window_ScreenCentered, "Button Toggle") And CreateGadgetList(WindowID(0)) 
  ButtonGadget(13, 10, 160, 180, 20, "Turn On", #PB_Button_Toggle) 
  Repeat
    event = WaitWindowEvent()
    If event = #PB_EventGadget And EventGadgetID() = 13
      Select GetGadgetState(13)
        Case 0
          SetGadgetText(13, "Turn On")
          MessageRequester("Hello", "Turned Off")
        Case 1
          SetGadgetText(13, "Turn Off")
          MessageRequester("Hello", "Turned On")
      EndSelect
    EndIf
  Until event = #PB_Event_CloseWindow 
EndIf 

Posted: Sat Jun 11, 2005 10:06 am
by Trond
For flash, just a web gadget. Point the address to your flash file.