<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Multi-line strings in Actionscript 3</title>
	<atom:link href="http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/</link>
	<description>A blog about Adobe Flex</description>
	<lastBuildDate>Thu, 09 Feb 2012 13:51:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: Greg Bulmash</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-211304</link>
		<dc:creator>Greg Bulmash</dc:creator>
		<pubDate>Mon, 13 Jun 2011 19:31:49 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-211304</guid>
		<description>Just a note of thanks. 4 years later, I Google for heredoc in Flex and voila. Try it to make sure the mx:HTML component will display some test documents correctly with a quick cut and paste into my sandbox/playground app and it&#039;s wonderful.

Thanks!</description>
		<content:encoded><![CDATA[<p>Just a note of thanks. 4 years later, I Google for heredoc in Flex and voila. Try it to make sure the mx:HTML component will display some test documents correctly with a quick cut and paste into my sandbox/playground app and it&#8217;s wonderful.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Naman</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-210785</link>
		<dc:creator>Michael Naman</dc:creator>
		<pubDate>Tue, 08 Mar 2011 18:16:47 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-210785</guid>
		<description>A simple solution for storing JavaScript in AS3 is to embed it as a class like so;

[Embed(source = &quot;jsFunctionInjection.js&quot;, mimeType=&quot;application/octet-stream&quot;)]
protected var MyJavascript:Class;

You can then get the string version for injection by doing this;

var js:String = new MyJavascript().toString();

I&#039;ve made a class that tests to see if jQuery is present, if not it injects it into the DOM, then executes a JavaScript function that utilises jQuery. Here&#039;s a great source for all JavaScript injection (it&#039;s 6 pages long but really worth it)

http://bit.ly/12wcm</description>
		<content:encoded><![CDATA[<p>A simple solution for storing JavaScript in AS3 is to embed it as a class like so;</p>
<p>[Embed(source = "jsFunctionInjection.js", mimeType="application/octet-stream")]<br />
protected var MyJavascript:Class;</p>
<p>You can then get the string version for injection by doing this;</p>
<p>var js:String = new MyJavascript().toString();</p>
<p>I&#8217;ve made a class that tests to see if jQuery is present, if not it injects it into the DOM, then executes a JavaScript function that utilises jQuery. Here&#8217;s a great source for all JavaScript injection (it&#8217;s 6 pages long but really worth it)</p>
<p><a href="http://bit.ly/12wcm" rel="nofollow">http://bit.ly/12wcm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joa Ebert</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-210784</link>
		<dc:creator>Joa Ebert</dc:creator>
		<pubDate>Tue, 08 Mar 2011 12:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-210784</guid>
		<description>You can also do this:

var x: String = &quot;\
  hello \
  world \
  xyz&quot;;

Since the \ will escape the line terminator. I know it is not exactly the same but sometimes a little more lightweight than going for CDATA :)</description>
		<content:encoded><![CDATA[<p>You can also do this:</p>
<p>var x: String = &#8220;\<br />
  hello \<br />
  world \<br />
  xyz&#8221;;</p>
<p>Since the \ will escape the line terminator. I know it is not exactly the same but sometimes a little more lightweight than going for CDATA <img src='http://dougmccune.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Understanding Flex &#187; Blog Archive &#187; a heredoc in Actionscript</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-210667</link>
		<dc:creator>Understanding Flex &#187; Blog Archive &#187; a heredoc in Actionscript</dc:creator>
		<pubDate>Sat, 05 Feb 2011 20:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-210667</guid>
		<description>[...] Doug McCune posted about it first (a long time [...]</description>
		<content:encoded><![CDATA[<p>[...] Doug McCune posted about it first (a long time [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: martin</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-210368</link>
		<dc:creator>martin</dc:creator>
		<pubDate>Tue, 23 Nov 2010 21:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-210368</guid>
		<description>You, my friend, are a sweetie pie.  This was an overlooked impending pain in my genitals.  Thanks to you it never got the chance to infuriate me.</description>
		<content:encoded><![CDATA[<p>You, my friend, are a sweetie pie.  This was an overlooked impending pain in my genitals.  Thanks to you it never got the chance to infuriate me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-210054</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Thu, 05 Aug 2010 11:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-210054</guid>
		<description>great stuff, exactly what i needed. cdata forever</description>
		<content:encoded><![CDATA[<p>great stuff, exactly what i needed. cdata forever</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Telmo Carlos</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-209450</link>
		<dc:creator>Telmo Carlos</dc:creator>
		<pubDate>Wed, 02 Jun 2010 13:41:11 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-209450</guid>
		<description>Thanks! Took me a while to find this page but the solution works perfectly!

I am embedding Processing code into Processing.as and compiling using the command line.

Here&#039;s my Actionscript code:

private var script:String = ( &lt;![CDATA[
    size(200, 200);
    smooth();
    background(0);
    strokeWeight(10);
    
    for(int i = 0; i &lt; width; i++) {
      float r = random(255);
      float x = random(0, width);
      stroke(r, 100);
      line(i, 0, x, height);
    }		
]]&gt;).toString();



Great stuff!

Telmo</description>
		<content:encoded><![CDATA[<p>Thanks! Took me a while to find this page but the solution works perfectly!</p>
<p>I am embedding Processing code into Processing.as and compiling using the command line.</p>
<p>Here&#8217;s my Actionscript code:</p>
<p>private var script:String = ( &lt;![CDATA[<br />
    size(200, 200);<br />
    smooth();<br />
    background(0);<br />
    strokeWeight(10);</p>
<p>    for(int i = 0; i &lt; width; i++) {<br />
      float r = random(255);<br />
      float x = random(0, width);<br />
      stroke(r, 100);<br />
      line(i, 0, x, height);<br />
    }<br />
]]&gt;).toString();</p>
<p>Great stuff!</p>
<p>Telmo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-209398</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Thu, 13 May 2010 05:09:27 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-209398</guid>
		<description>In regards to Nur&#039;s comment:
I know this works in AS2, haven’t tried it in AS3:
myString = “This is line number one.”
myString += “\n”
myString += “This is the next line.”
----------------------------------------------------------------
I used this for an Air 1.5 application I&#039;m building in Flash CS4 with AS3 and it works just fine for me. I needed to reference variables (XML nodes) instead of just text and add this into items in a list component - found this solution to work perfectly. Short answer -&gt; It worked in AS3 for me.</description>
		<content:encoded><![CDATA[<p>In regards to Nur&#8217;s comment:<br />
I know this works in AS2, haven’t tried it in AS3:<br />
myString = “This is line number one.”<br />
myString += “\n”<br />
myString += “This is the next line.”<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
I used this for an Air 1.5 application I&#8217;m building in Flash CS4 with AS3 and it works just fine for me. I needed to reference variables (XML nodes) instead of just text and add this into items in a list component &#8211; found this solution to work perfectly. Short answer -&gt; It worked in AS3 for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-208478</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Mon, 05 Oct 2009 13:31:52 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-208478</guid>
		<description>Ah, excellent!  I was storing level data for my game as large XML files and really wasn&#039;t looking forward to removing all the newlines and pasting in thousands of characters of level data on a single, unreadable line.  Bravo - worked like a charm and saved me pulling out some Excedrin!  Thank you.  :)</description>
		<content:encoded><![CDATA[<p>Ah, excellent!  I was storing level data for my game as large XML files and really wasn&#8217;t looking forward to removing all the newlines and pasting in thousands of characters of level data on a single, unreadable line.  Bravo &#8211; worked like a charm and saved me pulling out some Excedrin!  Thank you.  <img src='http://dougmccune.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damilola "Chayz" Jegede</title>
		<link>http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/comment-page-1/#comment-207905</link>
		<dc:creator>Damilola "Chayz" Jegede</dc:creator>
		<pubDate>Fri, 05 Jun 2009 14:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://dougmccune.com/blog/2007/05/15/multi-line-strings-in-actionscript-3/#comment-207905</guid>
		<description>Hey Ya&#039;ll. Very good stuff. My own area is trying to embed CSS in an as file. Wierd huh? Thanks Doug!</description>
		<content:encoded><![CDATA[<p>Hey Ya&#8217;ll. Very good stuff. My own area is trying to embed CSS in an as file. Wierd huh? Thanks Doug!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

