Open the Flash file that contains the movie clip that you want to add an end function to.
Click the "Timeline" option from the "Window" menu. Locate the last frame on the timeline where the movie clip ends. Click inside the last frame icon to select the last frame, Click the "Actions" option from the "Window" menu to open the ActionScript 3 editor.
Position your mouse cursor on the first line of the ActionScript 3 editor. Click the mouse button, and type the following code, which will set a timer that will time out in three seconds (3,000 milliseconds).
var transferTimer: Timer = new Timer(3000, 1);
Type the code starting at the next line of the ActionScript 3 editor to activate the timer. Attach the "start" method to the "transferTimer" timer object.
transferTimer.start();
Type the code starting at the next line of the ActionScript 3 editor to add an event listener to the transferTimer such that when the timer has elapsed (three seconds have passed) the instructions in a function named "changeURL_fn" will be executed.
transferTimer.addEventListener(TimerEvent.Timer, changeURL_fn);
Type the code starting at the next line of the ActionScript 3 editor to create the function named "changeURL_fn."
function changeURL_fn(event: TimerEvent): void
Type the code (instructions) that the changetoURL function will execute within curly brackets beginning on the next line in the ActionScript 3 editor. Use the "navigateToURL" method with the URL of the web page you want to navigate to as the argument for the navigateToURL method.
{
var URL:String = "http://www.adobe.com";
navigateToURL(URL);
};