# Making a flash movie a link

**URL:** <https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451>\
**Category:** Uncategorized\
**Created:** [August 5, 2004, 4:17pm UTC](https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451 "2004-08-05T16:17:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sukophantes](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sukophantes](https://forum.kirupa.com/u/sukophantes)\
**Post date:** [August 5, 2004, 4:17pm UTC](https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451/1 "2004-08-05T16:17:40Z")

</div>

holy crap, i cant for the life of me find anything on this!

id like to make a flash movie i made a link…like kirupa did at the intro to this stie…

any help?

thanks

---

<div class="post-metadata">

**Author:** ![TheRealAlan](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@TheRealAlan](https://forum.kirupa.com/u/TheRealAlan)\
**Post date:** [August 5, 2004, 4:22pm UTC](https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451/2 "2004-08-05T16:22:49Z")

</div>

What i do is i just make a big invisible button as a layer on top of the movie, and make that button link to whatever it needs to link to. If you don’t know how to make an invisible button it’s really easy, just do a search on here.

---

<div class="post-metadata">

**Author:** ![eyezberg](https://avatars.discourse-cdn.com/v4/letter/e/77aa72/32.png) [@eyezberg](https://forum.kirupa.com/u/eyezberg)\
**Post date:** [August 5, 2004, 5:20pm UTC](https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451/3 "2004-08-05T17:20:53Z")

</div>

Yup, that’s what I used too, just a thought tho’, what’d happen if you wrap the whole object /object tags between a href and /a tags…? never tried this, could work tho…

---

<div class="post-metadata">

**Author:** ![sukophantes](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sukophantes](https://forum.kirupa.com/u/sukophantes)\
**Post date:** [August 5, 2004, 6:14pm UTC](https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451/4 "2004-08-05T18:14:25Z")

</div>

i tried thowing the object in href frame…no go ☹

ill try out the invisible button, thanks a ton for the help

---

<div class="post-metadata">

**Author:** ![newhopekenny](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/newhopekenny/32/317_2.png) [@newhopekenny](https://forum.kirupa.com/u/newhopekenny)\
**Post date:** [August 5, 2004, 9:10pm UTC](https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451/5 "2004-08-05T21:10:20Z")

</div>

Just use this code for any SWF you want hyperlinked (add it to the first frame of your movie):

```auto
_root.createEmptyMovieClip("hiddenMC", 1);
_root.hiddenMC.onEnterFrame = function() {
	with (this) {
		// as long as the second value here is a zero
		// no one will be able to see your movieClip
		beginFill(0xFFFFFF, 0);
		// draw a box so that there's something to click on
		// (this won't work unless there's something inside
		// the movieclip for the user to click on)
		moveTo(0, 0);
		lineTo(Stage.width, 0);
		lineTo(Stage.width, Stage.height);
		lineTo(0, Stage.height);
		endFill();
		_x = 0;
		_y = 0;
	}
};
_root.hiddenMC.onRelease = function() {
	getURL("http://www.somelink.com", _blank);
};

```

You can use that code in any SWF, and it’ll automatically resize itself to fit the movie. Just change the URL and you should be golden. 😉

---

<div class="post-metadata">

**Author:** ![eyezberg](https://avatars.discourse-cdn.com/v4/letter/e/77aa72/32.png) [@eyezberg](https://forum.kirupa.com/u/eyezberg)\
**Post date:** [August 6, 2004, 5:57am UTC](https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451/6 "2004-08-06T05:57:49Z")

</div>

Nice, you should make that an mxp with a setable url param…  
And be carefull with level 1, might easily get overwritten be later code…

---

<div class="post-metadata">

**Author:** ![newhopekenny](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/newhopekenny/32/317_2.png) [@newhopekenny](https://forum.kirupa.com/u/newhopekenny)\
**Post date:** [August 6, 2004, 6:26am UTC](https://forum.kirupa.com/t/making-a-flash-movie-a-link/118451/7 "2004-08-06T06:26:58Z")

</div>

There’s actually a custom getNewDepth() function that goes with it, but for this post it wasn’t necessary (it finds a depth not being used by anything).

But an MXP would be a bit helpful, eh? Perhaps when I get a spare moment (more than I have now at least) I’ll do that (including of course the getNewDepth() function) and post it up here.
