2D Toolkit Forum

2D Toolkit => Support => Topic started by: johndonovan on March 06, 2012, 05:18:54 pm

Title: How to add an Animated sprite to a button?
Post by: johndonovan on March 06, 2012, 05:18:54 pm
Hi
Anyone know how to add an animated sprite to a button?

Any help would be greatly appreciated.
Title: Re: How to add an Animated sprite to a button?
Post by: unikronsoftware on March 06, 2012, 08:11:27 pm
How do you need this to work?
Do you want an animation playing all the time, and then to swap between different animations?
Title: Re: How to add an Animated sprite to a button?
Post by: johndonovan on March 08, 2012, 04:11:40 am
Hi
Sorry about the late clarification.
Basically I just want to put an animated particle sprite - a candle flame on a candle that is part of a buttons image. It would simply loop continuously, no swapping from one animation to another - just a single animation.

I've attached the button image so you can get a better idea of what I'm after.

Any help would be greatly appreciated.
Title: Re: How to add an Animated sprite to a button?
Post by: unikronsoftware on March 08, 2012, 09:17:31 am
If you can separate the candle out of the image, all you'll need to do is place an animated sprite as a child of the button, and position it correctly. Otherwise, you'll need two sets of animations - one pressed and one up to represent the normal state - and syncing the animations is going to be a bit of a pain, but doable.
Title: Re: How to add an Animated sprite to a button?
Post by: johndonovan on March 08, 2012, 11:28:46 am
Ok, thanks, that should work. I appreciate the help.