<?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>absent design &#124; iPhone, iPad design and development by Reuben Stanton &#187; tutorials</title>
	<atom:link href="http://blog.absentdesign.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.absentdesign.com</link>
	<description>from actionscript to objective-c, from development to design</description>
	<lastBuildDate>Mon, 06 Sep 2010 11:54:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The Flash max-height issue</title>
		<link>http://blog.absentdesign.com/2010/03/the-flash-max-height-issue/</link>
		<comments>http://blog.absentdesign.com/2010/03/the-flash-max-height-issue/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 03:23:56 +0000</pubDate>
		<dc:creator>Reuben</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://blog.absentdesign.com/?p=60</guid>
		<description><![CDATA[While working at Flint on the site for Paper Stone Scissors, I ran in to the little explored area of flash player 9&#8242;s maximum rendering area &#8211; the site uses JQuery to dynamically resize the flash HTML container to use browser scrollbars for long pages and unfortunately FP9 stops rendering graphics beyond 2880&#215;2880 pixels&#8230; a bit [...]]]></description>
			<content:encoded><![CDATA[<p>While working at <a href="http://www.flintinteractive.com.au/">Flint</a> on the site for <a href="http://www.paperstonescissors.com/">Paper Stone Scissors</a>, I ran in to the little explored area of flash player 9&#8242;s maximum rendering area &#8211; the site uses JQuery to dynamically resize the flash HTML container to use browser scrollbars for long pages and unfortunately FP9 stops rendering graphics beyond 2880&#215;2880 pixels&#8230; a bit of a problem where the site often scrolls to 4000px or more&#8230;</p>
<p>Redesign to use flash-based scrollbars wasn&#8217;t an option. After hours of messing around, I found a solution: use Javascript to keep the size of the flash within the renderable area, and fool the user in to <em>thinking they are scrolling HTML content when they are actually scrolling the flash</em>.</p>
<p>Do this by:<br />
- Initially setting the size of the flash element to the desired full size (this sets the correct scrollbar size).<br />
- While scrolling, use external interface to pass the scroll value of the browser in to flash.<br />
Track the value in JS <em>and</em> in flash, and if the scroll value hits the maximum value:</p>
<ol>
<li>In Javascript - reset the size of the flash html element to the max renderable size</li>
<li>In flash &#8211; as the browser scrolls, scroll the flash content container in the <em>other</em> direction (this keeps the flash content within the maximum render area)</li>
<li>In Javascript &#8211; add padding to the top of the flash html element to keep the scroll position correct</li>
</ol>
<p>I had a lot of trouble finding resources about this issue online, I hope this can help someone with the same problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.absentdesign.com/2010/03/the-flash-max-height-issue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple mxmlc compiling on a Mac</title>
		<link>http://blog.absentdesign.com/2009/03/simple-mxmlc-compiling-on-a-mac/</link>
		<comments>http://blog.absentdesign.com/2009/03/simple-mxmlc-compiling-on-a-mac/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 21:33:38 +0000</pubDate>
		<dc:creator>Reuben</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://absentdesign.wordpress.com/?p=7</guid>
		<description><![CDATA[The problem with being a flash developer from a traditional graphic design background is that there are some things that just don&#8217;t come naturally. One of these is working in a command-line environment. I&#8217;ve been using the Flash IDE as my development environment on the Mac since Flash 4. Around the time of Flash 5 [...]]]></description>
			<content:encoded><![CDATA[<p>The problem with being a flash developer from a traditional graphic design background is that there are some things that just don&#8217;t come naturally. One of these is working in a command-line environment.</p>
<p>I&#8217;ve been using the Flash IDE as my development environment on the Mac since Flash 4. Around the time of Flash 5 I started using BBEdit to edit external .as files, around MX I switched to TextMate for AS2 development, and now use TextMate exclusively for AS3 projects. But I&#8217;ve always used the IDE as my compiler, and there was always my designer&#8217;s preference to use the IDE to draw and layout objects rather than generate everything programatically. In developing my WordPress library I&#8217;ve been forced to bite the bullet and move to MXMLC, for the simple reason that the built in RPC libraries and Ak33m&#8217;s XML-RPC are only available for the Flex SDK.</p>
<p>I&#8217;m basically a total unix-command-line newbie, and there is a real dearth of information for people like me on how to command line compile in the mac environment. There is <a href="http://www.senocular.com/flash/tutorials/as3withmxmlc/">this tutorial by Senocular</a> for the PC, and there are plenty of tutorials out there about using MXML, integrating shell commands to use ANT etc etc, but all of these assume you <em>know what you are doing already</em>.</p>
<p>I <em>don&#8217;t know what I&#8217;m doing</em> though. All I want is to be able to integrate the Flex SDK classes without having to purchase and learn Flex and MXML &#8211; I&#8217;ve discovered  that this is of course not only <em>possible</em>, but <em>easy -</em> not that you&#8217;d know it by looking online.</p>
<h3>Here&#8217;s a way to do it</h3>
<h4>1. Download the Flex2 SDK from <a href="http://labs.adobe.com/technologies/flex/sdk/flex2sdk.html">Adobe Labs</a></h4>
<p>The Flex2 SDK is free! It includes the flex libraries and and the mxmlc compiler you will need to use the command line.</p>
<h4>2. Put the Flex2 SDK somewhere sensible</h4>
<blockquote><p>I put mine in <code>~/Documents/Library/Flex/flex2_sdk_hf1/</code></p></blockquote>
<h4>3. Open a terminal window</h4>
<blockquote><p>Usually <code>~/Applications/Utilities/Terminal.app</code></p></blockquote>
<h4>4. Navigate to your project folder, eg:</h4>
<blockquote><p><code>cd Documents/Projects/my_flash_project/Development/</code></p></blockquote>
<h4>5. Run fcsh</h4>
<p>Fcsh is the <em>Flex Compiler SHell</em>, a wrapper for MXMLC that makes compiling fast and easy. The simplest way to run this command is <strong>use the Finder to navigate to where you put the Flex SDK</strong>, find fcsh (in <code><strong>bin/fcsh</strong></code>) and <strong>drag and drop this file into your terminal window</strong>.</p>
<p>You should now see the following:</p>
<blockquote><p><code>Adobe Flex Compiler SHell (fcsh)<br />
Version 2.0.1 build 159086<br />
Copyright (c) 2004-2006 Adobe Systems, Inc. All rights reserved.</code></p>
<p><code> </code></p>
<p><code>(fcsh)</code></p></blockquote>
<h4>6. Compile your flash app using mxmlc</h4>
<p>The syntax to use is:</p>
<blockquote><p><code>mxmlc <span style="color:#00ccff;">path/to/MainFileForYourApplication.as</span> -sp <span style="color:#00ccff;">path/to/source/folder</span> -o <span style="color:#00ccff;">relative/path/to/output/filename.swf</span></code></p></blockquote>
<p>eg:</p>
<blockquote><p><code>mxmlc <span style="color:#00ccff;">src/com/reubenstanton/Main.as</span> -sp <span style="color:#800080;"><span style="color:#00ccff;">src/</span> </span>-o <span style="color:#00ccff;">../Deployment/main.swf</span></code></p></blockquote>
<p>The output will be something like:</p>
<blockquote><p><code>fcsh: Assigned 1 as the compile target id<br />
Loading configuration file /Users/absent/Documents/Library/Flex/flex2_sdk_hf1/frameworks/flex-config.xml<br />
../Deployment/main.swf (82769 bytes)</code></p></blockquote>
<p>You see that last line <code>../Deployment/main.swf</code>? If you navigate to this folder, you should see your swf sitting there! That&#8217;s it.</p>
<p>As you see above, fcsh <em>Assigned 1 as the compile target id</em>. This is just a shortcut to the compile command you just wrote &#8211; it means next time you want to compile you can just enter<span style="color:#993366;"> </span><code><span style="color:#00ccff;">mxmlc 1</span></code> instead of typing the whole command again.</p>
<h4>Now you can use Flex libraries in your flash projects without learning Flex and MXML.</h4>
<p>This took me hours to figure out, so I hope it helps some of you out there.</p>
<h4>Here are a few resources to help along the way:</h4>
<ul>
<li><a href="http://labs.adobe.com/technologies/flex/sdk/flex2sdk.html">The Flex2 SDK</a> from Adobe Labs</li>
<li><a href="http://labs.adobe.com/wiki/index.php/Flex_Compiler_Shell">The Flex Compiler Shell</a> from Adobe Labs</li>
<li><a href="http://www.osxfaq.com/Tutorials/LearningCenter/">Using the terminal</a> from OSX Faq</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.absentdesign.com/2009/03/simple-mxmlc-compiling-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
