A couple essential events for telling when your composition has loaded and when it has finished playing the timeline.
According to the documentation, this callback function will tell you when a composition has loaded and is ready to play. The event fires just before the timeline starts playing.
If you want to know when the timeline is complete and all animations are finished you can bind a timeline action to the composition. You just need to know which composition ID to bind to. So something like this ought to work:
You put them together like this:
And here’s the embedded adobe code on a page: