<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Website Design &#187; Flash CS4 linking</title>
	<atom:link href="http://wickedrelevant.com/design/tag/flash-cs4-linking/feed/" rel="self" type="application/rss+xml" />
	<link>http://wickedrelevant.com/design</link>
	<description>that&#039;s wicked Relevant</description>
	<lastBuildDate>Wed, 25 Aug 2010 03:57:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding a link to your Flash</title>
		<link>http://wickedrelevant.com/design/flash/adding-a-link-to-your-flash/</link>
		<comments>http://wickedrelevant.com/design/flash/adding-a-link-to-your-flash/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 20:34:27 +0000</pubDate>
		<dc:creator>Debbi</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS4 linking]]></category>
		<category><![CDATA[getURL fix]]></category>

		<guid isPermaLink="false">http://wickedrelevant.com/design/?p=217</guid>
		<description><![CDATA[Ok, I&#8217;m not an expert in Flash (YET!) but I was surprised at how difficult it was to track down exactly how to do this.
So, you have a Flash file and you want to be able to click on a portion of it and have that click open a URL of your choice. Some of [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, I&#8217;m not an expert in Flash (YET!) but I was surprised at how difficult it was to track down exactly how to do this.</p>
<p>So, you have a Flash file and you want to be able to click on a portion of it and have that click open a URL of your choice. Some of the problems I ran into is that the getURL command is no longer functional in Actionscript 3.0, which is the current/latest version.  The code involved with the getURL command is much shorter but don&#8217;t be discouraged; it&#8217;s still a very easy thing to accomplish using the code I&#8217;ve listed below.</p>
<p>NOTE: there are a couple items you need to make certain of before you use this code:</p>
<ol>
<li>The instance name of the button/movie clip <strong>MUST</strong> be named to match your code below. If you don&#8217;t have the exact same name in both the Actionscript and as the instance name of your clip/button, it won&#8217;t work. Period. In this example, it&#8217;s named
<pre><code>my_btn</code></pre>
</li>
<li>It&#8217;s best to put this code into a NEW LAYER in your Flash file. I call this layer &#8216;actions&#8217; and it&#8217;s ALWAYS best to keep it separate to avoid any code issues.</li>
</ol>
<p>Ok, here&#8217;s your code:</p>
<pre><code>my_btn.addEventListener(MouseEvent.MOUSE_DOWN,
 mouseDownHandler);

function mouseDownHandler(event:MouseEvent):void {

    navigateToURL(new URLRequest("http://www.wickedrelevant.com/"));
}</code></pre>
<p>If you need additional help with this, or you&#8217;re a beginner with other questions, feel free to send me an <a title="Email Wicked Relevant" href="mailto:mail@wickedrelevant.com?subject=Flash questions">email.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wickedrelevant.com/design/flash/adding-a-link-to-your-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
