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

Just starting out? Need help? Post your questions and find answers here.
kane
User
User
Posts: 23
Joined: Sun May 15, 2005 9:28 pm

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

Post 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 :)
kane
User
User
Posts: 23
Joined: Sun May 15, 2005 9:28 pm

Post by kane »

bump :D
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post 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 
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

For flash, just a web gadget. Point the address to your flash file.
Post Reply