Moving object to fade out when clicked

Hi there,

I'm trying to do an animation where a character is walking and you need to click on moving objects around him to make them disappear before they hurt him. When you click on a moving object, I'd like to for that object to fade out instead of just disappearing (i.e. change state to Hidden). However, fade out seems to only activate when the object's timeline ends, not anytime in the middle.

Is there a workaround to this? I'm wondering if anyone's ever done anything liek this before.

13 Replies
Phil Mayor

I think the problem JC is having is that the object will exit at the end of the timeline. There is a way to prevent this happening. 

An object will always disappear at the end of its timeline unless it appears after its timeline has ended, I would settle object to hidden and set its length on the timeline to 1 second (at the beginning of the timeline) add an exit and entrance animation.

Add a trigger to change the object to normal when timeline reaches 1 second and it should only disappear when you set it to hidden.

Math Notermans

As Storyline uses GSAP TweenLite for all its animation its easy to use yourself for fading, hiding and more complex animations too.

Check this sample that does that.

To use it in your own projects, the syntax is easy. element2Animate , 1.5, {autoAlpha:0});
Where offcourse element2Animate is your SL-object and 1.5 is the duration of the fade. On other types of animation, scaling, moving etc. you can use eases. On fading that is not visible.

Adding the above sample...