Making a flash movie a link

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

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.

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…

i tried thowing the object in href frame…no go :frowning:

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

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

_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. :wink:

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…

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.