<?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>In Flagrante Delicto! &#187; Links</title>
	<atom:link href="http://inflagrantedelicto.memoryspiral.com/tag/links/feed/" rel="self" type="application/rss+xml" />
	<link>http://inflagrantedelicto.memoryspiral.com</link>
	<description>Joseph Labrecque: Senior Interactive Software Engineer - Artist - Author - Speaker - Adobe Education Leader - Adobe Community Professional</description>
	<lastBuildDate>Mon, 06 Feb 2012 15:10:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HTML Links in Flex</title>
		<link>http://inflagrantedelicto.memoryspiral.com/2008/10/html-links-in-flex/</link>
		<comments>http://inflagrantedelicto.memoryspiral.com/2008/10/html-links-in-flex/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 15:51:55 +0000</pubDate>
		<dc:creator>Joseph Labrecque</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://inflagrantedelicto.memoryspiral.com/?p=315</guid>
		<description><![CDATA[I&#8217;ve never found the need to have HTML links in Flex behave (and look) like their true HTML counterparts, but a student recently asked how she could get HTML links defined in a Text control to behave like regular HTML &#8230; <a href="http://inflagrantedelicto.memoryspiral.com/2008/10/html-links-in-flex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never found the need to have HTML links in Flex behave (and look) like their true HTML counterparts, but a student recently asked how she could get HTML links defined in a Text control to behave like regular HTML links.  After digging around, I found a lot of references to this problem but the solution turned up at <a href="http://www.flexfreaks.com/forums/viewtopic.php?id=6">Flex Freaks</a>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #ff0000;">&quot;absolute&quot;</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">&lt;![CDATA[</span>
&nbsp;
<span style="color: #339933;">import mx.core.mx_internal;</span>
&nbsp;
<span style="color: #339933;">public function textHandler(e:Event):void</span>
<span style="color: #339933;">{</span>
<span style="color: #339933;">    var styleSheet:StyleSheet = new StyleSheet();</span>
<span style="color: #339933;">    styleSheet.setStyle(&quot;a:link&quot;, { textDecoration: &quot;underline&quot;, color: &quot;#30F&quot; });</span>
<span style="color: #339933;">    e.currentTarget.mx_internal::styleSheet = styleSheet;</span>
<span style="color: #339933;">}</span>
&nbsp;
<span style="color: #339933;">]]&gt;</span>
<span style="color: #339933;">&lt;/mx:Script&gt;</span> 
&nbsp;
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Text</span> initialize=<span style="color: #ff0000;">&quot;this.textHandler(event)&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:htmlText</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">        You may &lt;a href=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #7400FF;">&gt;</span></span>click<span style="color: #000000;">&lt;/a<span style="color: #7400FF;">&gt;</span></span> here.
    ]]&gt;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:htmlText</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Text</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></td></tr></table></div>

<p>Apparently, this should not be used with any degree of reliability so far as future-proofing is concerned since the mx.core.mx_internal class may flux between versions of the Flex SDK.</p>
<p>Listed in the rumored Flex 4 improvements are support for CSS descendant selectors, ID selectors, and space-delimited style names.  Something like this should really be handled via CSS so here&#8217;s hoping that this will soon be a much simpler process.</p>
<p>Not sure if I&#8217;ll ever need this in the future, but in the case that I do- I know it&#8217;s here for easy access.</p>
]]></content:encoded>
			<wfw:commentRss>http://inflagrantedelicto.memoryspiral.com/2008/10/html-links-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

