How to make blinking eyes with different graphic files?

I can’t figure out how to animate eyes with different graphic files in the same place. How can I set keyframes to make the graphics not visible and make them visible on another frame?

Can anyone please help me with this?

Thank you!

Daniela

What exactly do you mean with “different graphic files”? :slight_smile:

Max / CineTek

For example a file “eyes_open.png” and “eyes_closed.png”. I can’t figure out how to switch them in an animation? How to set keyframes for active and inactive… if that’s even how this is done.

Well, you could pack both files into one sprite and create a simple animation. Then you can switch between both “states” (frames) whenever you want :slight_smile:

PS: Here is a link

http://www.coronalabs.com/blog/2013/05/14/sprites-and-image-sheets-for-beginners/

You can use object:setFrame(1) or object:setFrame(2) to open or close the eyes

You can key the frames in the Spine editor tool. Add two attachments to the eye slot and then make animations that switches back and forth between them.

Alternatively you could make a function that switches between the two attachments using skeleton:setAttachment(“name_of_slot”, “name_of_attachment”)

Thank you. That’s exactly what I can’t figure out. I see in the example (dragon), that there are different graphics for the wing, but I can’t find anyting in Spline to add the keyframes for the slots of the graphics, so I can switch between them. I easily can animate bodyparts with scale and translate but I can’t find the “Tool” to switch between graphics / generate the keys for the switch, so one is not shown and the other is.

Now I haven’t done this with the editor myself but I think you just key the animation frame as you would with scale and translation while selecting which image should be shown in the panel that shows the slots and bones on the right in the editor.

This video should provide useful information. About half way through he shows how eyes are blinking.

http://www.youtube.com/watch?v=xY4m3iNtSUQ#

EDIT: Actually this is a better video for it. http://www.youtube.com/watch?v=2gtn-RfrUnI

Thank you Reaver! This is exactly what I was looking for! I really appreciate your help!!! :slight_smile:

Daniela

What exactly do you mean with “different graphic files”? :slight_smile:

Max / CineTek

For example a file “eyes_open.png” and “eyes_closed.png”. I can’t figure out how to switch them in an animation? How to set keyframes for active and inactive… if that’s even how this is done.

Well, you could pack both files into one sprite and create a simple animation. Then you can switch between both “states” (frames) whenever you want :slight_smile:

PS: Here is a link

http://www.coronalabs.com/blog/2013/05/14/sprites-and-image-sheets-for-beginners/

You can use object:setFrame(1) or object:setFrame(2) to open or close the eyes

You can key the frames in the Spine editor tool. Add two attachments to the eye slot and then make animations that switches back and forth between them.

Alternatively you could make a function that switches between the two attachments using skeleton:setAttachment(“name_of_slot”, “name_of_attachment”)

Thank you. That’s exactly what I can’t figure out. I see in the example (dragon), that there are different graphics for the wing, but I can’t find anyting in Spline to add the keyframes for the slots of the graphics, so I can switch between them. I easily can animate bodyparts with scale and translate but I can’t find the “Tool” to switch between graphics / generate the keys for the switch, so one is not shown and the other is.

Now I haven’t done this with the editor myself but I think you just key the animation frame as you would with scale and translation while selecting which image should be shown in the panel that shows the slots and bones on the right in the editor.

This video should provide useful information. About half way through he shows how eyes are blinking.

http://www.youtube.com/watch?v=xY4m3iNtSUQ#

EDIT: Actually this is a better video for it. http://www.youtube.com/watch?v=2gtn-RfrUnI

Thank you Reaver! This is exactly what I was looking for! I really appreciate your help!!! :slight_smile:

Daniela