Actionscript that controlls director

i need a script that controls a director file.
i want that when loaded swf in director ends, the director files goes to a new marker.

who can help me?