hover music

0 favourites
  • 11 posts
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • Hello I want it so when I hover over a sprite it will play sound from an external .mp3

    Thanks

  • Condition "Mouse: On cursor over object" => Action "Audio: play sound"

    Also you don't want to use mp3 as audio format.

    Manual entry about sounds & musics and this blog article

    For more technical infos on how to do in C2 : How do I FAQ section "Audio".

  • is there a way for it to play skyscape.sky.com/skynewsradio/RADIO/news.mp3

  • I've edited my previous post.

    Check the links.

    Also tutorial : how to add sounds, a beginner's guide

  • Kyatric

    I've tried playing a sound on mouse over object, and it plays it constantly. And yes, looping is set to false.

    Any ideas?

  • Event:

    Invert "On mouse is hovering"

    Action: audio stop

  • Have you made it so when it isnt over the object it stops?

    Haha nevermind beat me to it :P

  • I didn't want to have to stop the sounds, since not looping should do that for you.

    I'm using a sprite with two different animations for the button states.

    My solution ended up being 2 conditions: mouse over and is animation playing

    Oh and thanks for the tips guys :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • helto: Actually, add a "System: Trigger once" condition to the "Mouse: Over object" event.

    The problem here has not to see with the Audio object, but with how events work.

    Every tick that a condition is true, it executes the actions.

    So every tick that your mouse is over an object, the Audio object plays a sound.

    The system condition "Trigger once" allows that the actions are only executed once while the conditions of the event are true, so it plays the sound only one time.

    Edit: the condition to check if an animation is playing also does the trick for the same reasons.

  • Hi, it was very helpful thank you <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Hello guys,

    I got the same problem with repeating sounds by hovering and this thread was kinda helpful but now the problem starts to get a bit different and I dont know how to solve it anymore.

    Like I said a sound should play each time when I hover an object. Because of the repeating problem I used 2 conditions. I also use pngs with transparency wich cause that when I hover the object on a half-/full transparent part, the sound starts to loop again infinitely. That's why I made an invisible box to triggter the event.

    he Problem now is that the sound loops right at the beginning of the layout until I hover the button 1 time. Then it's working just the way it should!

    Here are the necessary code parts. (I "scripted" just 1 button but I show you all of them because I think it could help understand the situation better)

    <img src="http://s14.directupload.net/images/130329/65nkx86d.jpg" border="0" />

    <img src="http://s7.directupload.net/images/130329/6h6w8ixt.jpg" border="0" />

    Could anyone help me? :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)