# Link play then call the var name

**URL:** https://forum.kirupa.com/t/link-play-then-call-the-var-name/165865
**Category:** Uncategorized
**Created:** [October 14, 2005, 3:11pm UTC](https://forum.kirupa.com/t/link-play-then-call-the-var-name/165865 "2005-10-14T15:11:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gllanci](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@gllanci](https://forum.kirupa.com/u/gllanci)
#### Post date: [October 14, 2005, 3:11pm UTC](https://forum.kirupa.com/t/link-play-then-call-the-var-name/165865/1 "2005-10-14T15:11:38Z")

</div>

Hi all

I am trying to make some links on my web site but I have no idea how it works.

So when I click on link that must start playin and in frame 20 if var link = home loadmovie home.swf …

I think i was understandable

Code:

button as:

on (release) {  
play();  
link=“home”;  
}

whenre should I write these:??

var link;  
this.onEnterFrame = function () {  
if(link==“home”)  
{  
\_root.cont.loadMovie(“home.swf”);  
}  
else if(link==“services”)  
{  
\_root.cont.loadMovie(“serv.swf”);  
}  
else if(link==“contact”)  
{  
\_root.cont.loadMovie(“cont.swf”); }  
}

thnx in your advance
