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

Get help using Construct 2

Post » Fri May 09, 2014 9:07 pm

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
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Fri May 09, 2014 9:37 pm

Use

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

(X) being inverted
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Sun May 11, 2014 2:13 am

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?
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Sun May 11, 2014 2:27 am

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?
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Sun May 11, 2014 3:28 am

In one SPRITE insert 2 animations, and swish this animations ON TOUCH.
B
42
S
10
G
2
Posts: 111
Reputation: 3,773

Post » Sun May 11, 2014 3:54 am

@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.
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Sun May 11, 2014 3:56 am

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

Btw. GREAT avatar. Love it! :)
B
14
S
4
Posts: 190
Reputation: 1,735


Return to How do I....?

Who is online

Users browsing this forum: Richterrii, Yahoo [Bot] and 4 guests