Hello Guest

Author Topic: How to add an Animated sprite to a button?  (Read 6066 times)

johndonovan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
How to add an Animated sprite to a button?
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to add an Animated sprite to a button?
« Reply #1 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?

johndonovan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to add an Animated sprite to a button?
« Reply #2 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to add an Animated sprite to a button?
« Reply #3 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.

johndonovan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to add an Animated sprite to a button?
« Reply #4 on: March 08, 2012, 11:28:46 am »
Ok, thanks, that should work. I appreciate the help.