How do I play an animation on touch start

Just started using Construct 2? Post your questions here

Post » Thu May 15, 2014 7:56 am

Hi,
I am trying to make a piano and created the keys with sprites.
Each sprite has one animation frame added to show the key "down state" mode.

Here is the problem. In Flash, I have a "stop" command which prevents animation from starting until I call that event via a mouse listener ...

How do I prevent the keys to go to frame 1 when I start the game? (remember, frame one is the down state).

Thanks :)
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Thu May 15, 2014 8:31 am

You can make the speed of the animation to 0 "from the image editor" and make the loop to "No"

When you need the sprite to change animation make an event:
On mouse click ------- sprite one "Set animation speed to x" or "Set frame to x"
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Thu May 15, 2014 8:41 am

Thanks A0Nasser,
that did the trick! :)
B
14
S
4
Posts: 190
Reputation: 1,735

Post » Sun May 25, 2014 9:31 am

I am sorry I cannot remember this person name but, his demo of Piano is wonderful. Here is CAPX thanks to whom ever made this demo. All credit goes to him or her and not to Lord Shiva
You do not have the required permissions to view the files attached to this post.
B
255
S
39
G
15
Posts: 1,982
Reputation: 41,005

Post » Sun May 25, 2014 9:41 am

Thank you Lordshiva1948,

I am glad that you posted the file because I lost access to my laptop today and run C2 on an old computer minus all the sample files I have collected over the past few days.

I shall take a second look.

Cheers,
V :)
B
14
S
4
Posts: 190
Reputation: 1,735


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests