<?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>ohsomuchwork</title>
	<atom:link href="http://ohsomodern.org/work/feed" rel="self" type="application/rss+xml" />
	<link>http://ohsomodern.org/work</link>
	<description>Code snippets, ActionScript 3.0 and some other tech stuff</description>
	<lastBuildDate>Wed, 25 Apr 2012 08:30:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Starting XAMPP Apache and MySQL on startup (Mac)</title>
		<link>http://ohsomodern.org/work/mac-os-x-lion/starting-xampp-apache-and-mysql-on-startup-mac</link>
		<comments>http://ohsomodern.org/work/mac-os-x-lion/starting-xampp-apache-and-mysql-on-startup-mac#comments</comments>
		<pubDate>Wed, 25 Apr 2012 08:30:23 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[Mac OS X Lion]]></category>
		<category><![CDATA[XAMPP]]></category>
		<category><![CDATA[automator]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=256</guid>
		<description><![CDATA[You can create an Automator application to get Apache and MySQL (and any other XAMPP features, like FTP) to automatically be started when restarting the computer. Start Automator and choose Application. Then drag the &#8220;Run shell script&#8221; command to the &#8230; <a href="http://ohsomodern.org/work/mac-os-x-lion/starting-xampp-apache-and-mysql-on-startup-mac">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You can create an Automator application to get Apache and MySQL (and any other XAMPP features, like FTP) to automatically be started when restarting the computer. Start Automator and choose Application. Then drag the &#8220;Run shell script&#8221; command to the actions window.</p>
<p>Then paste the following code:</p>
<pre>echo "[PW]" | sudo -S /Applications/XAMPP/xamppfiles/xampp startapache
echo "[PW]" | sudo -S /Applications/XAMPP/xamppfiles/xampp startmysql</pre>
<p>Replace [PW] with your password. This might obviously not be a safe solution as you have to type your user account password in, but if you want it to work, I found this solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/mac-os-x-lion/starting-xampp-apache-and-mysql-on-startup-mac/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XAMPP WordPress FTP password on Mac OS X</title>
		<link>http://ohsomodern.org/work/mac-os-x-lion/xampp-wordpress-ftp-password-on-mac-os-x</link>
		<comments>http://ohsomodern.org/work/mac-os-x-lion/xampp-wordpress-ftp-password-on-mac-os-x#comments</comments>
		<pubDate>Sat, 21 Apr 2012 16:30:35 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[Mac OS X Lion]]></category>
		<category><![CDATA[Mac OS X Snow Leopard]]></category>
		<category><![CDATA[XAMPP]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[proftpd]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=253</guid>
		<description><![CDATA[There are a lot of articles regarding the problems with the FTP connection that WordPress seems to require when running it on localhost on a Mac with XAMPP, mainly this technical solution has been helpful. Problems logging in to the &#8230; <a href="http://ohsomodern.org/work/mac-os-x-lion/xampp-wordpress-ftp-password-on-mac-os-x">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are a lot of articles regarding the problems with the FTP connection that WordPress seems to require when running it on localhost on a Mac with XAMPP, mainly <a href="http://zenverse.net/wordpress-ftp-login-problem-xampp-mac-localhost/" target="_blank">this technical solution</a> has been helpful. Problems logging in to the FTP server, knowing what username and password to use, etc.</p>
<p>It did not help me though, but this Terminal trick finally got me past the FTP requirement on my localhost.</p>
<pre>sudo chown -R your-user-name:staff wordpress-install-directory</pre>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/mac-os-x-lion/xampp-wordpress-ftp-password-on-mac-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeIgniter Ajax Get/Post</title>
		<link>http://ohsomodern.org/work/codeigniter/codeigniter-ajax-getpost</link>
		<comments>http://ohsomodern.org/work/codeigniter/codeigniter-ajax-getpost#comments</comments>
		<pubDate>Fri, 13 Apr 2012 12:24:28 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=250</guid>
		<description><![CDATA[$.get("functionName", {id: "some id"}, function(data){ var encoded = $.parseJSON(data); console.log(encoded[0].someProperty); }); function functionName() { echo json_encode(some array); }]]></description>
			<content:encoded><![CDATA[<pre>$.get("functionName", {id: "some id"}, function(data){
var encoded = $.parseJSON(data);					console.log(encoded[0].someProperty);
});</pre>
<pre>function functionName() {
echo json_encode(some array);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/codeigniter/codeigniter-ajax-getpost/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GreenSock TweenLite/TimelineLite caching height of textfield</title>
		<link>http://ohsomodern.org/work/actionscript3/greensock-tweenlitetimelinelite-caching-height-of-textfield</link>
		<comments>http://ohsomodern.org/work/actionscript3/greensock-tweenlitetimelinelite-caching-height-of-textfield#comments</comments>
		<pubDate>Fri, 06 Apr 2012 12:48:18 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[greensock]]></category>
		<category><![CDATA[height]]></category>
		<category><![CDATA[TextField]]></category>
		<category><![CDATA[TimelineLite]]></category>
		<category><![CDATA[tweening]]></category>
		<category><![CDATA[TweenLite]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=244</guid>
		<description><![CDATA[I was trying to do a smooth animation sequence like this: Tween TextField alpha to 0. Tween background MovieClip to height 0. Change the text. Tween the background MovieClip to height of the changed TextField. Tween TextField alpha back to &#8230; <a href="http://ohsomodern.org/work/actionscript3/greensock-tweenlitetimelinelite-caching-height-of-textfield">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was trying to do a smooth animation sequence like this:</p>
<ol>
<li>Tween TextField alpha to 0.</li>
<li>Tween background MovieClip to height 0.</li>
<li>Change the text.</li>
<li>Tween the background MovieClip to height of the changed TextField.</li>
<li>Tween TextField alpha back to 1.</li>
</ol>
<p>Unfortunately, when creating the timeline sequence the height of the TextField got &#8220;cached&#8221; and was not updated on runtime after the text of the TextField had changed. My workaround on this is to append to the timeline <strong>after</strong> the text has been changed, and not build the whole sequence at once.</p>
<p>Not sure how this would work if there had to be things done after updating the texts, but I assume you can insert at a specific time/label in the Timeline, so that would solve it, I assume.</p>
<p><a href="http://ohsomodern.org/work/wp-content/uploads/2012/04/Textbox.swf">Textbox</a> SWF</p>
<p>Hm, not in the swf but I added code to remove the tweens once they are done, otherwise it keeps appending to the end of the timeline each time the animation is run.</p>
<p>Code:</p>
<pre>
import com.greensock.*;
import com.greensock.easing.*;
import flash.events.MouseEvent;
import flash.text.TextFieldAutoSize;

button_mc.addEventListener(MouseEvent.CLICK, update);
reset_mc.addEventListener(MouseEvent.CLICK, reset);
button_mc.buttonMode = true;
reset_mc.buttonMode = true;
popup_mc.x = 0;
popup_mc.y = 50;

popup_mc.body_txt.autoSize = TextFieldAutoSize.LEFT;

var texts:Array = new Array();
texts.push("Cotton candy sweet roll carrot cake candy. Jelly tart tart icing wafer carrot cake biscuit macaroon. Sweet roll pie faworki marshmallow bonbon bear claw. Chocolate caramels cake sweet roll marzipan. Lemon drops icing wafer soufflé brownie brownie candy canes donut. Muffin pastry gummies sweet roll dragée caramels jelly apple pie. Carrot cake fruitcake marzipan fruitcake dragée biscuit tootsie roll cookie. Marshmallow bonbon oat cake. Pudding cake gummies bonbon dessert caramels sugar plum candy bonbon. Wafer candy canes tiramisu brownie jelly-o. Liquorice pastry pie. Toffee dessert pie. Chocolate cake biscuit lemon drops gummies jelly-o cake cake candy canes sesame snaps.");
texts.push("Jelly beans macaroon brownie dragée. Jelly chocolate cake chupa chups caramels pastry sweet roll marshmallow. Liquorice gummies sweet roll. Tart liquorice chocolate faworki cake cake. Icing pastry marzipan jelly-o bear claw cookie ice cream lemon drops. Jelly-o bear claw tart applicake. Ice cream pie sweet tootsie roll gummi bears dessert cotton candy. Bonbon bear claw bonbon pudding. Gummies jelly-o liquorice candy canes sweet roll. Bonbon apple pie marzipan pastry jelly beans marzipan chocolate bar powder. Cake biscuit candy lemon drops marshmallow chocolate cake applicake. Jelly beans croissant pie applicake apple pie sugar plum lollipop.");
texts.push("Tootsie roll croissant liquorice. Dragée chocolate cake macaroon. Chocolate bar gummi bears ice cream faworki wypas. Bonbon bear claw candy cotton candy gummies dessert. Sesame snaps cotton candy marshmallow soufflé jujubes gingerbread pie pudding. Topping icing tiramisu pie bonbon halvah. Fruitcake wypas tootsie roll wafer icing. Brownie topping sweet roll carrot cake faworki chocolate bar gummies cookie chocolate. Bear claw pudding muffin candy canes. Fruitcake croissant chocolate apple pie donut brownie cotton candy jelly sweet roll. Carrot cake lemon drops caramels icing muffin halvah. Croissant biscuit muffin marshmallow. Candy jelly-o candy canes sweet roll caramels wypas gingerbread danish.");

var tm:TimelineMax = new TimelineMax({onComplete: removeOldTweens});
tm.stop();
tm.appendMultiple([new TweenLite(popup_mc.header_txt, 1, {alpha: 0}), new TweenLite(popup_mc.body_txt, 1, {alpha: 0})]);
tm.appendMultiple([new TweenLite(popup_mc.greenBody_mc, 1, {height: 0}), new TweenLite(popup_mc.greenArrow_mc, 1, {y: popup_mc.greenHeader_mc.y + 25})]);
tm.append(new TweenLite(popup_mc, 1, {x: 50}));
tm.addCallback(changeText, 3);

var headerTween:TweenLite;
var bodyBgTween:TweenLite;
var arrowTween:TweenLite;
var textFieldTween:TweenLite;

function changeText():void {
	popup_mc.header_txt.text = "Another headline on this information box";
	popup_mc.body_txt.text = texts[int(Math.random() * 2)];
	popup_mc.body_txt.width = 290;

	// append to timeline
	headerTween = new TweenLite(popup_mc.header_txt, 1, {alpha: 1});
	bodyBgTween = new TweenLite(popup_mc.greenBody_mc, 1, {height:  popup_mc.body_txt.height+10});
	arrowTween = new TweenLite(popup_mc.greenArrow_mc, 1, {y: popup_mc.body_txt.height+10+25});
	textFieldTween = new TweenLite(popup_mc.body_txt, 1, {alpha: 1});

	tm.append(headerTween);
	tm.appendMultiple([bodyBgTween, arrowTween]);
	tm.append(textFieldTween);
}

function removeOldTweens():void {
	tm.remove(headerTween);
	tm.remove(bodyBgTween);
	tm.remove(arrowTween);
	tm.remove(textFieldTween);

	headerTween = null;
	bodyBgTween = null;
	arrowTween = null;
	textFieldTween = null;
}

function update(e:MouseEvent):void {
	tm.play();
}

function reset(e:MouseEvent):void {
	popup_mc.x = 0;
	popup_mc.y = 50;
	popup_mc.header_txt.text = "Header text!";
	popup_mc.body_txt.text = "Blah blah";
	tm.gotoAndStop(0);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/actionscript3/greensock-tweenlitetimelinelite-caching-height-of-textfield/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooth scrolling TextField in ActionScript 3.0 with TweenMax from Greensock</title>
		<link>http://ohsomodern.org/work/actionscript3/smooth-scrolling-textfield-in-actionscript-3-0-with-tweenmax-from-greensock</link>
		<comments>http://ohsomodern.org/work/actionscript3/smooth-scrolling-textfield-in-actionscript-3-0-with-tweenmax-from-greensock#comments</comments>
		<pubDate>Tue, 21 Feb 2012 13:34:12 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=241</guid>
		<description><![CDATA[Flash My Mind has a tutorial on how to make a blurred scrollbox in Flash with little help from Greensock/TweenMax. It can be used to scroll TextFields and other content. The tutorial can be found here. In case your content &#8230; <a href="http://ohsomodern.org/work/actionscript3/smooth-scrolling-textfield-in-actionscript-3-0-with-tweenmax-from-greensock">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Flash My Mind has a tutorial on how to make a blurred scrollbox in Flash with little help from Greensock/TweenMax. It can be used to scroll TextFields and other content. The tutorial can be found <a href="http://tutorials.flashmymind.com/2009/02/movieclip-scroller/" target="_blank">here</a>.</p>
<p>In case your content doesn&#8217;t scroll all the way back up, I found that this piece of code helps to work things out:<br />
<code><br />
var target:Number = ((myContent.height * 1.2 - myMask.height) * percentage) - myMask.y;<br />
</code><br />
So, multiply your content&#8217;s height with 20 % or something like that. It gives you a little bit of margin so you might experiment with this number. Then, instead of adding the y position of the mask to the target number, subtract it.</p>
<p>This did the trick for me!</p>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/actionscript3/smooth-scrolling-textfield-in-actionscript-3-0-with-tweenmax-from-greensock/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevent loaded XML caching in ActionScript 3</title>
		<link>http://ohsomodern.org/work/actionscript3/prevent-loaded-xml-caching-in-actionscript-3</link>
		<comments>http://ohsomodern.org/work/actionscript3/prevent-loaded-xml-caching-in-actionscript-3#comments</comments>
		<pubDate>Tue, 10 Jan 2012 11:15:42 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=237</guid>
		<description><![CDATA[Method 1: var loader:URLLoader = new URLLoader(); var req:URLRequest = new URLRequest("thefiletoload.xml"); req.method = URLRequestMethod.POST; req.data = true; loader.load(req); Method 2: var userFilePath:String = "thefiletoload.xml"; if(Capabilities.playerType != "StandAlone" &#124;&#124; Capabilities.playerType != "External") { userFilePath += "?rnd=" + Math.random(); }]]></description>
			<content:encoded><![CDATA[<p>Method 1:</p>
<pre>var loader:URLLoader = new URLLoader();
var req:URLRequest = new URLRequest("thefiletoload.xml");
req.method = URLRequestMethod.POST;
req.data = true;
loader.load(req);</pre>
<p>Method 2:</p>
<pre>var userFilePath:String = "thefiletoload.xml";
if(Capabilities.playerType != "StandAlone" || Capabilities.playerType != "External") {
userFilePath += "?rnd=" + Math.random();
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/actionscript3/prevent-loaded-xml-caching-in-actionscript-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loading variables to ActionScript 3.0 from PHP</title>
		<link>http://ohsomodern.org/work/actionscript3/loading-variables-to-actionscript-3-0-from-php</link>
		<comments>http://ohsomodern.org/work/actionscript3/loading-variables-to-actionscript-3-0-from-php#comments</comments>
		<pubDate>Sun, 08 Jan 2012 22:33:30 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=234</guid>
		<description><![CDATA[Prefix the request with http:// if you get undefined variables. I.e. don&#8217;t do: new URLRequest("myfile.php"); Do: new URLRequest("http://mydomain.com/myfile.php");]]></description>
			<content:encoded><![CDATA[<p>Prefix the request with http:// if you get undefined variables.</p>
<p>I.e. don&#8217;t do:</p>
<p><code>new URLRequest("myfile.php");</code></p>
<p>Do:</p>
<p><code>new URLRequest("http://mydomain.com/myfile.php");</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/actionscript3/loading-variables-to-actionscript-3-0-from-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get contacts from iCloud to Snow Leopard</title>
		<link>http://ohsomodern.org/work/mac-os-x-lion/get-contacts-from-icloud-to-snow-leopard</link>
		<comments>http://ohsomodern.org/work/mac-os-x-lion/get-contacts-from-icloud-to-snow-leopard#comments</comments>
		<pubDate>Sun, 08 Jan 2012 17:29:54 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[Mac OS X Lion]]></category>
		<category><![CDATA[Mac OS X Snow Leopard]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=232</guid>
		<description><![CDATA[Rolling back from Lion, you can get your contacts from iCloud by logging on to www.icloud.com, signing in, then going to Contacts, selecting all the contacts (Cmd + A) and then from the Settings wheel in the bottom left corner &#8230; <a href="http://ohsomodern.org/work/mac-os-x-lion/get-contacts-from-icloud-to-snow-leopard">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Rolling back from Lion, you can get your contacts from iCloud by logging on to www.icloud.com, signing in, then going to Contacts, selecting all the contacts (Cmd + A) and then from the Settings wheel in the bottom left corner choosing Export vCard&#8230;</p>
<p>You can then open the exported file with Address Book and all your contacts are back in there! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/mac-os-x-lion/get-contacts-from-icloud-to-snow-leopard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X XAMPP phpMyAdmin error</title>
		<link>http://ohsomodern.org/work/php/mac-os-x-xampp-phpmyadmin-error</link>
		<comments>http://ohsomodern.org/work/php/mac-os-x-xampp-phpmyadmin-error#comments</comments>
		<pubDate>Sat, 31 Dec 2011 10:57:08 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=229</guid>
		<description><![CDATA[If your phpMyAdmin gets you the following error message: Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. You can try some of these options: Use a &#8230; <a href="http://ohsomodern.org/work/php/mac-os-x-xampp-phpmyadmin-error">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If your phpMyAdmin gets you the following error message:</p>
<p>Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.</p>
<p>You can try some of these options:</p>
<ul>
<li>Use a different browser; Firefox consistently gave me the error message, but Safari/Chrome did not.</li>
<li>Instead of accessing through http://localhost, try the local IP address of the computer.</li>
<li>Run the security on xampp (sudo /Applications/XAMPP/xamppfiles/xampp security</li>
</ul>
<p>I got this error on my Snow Leopard/XAMPP installation, but not on Lion.</p>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/php/mac-os-x-xampp-phpmyadmin-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export SWF to PDF</title>
		<link>http://ohsomodern.org/work/actionscript3/export-swf-to-pdf</link>
		<comments>http://ohsomodern.org/work/actionscript3/export-swf-to-pdf#comments</comments>
		<pubDate>Sun, 11 Dec 2011 11:54:40 +0000</pubDate>
		<dc:creator>jenni</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://ohsomodern.org/work/?p=227</guid>
		<description><![CDATA[Here&#8217;s some code on how to export an entire image/MovieClip/Sprite to a PDF document, using the AlivePDF library. private function printAsPDF():void {             trace("CREATE PDF");                          var pdf:PDF = new PDF();    &#8230; <a href="http://ohsomodern.org/work/actionscript3/export-swf-to-pdf">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some code on how to export an entire image/MovieClip/Sprite to a PDF document, using the <a href="http://alivepdf.bytearray.org/" target="_blank">AlivePDF</a> library.</p>
<pre>private function printAsPDF():void {
            trace("CREATE PDF");
            
            var pdf:PDF = new PDF();
            var page:Page = new Page(Orientation.LANDSCAPE, Unit.MM, Size.A4);
            pdf.addPage(page);
            pdf.setMargins(0, 0, 0, 0);
            pdf.setDisplayMode(Display.REAL, Layout.SINGLE_PAGE, PageMode.USE_NONE, 1.0);
            // this is the image/movie clip container we're saving to the PDF
            var img:Sprite = Sprite(Canvas.getInstance());
            
            var bmpData:BitmapData = new BitmapData(img.width, img.height, true, 0xFFFFFF);
            var matrix:Matrix = new Matrix();
            matrix.createBox(2, 2, 0, 100, 100);
            bmpData.draw(img, matrix, null, null, null, true);
            
            var res:Resize = new Resize(Mode.FIT_TO_PAGE, Position.CENTERED);
            pdf.addImage(img);
            
            var f:FileReference = new FileReference();
            f.save(pdf.save(Method.LOCAL), "min_pdf.pdf");
        }</pre>
]]></content:encoded>
			<wfw:commentRss>http://ohsomodern.org/work/actionscript3/export-swf-to-pdf/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

