Stopping sounds

auntieginzyauntieginzy Member Posts: 50
edited February 2012 in Working with GS (Mac)
My sounds all work fine. I just can't get them to stop when I click onto the next scene. If I click the first one, then the sound plays but if I click through to the next scene, that sound continues. Any thoughts?

Oh and if I click on the next scene, I get the second sound playing as well!!

Comments

  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Did you import the files as music or sounds?

    When importing a file as a sound, it will stop when moving to the next scene, just make sure you have "run to completion"
    unchecked.
  • auntieginzyauntieginzy Member Posts: 50
    That's just it. It's dosnt stop! If I leave the first sound unchecked then none of the others work? I have 26 scenes, each with a different sound and even when I click onto the new scene, the first sound continues. Just don't know what to do?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Okey, that sounds weird.

    Make sure: Import all your music ( not the background music if you have one ) as a "Sound File" into your
    project. Then in your rules, drag in the sound and make sure you have !unchecked! "run to completion" In this case, when you move on to the next scene the sound currently played will stop to play..
  • auntieginzyauntieginzy Member Posts: 50
    edited February 2012
    I have done, but it just doesn't work.. I could send a screen shot of what I've done if that might help? It's driving me nuts!
    Will close the whole thing overnight and see if anything changes!
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Use must be using a play music behavior not play sound
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    @auntieginzy

    Remove your sounds, and import them again as a sound file!!

    As FryingBaconStudios said, you must be using a music file!
  • auntieginzyauntieginzy Member Posts: 50
    OK, ALL m,y sounds are imported as sound files. That was never the issue.
    Just checked all 26 and it's not clicked 'play to completion' on any of them. It will play the sound on the first scene but not on any of the others now. also If the sound on the first scene is playing, I can click onto the next scene and the sound from the first one continues. :-(
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Hey,

    that is really weird. I sent you a PM back!

    Alex
  • MotherHooseMotherHoose Member Posts: 2,456
    and, of course, you want the sound to play before they go to next letter …
    and, of course, the little ones can resist touching the screen!

    you could try:
    a boolean sceneAttribute: Busy (unchecked)
    on every scene

    on Actor that registers the touch:
    Rule: when
    Event: touch is pressed
    Attribute: scene.Busy is false
    --Play Sound
    --changeAttribute: scene.Busy To: true

    Rule: when
    Attribute: scene.Busy is true
    --Timer: After: duration of sound
    ----changeAttribute: scene.Busy To: false

    on NextButton:
    have its Color Alpha set to: 0
    Rule: when
    Attribute: scene.Busy is true
    --changeAttribute: self.Color.Alpha To: 1 (or interpolate to 1)

    Rule: when
    Event: touch is pressed
    Attribute: self.Color.Alpha is 1
    Attribute: scene.Busy is false
    --changeScene

    @};- MH
  • auntieginzyauntieginzy Member Posts: 50
    OK - since all these questions, I have emigrated and am now only just picking up what to do here. So, sorry for the lack of response. Will try to do what you advise - but not really good with all this yet!
  • auntieginzyauntieginzy Member Posts: 50
    Can't seem to find how you can set the attributes to busy? Sorry to be so dumb but need step by step for that bit if poss?
  • auntieginzyauntieginzy Member Posts: 50
    and, of course, you want the sound to play before they go to next letter …
    and, of course, the little ones can resist touching the screen!

    you could try:
    a boolean sceneAttribute: Busy (unchecked)
    on every scene

    on Actor that registers the touch:
    Rule: when
    Event: touch is pressed
    Attribute: scene.Busy is false
    --Play Sound
    --changeAttribute: scene.Busy To: true

    Rule: when
    Attribute: scene.Busy is true
    --Timer: After: duration of sound
    ----changeAttribute: scene.Busy To: false

    on NextButton:
    have its Color Alpha set to: 0
    Rule: when
    Attribute: scene.Busy is true
    --changeAttribute: self.Color.Alpha To: 1 (or interpolate to 1)

    Rule: when
    Event: touch is pressed
    Attribute: self.Color.Alpha is 1
    Attribute: scene.Busy is false
    --changeScene

    @};- MH
    Can't seem to find how you can set the attributes to busy? Sorry to be so dumb but need step by step for that bit if poss?
Sign In or Register to comment.