How do I change frame and turn on/off sound at the same time

0 favourites
  • 4 posts
From the Asset Store
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • I want to make sound icon on/off with 2 frame in 1 sprite, then i want to make it play the sound and when I clicked again, it changes the frame and stop the sound.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mouse on Sprite clicked
    ..Sprite frame=0 : Play audio, Sprite set frame to 1
    ..Else : Stop audio, Sprite set frame to 0
    
  • thanks for your reply, but i got it by trying, by creating 2 instance variable in a sprite (sizeX,sizeY). and tween behavior.

    System: On start of layout

    -> sprite: Set sizeX to Self.Width

    -> sprite: Set sizeY to Self.Height.

    then,

    event.

    + Touch: On tap gesture on sprite

    -> sprite: Tween "" property Size to Self.sizeX +50, Self.sizeY +50 in 0.2 seconds (Out Back, destroy: No, loop: No, ping pong: No, repeat count: 0)

    -> System: Wait 0.2 seconds

    -> sprite: Tween "" property Size to Self.sizeX , Self.sizeY in 0.2 seconds (In Back, destroy: No, loop: No, ping pong: No, repeat count: 0)

    make sub event

    ----+ sprite: Animation frame = 0

    -----> System: Wait 0.01 seconds

    -----> sprite: Set animation frame to 1

    -----> Video_amfibi: Pause

    another sub event

    ----+ sprite: Animation frame = 1

    -----> System: Wait 0.01 seconds

    -----> sprite: Set animation frame to 0

    -----> Video_amfibi: Play

    I hope this can help someone, im newbie so i need hours for this T_T

  • just change pause and play to stop and play. GL :D

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