<?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: AS3 liquid layout class</title>
	<atom:link href="http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/</link>
	<description>Advertising, Interactive Art Direction, and usability.</description>
	<lastBuildDate>Thu, 29 Jul 2010 20:39:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: emilime</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-529</link>
		<dc:creator>emilime</dc:creator>
		<pubDate>Fri, 09 Apr 2010 07:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-529</guid>
		<description>&lt;a href=&quot;#comment-528&quot; rel=&quot;nofollow&quot;&gt;@ziriguidum&lt;/a&gt; where did you add your code in the class? could you upload the refactored class somewhere?</description>
		<content:encoded><![CDATA[<p><a href="#comment-528" rel="nofollow">@ziriguidum</a> where did you add your code in the class? could you upload the refactored class somewhere?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ziriguidum</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-528</link>
		<dc:creator>ziriguidum</dc:creator>
		<pubDate>Fri, 09 Apr 2010 03:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-528</guid>
		<description>great ! added this to it:

// match stage dimensions;
					$disp.width = _stage.stageWidth;
					$disp.height = _stage.stageHeight;
	
					if (_registeredObjects[$disp].fitStageHeight == true &amp;&amp; _registeredObjects[$disp].fitStageWidth == true)
						break;
						
					// adjust proportionally to fill stage width or height;
					if (_registeredObjects[$disp].fitStageHeight == true)
						$disp.scaleX = $disp.scaleY
					if (_registeredObjects[$disp].fitStageWidth == true)
						$disp.scaleY = $disp.scaleX
					else
						( $disp.scaleX &gt; $disp.scaleY ) ? $disp.scaleY = $disp.scaleX : $disp.scaleX = $disp.scaleY;


i want to implement also minWidth and minHeight and change the way the arguments are passed to be something more friendly like a tween call where i can pass args in no specfic order... instead of just true or false</description>
		<content:encoded><![CDATA[<p>great ! added this to it:</p>
<p>// match stage dimensions;<br />
					$disp.width = _stage.stageWidth;<br />
					$disp.height = _stage.stageHeight;</p>
<p>					if (_registeredObjects[$disp].fitStageHeight == true &amp;&amp; _registeredObjects[$disp].fitStageWidth == true)<br />
						break;</p>
<p>					// adjust proportionally to fill stage width or height;<br />
					if (_registeredObjects[$disp].fitStageHeight == true)<br />
						$disp.scaleX = $disp.scaleY<br />
					if (_registeredObjects[$disp].fitStageWidth == true)<br />
						$disp.scaleY = $disp.scaleX<br />
					else<br />
						( $disp.scaleX &gt; $disp.scaleY ) ? $disp.scaleY = $disp.scaleX : $disp.scaleX = $disp.scaleY;</p>
<p>i want to implement also minWidth and minHeight and change the way the arguments are passed to be something more friendly like a tween call where i can pass args in no specfic order&#8230; instead of just true or false</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-526</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Fri, 26 Mar 2010 03:01:13 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-526</guid>
		<description>I played around with the code a little bit and got it so the position of the items isnt dependant on what size the window is when you initially load the page. here is an example:

case TR:
  if (_registeredObjects[disp].stayRelative){
    // original code uses _stageW so it relies on original window size
    //disp.x = sw - _stageW + _registeredObjects[disp].ogX;

    // new code
    // figures out how far from the right of the page the item should be
    // depending on the minimum stage width assigned and subtracts that 
    // from the current stage width each time stage is resized
    disp.x = sw - (_minW - _registeredObjects[disp].ogX);
    //y doesn&#039;t change
  }else{
    disp.x = (sw - disp.width);
    disp.y = 0;
  }
  break;

I didnt mess with the code in the else statement because I&#039;m not using that in my application. Thanks a lot for this class guys. I&#039;ve always been a sucker for liquid layout. hence my company name = fluid web design</description>
		<content:encoded><![CDATA[<p>I played around with the code a little bit and got it so the position of the items isnt dependant on what size the window is when you initially load the page. here is an example:</p>
<p>case TR:<br />
  if (_registeredObjects[disp].stayRelative){<br />
    // original code uses _stageW so it relies on original window size<br />
    //disp.x = sw &#8211; _stageW + _registeredObjects[disp].ogX;</p>
<p>    // new code<br />
    // figures out how far from the right of the page the item should be<br />
    // depending on the minimum stage width assigned and subtracts that<br />
    // from the current stage width each time stage is resized<br />
    disp.x = sw &#8211; (_minW &#8211; _registeredObjects[disp].ogX);<br />
    //y doesn&#8217;t change<br />
  }else{<br />
    disp.x = (sw &#8211; disp.width);<br />
    disp.y = 0;<br />
  }<br />
  break;</p>
<p>I didnt mess with the code in the else statement because I&#8217;m not using that in my application. Thanks a lot for this class guys. I&#8217;ve always been a sucker for liquid layout. hence my company name = fluid web design</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-525</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Fri, 26 Mar 2010 01:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-525</guid>
		<description>I wonder how easy it would be to set the initial position of everything relative to where its at in the minimum dimensions you set. I say this because the initial positions of the items on the page is set into the browser no matter how large the browser window is. if I have my window maxed out when the page loads up, it doesnt move everything out to fit the window, it just keeps it all in the minimum area you set, so if I then make my window smaller, nothing happens. maybe I&#039;ll mess with this a little bit to see what I come up with.</description>
		<content:encoded><![CDATA[<p>I wonder how easy it would be to set the initial position of everything relative to where its at in the minimum dimensions you set. I say this because the initial positions of the items on the page is set into the browser no matter how large the browser window is. if I have my window maxed out when the page loads up, it doesnt move everything out to fit the window, it just keeps it all in the minimum area you set, so if I then make my window smaller, nothing happens. maybe I&#8217;ll mess with this a little bit to see what I come up with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deskin</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-523</link>
		<dc:creator>Deskin</dc:creator>
		<pubDate>Tue, 09 Mar 2010 08:13:41 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-523</guid>
		<description>@Josh Chernoff: You are my HERO !!!! Thank you very much!!!</description>
		<content:encoded><![CDATA[<p>@Josh Chernoff: You are my HERO !!!! Thank you very much!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: irralekgrooge</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-513</link>
		<dc:creator>irralekgrooge</dc:creator>
		<pubDate>Fri, 11 Dec 2009 09:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-513</guid>
		<description>Looks like you are a true professional. Did ya study about the subject? haha..</description>
		<content:encoded><![CDATA[<p>Looks like you are a true professional. Did ya study about the subject? haha..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Chernoff</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-497</link>
		<dc:creator>Josh Chernoff</dc:creator>
		<pubDate>Sat, 12 Sep 2009 21:06:20 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-497</guid>
		<description>Hey nice class, 

I cleaned up the packaging of the class for you. You should follow packages standards so that other people can store this with their other class.
http://gfxcomplex.com/wp-content/uploads/2009/09/StageAlignTool.zip

There are a few things still wrong with it though. 

1: stayRelative set to true breaks the class.

2: stayRelative set to true should be default since people would expect that the local x/y of the object would be where it positioned..

3: I added a throw error on the constrictor so that you can&#039;t create an instance and understand why. 

4: I added some basic docs: used asdoc with flash develop

5: I added a flash develop project. Way better then flash IDE and comparable to flash builder

6: you could probably dispatch an event when StageAlignTool is set on or off and or if you reached min x/y

7: you could use Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE to listen for when the DisplayOject is added to stage to start the init() or registerLocation(),  or to call kill when the item have been remove from the stage. that way you have to call one less function. 

Any how, nice work.</description>
		<content:encoded><![CDATA[<p>Hey nice class, </p>
<p>I cleaned up the packaging of the class for you. You should follow packages standards so that other people can store this with their other class.<br />
<a href="http://gfxcomplex.com/wp-content/uploads/2009/09/StageAlignTool.zip" rel="nofollow">http://gfxcomplex.com/wp-content/uploads/2009/09/StageAlignTool.zip</a></p>
<p>There are a few things still wrong with it though. </p>
<p>1: stayRelative set to true breaks the class.</p>
<p>2: stayRelative set to true should be default since people would expect that the local x/y of the object would be where it positioned..</p>
<p>3: I added a throw error on the constrictor so that you can&#8217;t create an instance and understand why. </p>
<p>4: I added some basic docs: used asdoc with flash develop</p>
<p>5: I added a flash develop project. Way better then flash IDE and comparable to flash builder</p>
<p>6: you could probably dispatch an event when StageAlignTool is set on or off and or if you reached min x/y</p>
<p>7: you could use Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE to listen for when the DisplayOject is added to stage to start the init() or registerLocation(),  or to call kill when the item have been remove from the stage. that way you have to call one less function. </p>
<p>Any how, nice work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marcus</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-476</link>
		<dc:creator>marcus</dc:creator>
		<pubDate>Thu, 04 Jun 2009 01:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-476</guid>
		<description>cool. worked sweet but when i used an external loader i got an error#1009 message. think i may have placed the code somewhere wrong? suggestions?

package {
import StageAlignTool;

public class Main extends MovieClip {

var object:MovieClipInstance = new MovieClipInstance();

public function Main() {
addEventListner(Event.ADDED_TO_STAGE, initMain);
}

private function initMain(event:Event) {
StageAlignTool.init(stage, 1024, 768);
StageAlignTool.registerLocation(object, StageAlignTool.TL);
}
}
}</description>
		<content:encoded><![CDATA[<p>cool. worked sweet but when i used an external loader i got an error#1009 message. think i may have placed the code somewhere wrong? suggestions?</p>
<p>package {<br />
import StageAlignTool;</p>
<p>public class Main extends MovieClip {</p>
<p>var object:MovieClipInstance = new MovieClipInstance();</p>
<p>public function Main() {<br />
addEventListner(Event.ADDED_TO_STAGE, initMain);<br />
}</p>
<p>private function initMain(event:Event) {<br />
StageAlignTool.init(stage, 1024, 768);<br />
StageAlignTool.registerLocation(object, StageAlignTool.TL);<br />
}<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruben Rojas</title>
		<link>http://juliankussman.com/blog/2009/04/08/as3-liquid-layout-class/comment-page-1/#comment-425</link>
		<dc:creator>Ruben Rojas</dc:creator>
		<pubDate>Thu, 09 Apr 2009 02:48:14 +0000</pubDate>
		<guid isPermaLink="false">http://juliankussman.com/blog/?p=97#comment-425</guid>
		<description>Can you post a example of the real usage? Thanks</description>
		<content:encoded><![CDATA[<p>Can you post a example of the real usage? Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
