# loadMovie from html link

**URL:** https://forum.kirupa.com/t/loadmovie-from-html-link/30549
**Category:** flash
**Created:** [September 10, 2003, 2:16pm UTC](https://forum.kirupa.com/t/loadmovie-from-html-link/30549 "2003-09-10T14:16:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![z3r0](https://avatars.discourse-cdn.com/v4/letter/z/cdc98d/32.png) [@z3r0](https://forum.kirupa.com/u/z3r0)
#### Post date: [September 10, 2003, 2:16pm UTC](https://forum.kirupa.com/t/loadmovie-from-html-link/30549/1 "2003-09-10T14:16:05Z")

</div>

I´m trying to make a movie swf to load different .swf files but pressing html links in the same page it´s embeded.  
What I got is that links are passing good a variable called ´video´ to swf…

Using a jscript in html page, and html links as follows:

\<script language = “JavaScript”\>  
\<!–  
function PassFlash(){  
window.document.movie.SetVariable(“video”, “video.swf”);  
}  
//–\>  
\</script\>

\<a href="#" onClick=“PassFlash()”\>Load this video into flash please!\</a\>

But I think I didn´t build the actionscript correctly… I can´t find the way to make the movie to load a determinated .swf using that variable…

If I put a loadMovie (video, “mclipholder”) and a stop (); in a frame the variable is not useful because the movie doesn´t load.

If I add a gotoAndPlay (1) for making the movie loop, the swf loads again and again…

I want the main movie to be able to recognize when an html link is pressed (and passes the variable called ´video´) and then to load the correct movie…

Any help please?  
Thanks!

---

<div class="post-metadata">

### Author: ![stevester](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@stevester](https://forum.kirupa.com/u/stevester)
#### Post date: [April 9, 2006, 11:55pm UTC](https://forum.kirupa.com/t/loadmovie-from-html-link/30549/2 "2006-04-09T23:55:15Z")

</div>

Your javascript to flash code doesn’t work! I have tried it as well
