# Play a clip and navigate away afterwards, how?

**URL:** <https://forum.kirupa.com/t/play-a-clip-and-navigate-away-afterwards-how/266543>\
**Category:** Uncategorized\
**Created:** [July 21, 2008, 10:18pm UTC](https://forum.kirupa.com/t/play-a-clip-and-navigate-away-afterwards-how/266543 "2008-07-21T22:18:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![etka](https://avatars.discourse-cdn.com/v4/letter/e/97f17d/32.png) [@etka](https://forum.kirupa.com/u/etka)\
**Post date:** [July 21, 2008, 10:18pm UTC](https://forum.kirupa.com/t/play-a-clip-and-navigate-away-afterwards-how/266543/1 "2008-07-21T22:18:05Z")

</div>

hello, i am new to here and might sound like i should have read more before posting questions, but i really have.

i am building a site, and i want to make it so that when i navigate from one page to another there would be a short animation of the page shrinking before giving way to the next page.

i have searched and tried various things, but it still doesn’t work. i have the following code

```auto

home1.addEventListener(MouseEvent.CLICK,hhome);
function hhome(event:MouseEvent):void {
lmc.play()
if lmc.currentFrame(10)
gotoAndPlay("home")
}

```

but when i press the home1 button it first plays the animation and then i have to press it again to navigate to “home” (it has to be 1 click). And i haven’t found anything like event.ENTER\_FRAME(specific frame).

I tried calling two functions at once (one for animation,one to navigate) but it navigated too quickly without letting the animation to play first.

I am sure there is a very simple way to do this, many sites have such a feat, but how?

really really thankyou all…
