Tutorials Books Videos Forums

Change the theme! Search!
Rambo ftw!

Customize Theme


Color

Background


Done
Look, an author!

Frame Jumping

by Ed Edwards   | filed under Flash and ActionScript

Introduction

When you play an animation in Flash, unless you used ActionScript, your animation simply moves through the timeline - displaying whatever is contained on those frames. That is very linear, and sometimes you would want to tell Flash to skip a few frames, or jump to a new frame that is 100 frames down. How can you do that? This tutorial will show you!

In this tutorial you will learn how to jump from one frame in your animation to another by using a few lines of ActionScript. The following is an example of what I will explain:

[ Click the Go to Frame 2/1 link ]

Steps to Create Animation

If you follow these steps carefully you shouldn't get too confused.

  1. Ok let's start by opening up Flash and making a new document. I made mine 250 by 200.
  2. Go to the time line and name the current layer "buttons".

[ your layer should look something like this ]

  1. Make a new button by clicking on the create symbol button (below) and make a button of your choice, and ok it.

[ I have drawn a line to the create new symbol button ]

  1. Now place your button where you want in your movie. Well, it's been easy so far so let's get some coding done. First go to the first frame in your timeline and open the actions panel and enter this code.
stop();

This just stops the movie from playing, now keep your actions panel open and select your button and paste in this code.

on (release) {
    gotoAndPlay();
}

Where it says gotoAndPlay() you must put the number of the frame you want between the () characters. If you want to go to frame six it would be gotoAndPlay(6). It's very important you get this right or it will not work.

Well now you just have to put the content in the frame you wish to link to. If you still don't understand, download the zip file.

Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence, ads, and algorithm-driven doodads. A huge thank you to all of you who buy kirupa's books, became a paid subscriber, watch the videos, and/or interact on the forums.

Your support keeps this site going! 😇

- Ed
Phonowaves.co.uk

The KIRUPA Newsletter

Thought provoking content that lives at the intersection of design 🎨, development 🤖, and business 💰 - delivered weekly to over a bazillion subscribers!

SUBSCRIBE NOW

Creating engaging and entertaining content for designers and developers since 1998.

Follow:

Popular

Loose Ends

:: Copyright KIRUPA 2026 //--