1 person found this helpful
Just setting the alpha to 0 doesn't remove it from the display. Is this a timeline tween or a code tween?
If it's a timeline tween simply make sure the final frame of the timeline tween is either an empty or blank frame. You want to make sure that faded in graphic is completely gone so it doesn't cover the menu.
If it's a code based tween, tell me which library you're using and I'll give you some code to remove the object on that libraries "tween complete" function.
Is this what you mean? And the action I put in the last frame was a "stop();" in order to make it stop looping since I want it to only play once.
For some reason, it's still not letting me click on the menu behind it after it fades out. I'm guessing I did your suggestion wrong so let me know next time you see this.
1 person found this helpful
You probably have the element on that frame. In your picture the frame looks darker gray which indicates it has an element in it. Here's a screenshot of what I mean:
Notice 2 things.
1, The layer with ActionScript on it is a blank keyframe. If your keyframe was blank it would be colored white like mine. So I think your objects are still on the timeline in that layer.
2, Notice the picture tween (I see you're using Classic Tweens). The last frame is on frame #29. The stop script is at frame 30 where there is nothing in the layer below, not even a blank frame. It's perfectly fine to put a "blank keyframe" there but if it's truely empty it will be white like my blank keyframe on frame 30 in the ActionScript layer.
To assure there's nothing in your frames just go on one of your picture layers, click on the final frame with the stop() script in the timeline and edit->select all to see if anything gets selected. If it does, delete it. Nothing should be on your final frame except a single stop() script.
After that verifies that it was just covering your menu I'd rather continue and tell you how to remove that clip overall, unless you know you'll need that image to fade in and out again at some point.
What do you mean by remove the clip overall? I will definitely not need to have the animation play again. Here's an updated pic based off of your directions:
So I have everything blank in that last frame except for that stop script. Even then when I publish it on website, I still cannot access the menu behind it. If there is a way I can completely remove this animation after the first time it plays, then that's exactly what I'd want.
Thanks for all the suggestions thus far!
What you posted above looks good. As long as the playhead stops at the last frame you can be sure whatever is over your menu is not the graphic that is fading in and out.
Yes you can have it request to have itself removed. "How" to do it is a question of how you have your overall project set up.
If you have a main timeline that has this splash screen fade in/out animation directly on it then I'll suggest one way. If this animations is loaded externally with code or from a SWC, etc then it will be removed a different way. You'll have to let me know the setup of your project.
In the meantime I've already answered this question previously. If you scroll down to the bottom of this thread and look at the code I give plenty of code samples and files to illustrate how to have a display object that is a child request to be removed from the parent:
Note: These are code-versions of doing this. The timeline version is simply to stop the playhead where the layer that contains this animation has no frames or blank frames. It is effectively removed at that point.
There's a lot to read there but the absolute last bit of code I posted is the easiest of all the methods. Nonetheless there's several to choose from. See if one of those works for you.
The specific bit of code would be placed on the last frame under the stop():
Thank you so much for the help! With your suggestions, I have found a solution.
Again, thanks for taking the time to answer my question. I hope someone close by gives you a free cookie on my behalf.
You're welcome and please mark any correct answers so we can filter unanswered questions. Good luck!