# On release, play frame, then play movie?

**URL:** https://forum.kirupa.com/t/on-release-play-frame-then-play-movie/58603
**Category:** flash
**Created:** [July 23, 2004, 11:39pm UTC](https://forum.kirupa.com/t/on-release-play-frame-then-play-movie/58603 "2004-07-23T23:39:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nuglobe](https://avatars.discourse-cdn.com/v4/letter/n/45deac/32.png) [@nuglobe](https://forum.kirupa.com/u/nuglobe)
#### Post date: [July 23, 2004, 11:39pm UTC](https://forum.kirupa.com/t/on-release-play-frame-then-play-movie/58603/1 "2004-07-23T23:39:02Z")

</div>

I am creating a site, and it has a animation that it has to play before loading the next section. What I cant figure out is what function I need to create so that when a user clicks on the vision button it will play the frame after stop(); which will close that section, then have it load the frame for the section that the person clicked on. The only way I can think of doing this is creating 3 different close animations for the three sections. But I figure there has to be a way to have it play the one close animation and then goto the frame which is the portfolio section or vision section (depending on the button clicked).

Thanks for the help.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 24, 2004, 1:25am UTC](https://forum.kirupa.com/t/on-release-play-frame-then-play-movie/58603/2 "2004-07-24T01:25:05Z")

</div>

I can only manage a theory solution here, but it should be fairly straightforward to implement.

if you haven’t done it already, I’d advise labelling all the required frames.

On each button, in the OnRelease function, have it set

```auto
_root.choice = something <-- put the relevant frame label/number here

```

before it hits the gotoAndPlay()

then, on the last frame of the stop animation, before the stop() put

```auto
this.gotoAndPlay(_root.choice);

```

That’s how I did my last one. It’s not the most elegant method, by any means, but it works, and for small numbers of items, it’s quicker than writing the script, especially if you already have all your stuff on the timeline.

Apologies if I’m barking up the wrong tree. I should be in bed, but the washing machine is still running :snooze:
