How do I replace a picture with another picture on touch and

0 favourites
  • 7 posts
From the Asset Store
An educational game for counting pictures. An easy to use template for developers to build larger games
  • Hey,

    I am trying to recreate a piano which I made in SwishMax (Flash).

    What is the best practice for replacing one image with another image on touch or click?

    I am also having a hard time finding a tutorial on "snapping" on-screen contend with drag and drop.

    To be clear, let's say you had two boxes and you want a child to drop an object into each box which then snaps to the center of the box when dropped.

    Thank you for your help,

    V

  • Use

    Touch > on object touched > "Image Name" Set animation "Animation Name"

    Touch > on object touched (X) > "Image Name" Set animation "Default"

    (X) being inverted

  • Thank you TheDom, that did the trick.

    Because you answer all my questions, I might as well bug you for one more solution.

    I am trying to find a tutorial or method to do "on-screen" dragging and snapping.

    For example. I would like the player to arrange sprites in new ways but instead of dropping them anywhere, they should line up neatly.

    How would you do that?

  • Definitely a challenging question. Always a good idea to make a new post because maybe someone else has a solution already. In the meantime, I'm thinking about it. Can you describe a little more of the scenario?

  • In one SPRITE insert 2 animations, and swish this animations ON TOUCH.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • the Dom

    Because a picture is worth more than a 1000 words ...

    I have a few Flash driven apps on my website LittleComposers.com

    The reason why I am looking into C2 is so that I can replace the Flash apps with proper HTML5 apps.

    The ones I am talking about can be found on the LittleComposers website under "PLAY" (main menu)

    I have literally just discovered C2 and love what I see but searching for "snap" is hard because most links point to the C2 editor and not to running apps.

    I really appreciate your help and suggestions.

  • isasaurio

    thanks! I am glad that this is now solved as suggested by TheDom earlier.

    Btw. GREAT avatar. Love it!

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