<?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>DeanLogic</title>
	<atom:link href="http://deanlogic.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://deanlogic.com</link>
	<description>test sites, applications, plugin-ins and such</description>
	<lastBuildDate>Fri, 16 Dec 2011 17:34:50 +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>Spark LineGrid Component</title>
		<link>http://deanlogic.com/2011/12/spark-linegrid-component/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=spark-linegrid-component</link>
		<comments>http://deanlogic.com/2011/12/spark-linegrid-component/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 17:33:23 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Flex Examples]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Degrafa]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[grid line]]></category>
		<category><![CDATA[SPARK]]></category>
		<category><![CDATA[sprite]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1764</guid>
		<description><![CDATA[Since I had a day off, I decided to work on converting my old Flex Examples to the new Flex 4.  As stated in a previous post, the new Flex 4 breaks Degrafa and Degrafa seems to be defunct now.  Most of the drawing functions are handled with spark and sprite functions, but little things [...]]]></description>
			<content:encoded><![CDATA[<p>Since I had a day off, I decided to work on converting my old <a title="Flex Examples" href="http://deanlogic.com/flex-examples/">Flex Examples</a> to the new <a title="Adobe Flex" href="http://www.adobe.com/products/flex.html">Flex </a>4.  As stated in a previous post, the new Flex 4 breaks <a title="Degrafa" href="http://degrafa.org/" target="_blank">Degrafa</a> and Degrafa seems to be defunct now.  Most of the drawing functions are handled with <a title="Adobe Spark Component" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/List.html" target="_blank">spark</a> and <a title="Adobe AS3 sprite" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Sprite.html" target="_blank">sprite</a> functions, but little things like arcs and line repeaters are not.  So where before it was easy enough to create a repeating line in Degrafa, now I have to do a loop to create the lines needed.  Well, in this case, instead of drawing lines, I&#8217;m drawing rectangles.  While it might seem simple at first just to draw a bunch of rectangles together to create a grid, there is a little trickiness to it.  You can have to account for the size of the total grid, based on the number of columns, rows and the grid box size.  And you also have to use both the column and row count value to draw the correct number of rows and columns and at the right size.  It is all just a matter of thinking about it for a few moments and then having an &#8220;ah ha!&#8221; moment.  Another little quirk with the components is that when you add a visual element, it puts it in the center of the group component.  On the Egg Timer, I just left it there for now because it worked for what I needed.  I might change it later.  But for the LineGrid, it made for it not to line up correctly.  So, before I start drawing the rectangles, I had to determine the actual 0,0 location first.  It also took a couple tries to make sure I was using the right zero.</p>
<pre class="brush: as3; title: ; notranslate">

// Find the actual 0,0 start
var actualZeroX:int = -1 * ((columnCount * boxSize) * .5);
var actualZeroY:int = -1 * ((rowCount * boxSize) * .5);
</pre>
<p>One good thing about the new components, is that when you use the declarations, it is the same as creating a set function, which means less code.  I simply added declarations for the column and row counts, then put those values where I need them.  When I use the LineGrid component I add the values I need just like any other attribute.</p>
<pre class="brush: as3; title: ; notranslate">

&lt;components:LineGrid id=&quot;lineGrid1&quot; rowCount=&quot;5&quot; columnCount=&quot;5&quot; boxSize=&quot;50&quot; lineThickness=&quot;4&quot; lineColor=&quot;0x009900&quot; /&gt;
</pre>
<p>Here is the example showing a grid with equal columns and rows and then two other grids with column or rows determined by the size of the application.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SparkGridLines_699630384"
			class="flashmovie"
			width="800"
			height="300">
	<param name="movie" value="http://demo.deanlogic.com/Flex/GridLineRepeater/SparkGridLines.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://demo.deanlogic.com/Flex/GridLineRepeater/SparkGridLines.swf"
			name="fm_SparkGridLines_699630384"
			width="800"
			height="300">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/12/spark-linegrid-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Autoscroll Textarea</title>
		<link>http://deanlogic.com/2011/12/autoscroll-textarea/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=autoscroll-textarea</link>
		<comments>http://deanlogic.com/2011/12/autoscroll-textarea/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 02:32:26 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Flex Examples]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Mark Twain]]></category>
		<category><![CDATA[phrase]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[scrollbar]]></category>
		<category><![CDATA[scroller]]></category>
		<category><![CDATA[TextArea]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1744</guid>
		<description><![CDATA[One of the ways I like to debug my Flex applications is putting a TextArea item that is visible when needed to display certain items that usually would be display in a trace.  The benefit of this little trick is that I can see what is going on without having to go through Flex Builder.  [...]]]></description>
			<content:encoded><![CDATA[<p>One of the ways I like to debug my <a title="Flex" href="http://www.adobe.com/products/flex.html" target="_blank">Flex</a> applications is putting a <a title="Flex TextArea" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/TextArea.html" target="_blank">TextArea</a> item that is visible when needed to display certain items that usually would be display in a trace.  The benefit of this little trick is that I can see what is going on without having to go through Flex Builder.  Also, I happened to create a web service debugging application and it displayed the error and result text from the web service.  When displaying either debug or general result information, it is helpful if the TextArea scrolls up to show the latest information added.  I found code on the to do this in Flex 3, but things changed in Flex 4.  So I did a little searching and found some <a title="Programmatically Scrollign the Spark Textarea Control" href="http://blog.flexexamples.com/2010/02/18/programmatically-scrolling-the-spark-textarea-control-in-flex-4/" target="_blank">code that had a little too much code</a>.  There is a warning at the bottom of that post which states the API at the time was in Beta.  Maybe adding event listeners is the more correct way to automatically scroll the TextArea, but it certainty isn&#8217;t the quickest way.  Since the Flex 3 version was fairly simple, I took what I saw there and applied it in the way the old method worked.</p>
<p>The first thing is that the <a title="AS3 scroller" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Scroller.html" target="_blank"><strong>scroller</strong></a> is now it is own component within the TextArea.  So, you first have to access that withing the TextArea.  Then you need to choose either the <strong>vertical</strong> or<strong> horizontal scrollbar</strong>.  Since I set the width and the words automatically wrap, I only need the vertical scrollbar.  Then you get the value of the scrollbar, which you can read or set.  The key is to set the scrollbar to its <strong>maximum</strong> position, which in the case of a vertical scoller would show the bottom of the TextArea.  You change this value with the <strong>valueCommit</strong> function, that allows you to change things after a value is added.  Just don&#8217;t change the content value or you go into a loop.</p>
<pre class="brush: as3; title: ; notranslate">

&lt;s:TextArea id=&quot;fooText&quot; width=&quot;200&quot; height=&quot;200&quot;
valueCommit=&quot;fooText.scroller.verticalScrollBar.value = fooText.scroller.verticalScrollBar.maximum&quot; /&gt;
</pre>
<p>Unfortunately, it doesn&#8217;t seem to scroll completely down to the bottom completely.  I&#8217;ve created a little application to show text being added to the TextArea.  Every 10 seconds a random set of words will be added to each of the TextAreas.  As the amount of text increases, the TextArea with the dynamic scroller will scroll down, while the other TextArea just increases the scroller size.  To generate the random words, I used a few quotes from the <a title="Mark Twain Quotes" href="http://www.twainquotes.com" target="_blank">Mark Twain</a> quote site.  From those quotes, I used a script to convert the phrase <a title="An Array of Words from a String" href="http://stackoverflow.com/questions/3118118/create-an-array-of-words-strings-from-string" target="_blank">words into an array</a>. I modified the examples in order to pass in the array that I want to add the words to and get back a new array of words.  From there I used a basic <a title="Random Number within a Specified Range" href="http://active.tutsplus.com/tutorials/actionscript/quick-tip-get-a-random-number-within-a-specified-range-using-as3/" target="_blank">random number in range</a> script to get a random number of words.  Once I had the random number of words, I just grabbed that many <a title="Random Words from an Array" href="http://www.ultrashock.com/forum/viewthread/123965/" target="_blank">words in a loop from the Array</a>.  Finally, I adjusted the first word to make sure it had the <a title="Capitalize First Letter in a String" href="http://actionscriptsnips.blogspot.com/2009/07/capitalize-first-letter-in-string.html" target="_blank">first letter as upperCase</a> and the rest of the words to lowerCase.</p>
<pre class="brush: as3; title: ; notranslate">

public static function getArrayFromString(inputPhrase:String, sourceArray:Array):Array {
var reg:RegExp = /\W/i;
var wordsAsArray:Array = inputPhrase.replace(reg, &quot;&quot;).split(&quot; &quot;);

for(var w:int=0; w &lt; wordsAsArray.length; w++){
sourceArray.push(wordsAsArray[w].toString());
}

return sourceArray;
}

public static function upperCase(str:String) : String {
var firstChar:String = str.substr(0, 1);
var restOfString:String = str.substr(1, str.length);

return firstChar.toUpperCase() + restOfString.toLowerCase();
}
</pre>
<p>Here is the example. When the text expands past the available area for the first time, bot TextAreas look the same.  When the next random phrase is created, then the difference is more apparent.</p>
<p style="text-align: left;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SparkAreaScroll_914728816"
			class="flashmovie"
			width="480"
			height="240">
	<param name="movie" value="demo/Flex/LayoutTest/SparkAreaScroll.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="demo/Flex/LayoutTest/SparkAreaScroll.swf"
			name="fm_SparkAreaScroll_914728816"
			width="480"
			height="240">
	<!--<![endif]-->
		
<p style="text-align: left;"><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p style="text-align: left;">
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/12/autoscroll-textarea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New sprite Egg Timer</title>
		<link>http://deanlogic.com/2011/12/new-sprite-egg-timer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-sprite-egg-timer</link>
		<comments>http://deanlogic.com/2011/12/new-sprite-egg-timer/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 20:03:18 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[Flex Examples]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Degrafa]]></category>
		<category><![CDATA[egg timer]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1739</guid>
		<description><![CDATA[At work I upgraded to Flex 4.5 and started updating one of my projects.  I started running into errors with my components that used Degrafa.  Apparently the Degrafa group has stopped working on updates and code in Flex 4 has broken the arc and wedge drawing utilities.  This causes a problem with my Egg Timer [...]]]></description>
			<content:encoded><![CDATA[<p>At work I upgraded to <a title="Adobe Flex" href="http://www.adobe.com/products/flex.html">Flex 4.5</a> and started updating one of my projects.  I started running into errors with my components that used <a title="Degrafa" href="http://degrafa.org/" target="_blank">Degrafa</a>.  Apparently the Degrafa group has stopped working on updates and code in Flex 4 has broken the arc and wedge drawing utilities.  This causes a problem with my <a title="Egg Timer" href="http://deanlogic.com/2010/03/egg-timer/" target="_blank">Egg Timer</a> component, because it relies on the wedge or arc for the display.  I decided to use the new functions of Flex to create the timer.  Unfortunately, Flex still doesn&#8217;t have it&#8217;s own wedge or arc drawing utilities.  It does have a <a title="Action Script 3 - Graphics - curveTo" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html" target="_blank">curveTo</a> method as part of the Graphics function, but you still have to figure out what point you want to curve to what point.  I initially thought I could just use the <a title="Action Script 3 - Shape" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Shape.html" target="_blank">Shape</a> function to draw a <a title="Action Script 3 - Graphics -drawTriangles" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html#drawTriangles%28%29" target="_blank">triangle</a> and an <a title="Action Script 3 - Graphics - drawEllipse" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html#drawEllipse%28%29" target="_blank">ellipse</a>, join the two together and create a wedge.  However, that was proving to be too much of a pain to do.  Then I found Lee Brimelow&#8217;s <a title="Action Script Wedge Class" href="http://www.leebrimelow.com/?p=430" target="_blank">Action Script Wedge Class</a> (<a title="Google Project - Wedge Arc Drawing Utilities" href="http://code.google.com/p/leebrimelow/source/browse/trunk/as3/com/theflashblog/drawing/" target="_blank">Google Project Code Link</a>).  This made things simple, except for the part where the starting point is at 90° instead of 0.  For me, this wasn&#8217;t a big issue, because all I had to do was rotate the Sprite back 90 degrees to put it at the 0 position.  A <a title="Arc degree fix" href="http://www.leebrimelow.com/?p=430#comment-431699" target="_blank">poster provided other code</a> to fix the issue, but since it was fairly simple to fix, I didn&#8217;t bother using the other code.</p>
<pre class="brush: as3; title: ; notranslate">
var timerArc:Sprite = new Sprite();
timerArc.graphics.beginFill(0x000000);
timerArc.graphics.endFill();
timerArc.rotation = -90;
drawWedge(timerArc, 0, 0, timerSize, 360, 0);
</pre>
<p>Another little quirk with Flex 4 is the Declarations tag. Not completely familiar with everything new in Flex 4, I&#8217;m trying my best to try out new features. I figured adding the time defaults to the declarations would help things out.</p>
<pre class="brush: as3; title: ; notranslate">

&lt;fx:Declarations&gt;
&lt;fx:Number id=&quot;oneMinute&quot;&gt;60&lt;/fx:Number&gt;
&lt;/fx:Declarations&gt;
</pre>
<p>Well, not really.  After I had everything working with the wedges and the look of the timer, the <a title="Action Script 3 - Timer" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Timer.html" target="_blank">Timer</a> function was never reaching the TIMER_COMPLETE function.  After searching the web and trying to figure out why the Timer didn&#8217;t work the correct way anymore, I gave up using the Declarations area and moved the variables to the script tag area.  That fixed the issue.</p>
<pre class="brush: as3; title: ; notranslate">

// minutes in seconds
private var oneMinute:Number = 60;
private var twoMinute:Number = 120;
private var fiveMinute:Number = 300;
// timers with delay of 1 second, repeat of minute value
private var oneMinuteTimer:Timer = new Timer(1000, oneMinute);
private var twoMinuteTimer:Timer = new Timer(1000, twoMinute);
private var fiveMinuteTimer:Timer = new Timer(1000, fiveMinute);
</pre>
<p>To change the size of the timer, just use scaleX and scaleY on the component.  The default size is 50 x 50, which is a good general size, but I can see that there might be a need to make it larger or smaller.</p>
<p>Later I will probably add the multi-color option that shows green when things are still good, yellow when it is close to expiring and then red in the last 5 seconds.  I will also try working skins to see how I can use them with the Sprites.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SpriteTimer_1263796051"
			class="flashmovie"
			width="600"
			height="300">
	<param name="movie" value="../demo/Flex/EggTimer/SpriteTimer.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="../demo/Flex/EggTimer/SpriteTimer.swf"
			name="fm_SpriteTimer_1263796051"
			width="600"
			height="300">
	<!--<![endif]-->
		
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/12/new-sprite-egg-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crashing the Super Bowl</title>
		<link>http://deanlogic.com/2011/11/crashing-the-super-bowl/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=crashing-the-super-bowl</link>
		<comments>http://deanlogic.com/2011/11/crashing-the-super-bowl/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 14:40:15 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[Films]]></category>
		<category><![CDATA[Commercial]]></category>
		<category><![CDATA[Crash The Super Bowl]]></category>
		<category><![CDATA[Doritos]]></category>
		<category><![CDATA[Let's Make a Movie]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1730</guid>
		<description><![CDATA[For the past few years Dorito&#8217;s has offered a competition called Crash the Super Bowl to create a commercial that will be featured during the Super Bowl.  It is a genius marketing idea.  Thousands of entries will be submitted, Dorito&#8217;s pays pennies to the winner (compared to a normal advertisement agency) and the winner gets [...]]]></description>
			<content:encoded><![CDATA[<p>For the past few years <a title="Doritos" href="http://www.doritos.com/" target="_blank">Dorito&#8217;s</a> has offered a competition called <a title="Crash the Super Bowl" href="http://www.crashthesuperbowl.com/" target="_blank">Crash the Super Bowl</a> to create a commercial that will be featured during the Super Bowl.  It is a genius marketing idea.  Thousands of entries will be submitted, Dorito&#8217;s pays pennies to the winner (compared to a normal advertisement agency) and the winner gets a chance to be famous for 30 seconds. The <a title="Doritos reveal five 2007 contestants" href="http://multivu.prnewswire.com/mnr/fritolay/26441/" target="_blank">contest began in 2007</a> and had a local winner.  In 2009 (for the 2010 Super Bowl), the winners were a <a title="Doritos Super Bowl ad Made by Triangle group" href="http://www.wral.com/entertainment/story/6982980/" target="_blank">local group</a>, as was one of the <a title="Commerical Finalists" href="http://www.fritolay.com/about-us/press-release-20100105.html" target="_blank">other finalists</a>.</p>
<ul>
<li><a title="Live the Flavor" href="http://www.youtube.com/watch?v=HUFvJNQ0bnM" target="_blank">Live the Flavor -2007</a></li>
<li><a title="Kids These Days" href="http://www.youtube.com/watch?v=D4YNFO70Qhk" target="_blank">Kids these days &#8211; 2010</a></li>
<li><a title="Underdog" href="http://www.youtube.com/watch?v=hDqk8i8o6YQ" target="_blank">Underdog &#8211; 2010</a></li>
</ul>
<p>A couple of people in my <a title="Let's Make a Movie RTP" href="http://www.meetup.com/MakeAMovieRTP/" target="_blank">Let&#8217;s Make a Movie</a> group suggested that we do a Dorito&#8217;s commercial this year.  Well, people suggested it last year, but we never go around to it.  When it was suggested just a few weeks ago, it didn&#8217;t give us much time to get something created.  We had a meeting on Nov. 5th, took about a week to find a location and then shot it the following Monday.  Then I had to get the film from my two camera men, edit it and then submit it.  While some of the past commercials have been off the wall funny, ours isn&#8217;t that crazy.  I&#8217;m sure if we had more time we could have come up with something more out-of-the-box.  While looking through other videos however, I managed to come across multiple zombie, vampire and people acting like birds to get Dorito crumb videos.  So, even trying to be different, you end up being similar.  I guess you really have to dig deep to come up with something that might be truly unique.</p>
<p>I don&#8217;t know the exact number of entries, but it is at least over 1,000.  The panel of judges get to select the top 5, then everyone starts voting on January 4th, 2012.  Maybe we&#8217;ll get lucky and be in the finalist group.   For your viewing pleasure, here are the 3 entries that I submitted :<strong> The Divorce</strong></p>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=a3eC8RYcssw">www.youtube.com/watch?v=a3eC8RYcssw</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/11/crashing-the-super-bowl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Horizontal Slider and List synch</title>
		<link>http://deanlogic.com/2011/10/horizontal-slider-list-synch/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=horizontal-slider-list-synch</link>
		<comments>http://deanlogic.com/2011/10/horizontal-slider-list-synch/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 18:40:16 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[HorizontalList]]></category>
		<category><![CDATA[HorizontalSlider]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1721</guid>
		<description><![CDATA[As I stated in a previous post, I am working on a little project for work that dealt with including arrays inside of arrays.  Part of this also had me putting lists inside of lists.  The layout of one of the display has an Accordion navigation control with a HorizontalList, that also contained an accordion [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://deanlogic.com/wp-content/uploads/2011/10/ListSliderCombo.png"><img class="alignleft size-medium wp-image-1723" title="List Slider Combo" src="http://deanlogic.com/wp-content/uploads/2011/10/ListSliderCombo-300x222.png" alt="" width="216" height="160" /></a>As I stated in a previous post, I am working on a little project for work that dealt with including <a title="ArrayCollection in an ArrayCollection" href="http://deanlogic.com/2011/09/arraycollection-in-an-arraycollection/">arrays inside of arrays</a>.  Part of this also had me putting lists inside of lists.  The layout of one of the display has an <a title="Adobe - Flex - Accordion Navigation" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/containers/Accordion.html" target="_blank">Accordion</a> navigation control with a <a title="Adobe - Flex - Horizontal List" href="http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_3.html" target="_blank">HorizontalList</a>, that also contained an accordion with it&#8217;s own HorizontalList.  I am using the horizontal list to scroll through main items with sub-items below.  On top of this, I am creating the HorizontalList, the <a title="Adobe - Flex - HSlider" href="http://livedocs.adobe.com/flex/3/html/help.html?content=controls_14.html" target="_blank">HSlider</a> and the Accordion controls all dynamically.</p>
<p>The first part of setting up the slider and list, is to make sure the HorizontalList has only 1 columnCount (number of columns displayed), else you see all of your items.  The second part is to set the start and end of the slider.  At first I used 0 as the start, but since I am showing the initial record, 1 should be the minimum value.  I set the maximum value to the length of the data set for the list.   I had found some code that used a counter to determine the position of the slider and the list.</p>
<pre class="brush: as3; title: ; notranslate">

private function prevClick(evt:Event):void{
var tmpHozList:HorizontalList = new HorizontalList();
tmpHozList = evt.target.data[0][0];
var tmpSlider:HSlider = new HSlider;
tmpSlider = evt.target.data[0][1];
//move Horizontal List
var pos:int = tmpHozList.horizontalScrollPosition - 1;
var min:int = 0;
var curvalue:int = Math.max(min, pos);
tmpHozList.horizontalScrollPosition = curvalue;

//move Slider
tmpSlider.value = curvalue;
}

private function nextClick(evt:Event):void{
var tmpHozList:HorizontalList = new HorizontalList();
tmpHozList = evt.target.data[0][0];
var tmpSlider:HSlider = new HSlider;
tmpSlider = evt.target.data[0][1];

//move Horizontal List
var pos:int = tmpHozList.horizontalScrollPosition + 1;
var min:int = 0;
var curvalue:int = Math.max(min, pos);
tmpHozList.horizontalScrollPosition = curvalue;

//move Slider
tmpSlider.value = curvalue;
}
</pre>
<p>The counter would get the current position and then add or subtract (depending on the button pushed) from the count and then determine max (<a title="Adobe -AS3 - Math" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Math.html" target="_blank">Math.max</a>) value between the count and the minimum and return that value to step the slider.  Well, this wasn&#8217;t working correctly.  I was trying to figure out if Math.min and some other method of determining the min and max values of the slider, when it hit me to just increment and decrement the value.  I use increment all the time in loops, so why wouldn&#8217;t it work to move the slider and the list position.</p>
<pre class="brush: as3; title: ; notranslate">

private function prevClick(evt:Event):void{
var tmpHozList:HorizontalList = new HorizontalList();
tmpHozList = evt.target.data[0][0];
var tmpSlider:HSlider = new HSlider;
tmpSlider = evt.target.data[0][1];
if(tmpHozList.horizontalScrollPosition &gt; 0){
//move Horizontal List
tmpHozList.horizontalScrollPosition--;
//move Slider
tmpSlider.value--;
}
}

private function nextClick(evt:Event):void{
var tmpHozList:HorizontalList = new HorizontalList();
tmpHozList = evt.target.data[0][0];
var tmpSlider:HSlider = new HSlider;
tmpSlider = evt.target.data[0][1];

//move Horizontal List
tmpHozList.horizontalScrollPosition++;
//move Slider
tmpSlider.value++;
}
</pre>
<p>Well, it did work, except for one small issue.  For some reason, increase the count didn&#8217;t cause any issues.  Possibly the max amount it can increment on the HorizontalList works great, but the minimum value does not.  Regardless, decrementing the values would lead to the  list position going below 0 and causing an error. Which means, that for the previous button, I had to put a check in to make sure the current value wasn&#8217;t less than the minimum value, which was 1.  Anything over 0 was fine.  Simple and less code.  Now I just have to go through and update the other slider list combos.</p>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/10/horizontal-slider-list-synch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>48 Hour Challenge with filmSPARK</title>
		<link>http://deanlogic.com/2011/09/48-hour-challenge-with-filmspark/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=48-hour-challenge-with-filmspark</link>
		<comments>http://deanlogic.com/2011/09/48-hour-challenge-with-filmspark/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 15:03:32 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[Films]]></category>
		<category><![CDATA[48 hour film challenge]]></category>
		<category><![CDATA[48 Hour Film Project]]></category>
		<category><![CDATA[filmSPARK]]></category>
		<category><![CDATA[Let's Make a Movie]]></category>
		<category><![CDATA[Meetup]]></category>
		<category><![CDATA[SPARK]]></category>
		<category><![CDATA[SPARKcon]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1714</guid>
		<description><![CDATA[A few weeks ago, during our monthly meeting, a member of The RTP &#8220;Let&#8217;s Make a Movie&#8221; Meetup group mentioned the SPARKcon Festival coming up in Raleigh.  SPARKcon has been going on for 6 years and last year they added a 48 Hour Film Challenge to their filmSPARK.  At first I was a little hesitant [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, during our monthly meeting, a member of <a title="Let's Make a Movie RTP" href="http://www.meetup.com/MakeAMovieRTP/" target="_blank">The RTP &#8220;Let&#8217;s Make a Movie&#8221; Meetup</a> group mentioned the <a title="SPARKcon" href="http://www.sparkcon.com" target="_blank">SPARKcon Festival</a> coming up in Raleigh.  SPARKcon has been going on for 6 years and last year they added a 48 Hour Film Challenge to their <a title="filmSpark" href="http://www.sparkcon.com/sparks/filmspark/" target="_blank">filmSPARK</a>.  At first I was a little hesitant about doing the challenge for a few reasons.  One, the <a title="48 Hour Film Project" href="http://www.48hourfilm.com/" target="_blank">48 Hour Film Project</a>, cost over $100 to enter, so I didn&#8217;t know how much this would cost.  Second, it was very short notice, so I didn&#8217;t now how many people I could get to do the film.  And finally, I had to okay it with the wife, since she enjoys spending time with her husband on the weekends.  Well, I found out that the challenge was free, the wife was okay with me filming for the weekend and so I set out to get recruits from the group.  I was surprised to get more than a <a title="48 Hour Challeng shooting event" href="http://www.meetup.com/MakeAMovieRTP/events/32417762/" target="_blank">handful of people signed up</a>, even if I had some communication issues.  Also, my main camera guy said he was available for the shooting day, which would make life easier for me.</p>
<p>On Friday Sept. 9th, I drove down to <a title="Mission Valley Cinemas" href="http://ambassadorcinemas.com/joomla/" target="_blank">Mission Valley Cinemas</a> to pick up my team packet.  The pickup time was between 8:00 and 9:00 pm.  This is a late starting time, but then it gives you more time on Sunday for editing.  I was the first person there and had a nice little conversation with the challenge hosts before picking packet number 7 for my team.  I headed on home to beat the crowd that was supposed to meet at my house for <a title="48 Hour Challeng brainstorming and writing event" href="http://www.meetup.com/MakeAMovieRTP/events/32417722/" target="_blank">brainstorming and writing</a>.</p>
<p>The were some more communication issues, but eventually everyone showed up and we started kicking around ideas.  The packet contained or film elements, which were an oven mitt as a prop and the line &#8220;God, I love being a turtle!&#8221;   Apparently this was from a <a title="Teenage Mutant Ninja Turtles" href="http://en.wikipedia.org/wiki/Teenage_Mutant_Ninja_Turtles" target="_blank">Teenage Mutant Ninja Turtles</a> movie, because each team had a different movie line, but the same prop.  This was different from the 48 Hour Film Project, where each team had the same prop, line of dialog and character, but drew different genres.  The challenge only had a few genres and we selected Action/Suspense/Thriller for ours.  The time limit for the challenge was also shorter, only 5 minutes.  When the brainstorming started, we had several ideas, but it seemed a little impossible to tell the entire story in the short amount of time.  Most of our ideas when down the path of <a title="The Tortoise and the Hare" href="http://en.wikipedia.org/wiki/The_Tortoise_and_the_Hare" target="_blank"><em>The Tortoise and The Hare</em></a>, due to the nature of the line.  We even pondered doing a car chase.  In the end, we decided to go with a simple story of a person suffering from <a title="Agoraphobia" href="http://en.wikipedia.org/wiki/Agoraphobia" target="_blank">agoraphobia</a> attempting to make her way outside.  After coming up with the basics of the story, the writer and I hashed out what seemed to be a barely over 2 minute long movie.  I wasn&#8217;t very pleased with the length.</p>
<p>On Saturday morning, I woke up at my normal time and started prepping my house for the shoot.  I had to clean out my kitchen of stuff and set the stage.  The benefit of this was, after the movie was done, my kitchen was picked up and clean!  After everyone showed up, we gave the actors their lines to go over and I walked out the first shot with the camera guy.  After a few walk through shots, we put the actress in her spot and started filming.  The great thing is, we only did a couple of test shots and then we were off to the races with the rest of the shots.  A couple of our actors had to wait around until 2 pm to say their lines, but that gave them more time to rehearse. In fact, the other female actor was rehearsing while looking through the sliding glass door at the back of my house.  At first we thought she was trying to say something to us, but then realized she was just going over her lines.  After a while, it seemed a little creepy.</p>
<p>Since the camera guy has a bunch of equipment, we setup a spot light and put a mic on the main character, just in case the volume from the camera wasn&#8217;t good enough.  In the end, we used only the sound from the camera.  We completed filming before 4 pm and tried to wait for the sun to get in a better position for a particular through the window shot.  Unfortunately, it didn&#8217;t work out and the shot wasn&#8217;t used.  After downloading the files, the editor started to work on the shots.  I download the film as well, but not the audio. Thinking that I would wait and get it from the editor, I didn&#8217;t do any editing, instead I cleaned up the house and called the wife to let her know we were done for the evening.</p>
<p>On Sunday, the editor and writer came over and we started cutting everything together.  After getting the rough cut down to a almost final cut, I got a hold of my F/X guy and we headed over to his place to add special effects.  Well, he had computer issues the week before and the editor&#8217;s computer kept putting out glitchy versions.  After attempts to do this and attempts to do that, we loaded the entire footage on to the F/X guys computer and he put in the special effects.  We didn&#8217;t have time to adjust the color, but I thought it looked fine.  With about 20 minutes to spare, I headed back to Mission Valley to drop off the final product.</p>
<p>The most frustrating part of this was the fact that we finished filming early on Saturday and Sunday was spent waiting for files to load.   Lesson to be learned, downsize the footage before editing.  The play back of the video submitted seemed to skip and jitter.  However, when the F/X guy played it again later and uploaded it to YouTube, everything seemed fine.  So, I just put the thought aside that there was something wrong with the film and waited until the screening.</p>
<p>On Sunday Sept. 17 at Kings in downtown Raleigh, they showed the 14 entries of which 12 qualified for.  Some of the films seemed much longer than 5 minutes, some had stories that didn&#8217;t seem to go anywhere and then there were some good films.  At most, I didn&#8217;t think we would win, but possibly be in the top of the group.  And that&#8217;s what happened.  A mockumentary about reality tv&#8217;s won the overall award, deserving so.   Our film, plus two others won honorable mentions.  I&#8217;m very proud of this film and I think it is my best film to date.  After a year, I think I&#8217;m getting a better at this movie stuff.</p>
<p>For your viewing pleasure : <em><strong>A Step Outside</strong></em></p>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=9ywVWzM2C7o">www.youtube.com/watch?v=9ywVWzM2C7o</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/09/48-hour-challenge-with-filmspark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Test Drive in about an hour</title>
		<link>http://deanlogic.com/2011/09/flex-test-drive-in-about-an-hour/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flex-test-drive-in-about-an-hour</link>
		<comments>http://deanlogic.com/2011/09/flex-test-drive-in-about-an-hour/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 11:53:36 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[Flex Examples]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[FlashBuilder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex application]]></category>
		<category><![CDATA[Flex Test Drive]]></category>
		<category><![CDATA[prompt]]></category>
		<category><![CDATA[stage]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1708</guid>
		<description><![CDATA[According to the Flex Test Drive site, you can &#8220;Build an application in an hour&#8221;.  While that is definitely true for a simple application, I would say it takes a little bit longer in real life.  I started working through the Test Drive demo using the videos, which probably run less than an hour.  Since [...]]]></description>
			<content:encoded><![CDATA[<p>According to the <a title="Flex Test Drive" href="http://www.adobe.com/devnet/flex/testdrive.html" target="_blank">Flex Test Drive</a> site, you can &#8220;Build an application in an hour&#8221;.  While that is definitely true for a simple application, I would say it takes a little bit longer in real life.  I started working through the Test Drive demo using the videos, which probably run less than an hour.  Since I am familiar with Flex/Flash Builder, it was easy enough for me to have the video running in the background while I built the application.  There were several times that I had to switch back to the video to get a better understanding of what needed to be done, but for the most part, I just listened and completed tasks.  I managed to complete the first module between <a title="Zend AMF and Flash Builder" href="http://deanlogic.com/2011/09/zend-amf-and-flash-builder/">last night&#8217;s post</a> and about 9:45, which is around 2 hours.  However, I did have to upload the swf file to my website to see if it was working and my wife needed some attention on occasion.  Which means, I probably could have completed it in one hour, but I wasn&#8217;t timing myself.</p>
<p>The version of Test Drive I used required Flash Builder 4.5, which I was unable to upgrade to unless I buy an upgrade to the <a title="Adobe Master Collection" href="http://www.adobe.com/products/creativesuite/mastercollection.html?promoid=DTELL" target="_blank">Master Collection</a> suite. You save money by purchasing the suites, but in the long run, if you only need to update certain programs, it is a pain in the wallet.  Because I am on 4 and the demo was on 4.5, there were some small differences in the instructions.  When a search option is added, the search test field has a &#8220;prompt&#8221; option.  This is apparently a new feature with 4.5, because it is not available in 4.  Not a huge issue, but it will be interesting to see what else is new in 4.5 that will affect the Test Drive.</p>
<p>Overall, building this simple application was straight forward.  Creating stages was very simple in Display view.  Just create the stage, add components, create a new state and add different components.  Presto!  You now have to different stages.  Then it was as simple as adding a click option to a button to call each of the stages and then adding a very simple call.</p>
<pre class="brush: as3; title: ; notranslate">

currentStage = &quot;stageIwantToPointTo&quot;;
</pre>
<p>The drag and dropping of data connectors was also very useful.  After you have your data connections working, you simply just drag and drop one onto a datagrid or form and do a few setup options and it is done.  Making a item detail view was also just as simple as a few drag and drops and some minor code.  The Test Drive so far could probably make anyone believe they could create awesome applications in no time at all.  However, you are just creating basic applications very quickly.  As noted in the last video of the first module, the instructor explains that doing a search to filter the employee table by calling the web service is not a smart thing to do.  Each time a search or refreshing to show all records was done, it did a call to the web service to get the data.  The instructor points out that it would be better to only call the data once and then use filters in the application to show what was needed.  It doesn&#8217;t look like Test Drive actually goes over this, so the newbie Flex/Flash Builder user will have to figure this out on their own or possibly through another set of tutorials.  For now, here is <a title="DeanLogic Demo Test Drive" href="http://demo.deanlogic.com/TestDrive.html" target="_blank">the result from last night&#8217;s work</a>.</p>
<p>On a side note, apparently either Flex or Zend or something triggered a bunch of<a title="DeanLogic Demo" href="http://demo.deanlogic.com/"> Twitter Spambots</a> or something, because the Twitter widget on the Demo site is now filled with pointers to Zend post I created last night.  I guess it helps with search engine links or something, I don&#8217;t know.  I find it kind of funny.</p>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/09/flex-test-drive-in-about-an-hour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend AMF and Flash Builder</title>
		<link>http://deanlogic.com/2011/09/zend-amf-and-flash-builder/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zend-amf-and-flash-builder</link>
		<comments>http://deanlogic.com/2011/09/zend-amf-and-flash-builder/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 00:27:11 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe Flash Builder]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Test Drive]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[ZendFrameWork]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1704</guid>
		<description><![CDATA[While I was pondering creating the Flex/Flash test application for the Demo site, I ran across Flex Test Drive.  I remember reading it before and couldn&#8217;t remember why I didn&#8217;t go through with the example&#8230;.then I tried connecting to the php web service.  The Flex Test Drive gives you three options for a server:  Java, [...]]]></description>
			<content:encoded><![CDATA[<p>While I was pondering creating the <a title="Adobe Flex" href="http://www.adobe.com/products/flex.html" target="_blank">Flex/Flash</a> test application for the <a title="DeanLogic Demo" href="http://demo.deanlogic.com" target="_blank">Demo</a> site, I ran across <a title="Flex Test Drive" href="http://www.adobe.com/devnet/flex/testdrive.html" target="_blank">Flex Test Drive</a>.  I remember reading it before and couldn&#8217;t remember why I didn&#8217;t go through with the example&#8230;.then I tried connecting to the php web service.  The Flex Test Drive gives you three options for a server:  <a title="Java" href="http://java.com/en/" target="_blank">Java</a>, <a title="PHP" href="http://www.php.net/" target="_blank">PHP</a> and <a title="ColdFusion" href="http://www.adobe.com/products/coldfusion-family.html" target="_blank">ColdFusion</a>.  I don&#8217;t have a ColdFusion or Java option on my hosted website, so PHP was the way to go.  I also didn&#8217;t want to bother installing a web server locally, because I want to post my examples on my site.  Because of this, installation is probably not as straight forward as I hoped it would be.</p>
<p>The first part of Flex Test Drive creates the starting application, which you choose the server backend.  Since I wanted to use my website as the server, I put in http://demo.deanlogic.com for the Root URL.  The example points to a local web server, so this is where I started to diverge from the game plan.  The next part was to create a database using MySQL server and then add some basic components to the application.  All of that went fine, after a few short hick-ups in the sql statement to populate the tables.  The next step is connecting to the database using the PHP remote connection and that&#8217;s where I got into trouble.</p>
<p>The PHP remote connection uses <a title="Zend AMF" href="http://framework.zend.com/download/amf" target="_blank">Zend AMF</a>, which is part of the<a title="Zend Framework" href="http://framework.zend.com/" target="_blank"> Zend Framework</a>. Apparently in <a title="Adobe Flash Builder" href="http://www.adobe.com/products/flash-builder-family.html" target="_blank">Flash Builder</a> 4.5, the integration is even closer.  However, part of the setup of the PHP Zend AMF connection adds the Zend Framework to the application directory.  Once that is added, you have to updated the <em>amf_config.ini</em> file to point to the framework and library directories.  This is were it got a little confusing for me.  Since the initial directories are locally on my PC, I didn&#8217;t know which directories to use; UNIX or Windows.</p>
<pre class="brush: bash; title: ; notranslate">

[zend]
;set the absolute location path of webroot directory, example:
;Windows: C:\apache\www
;MAC/UNIX: /user/apache/www
webroot = /home/users/web/deanlogiccom

;set the absolute location path of zend installation directory, example:
;Windows: C:\apache\PHPFrameworks\ZendFramework\library
;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework/library
zend_path = ZendAMF/Zend/ZendFramework/library

[zendamf]
amf.production = false
amf.directories[]=services
</pre>
<p>My first attempt was to use the UNIX directories, but it would end up with not being able to find the include files.  I even downloaded the ZendFramework from the Zend site and loaded it up to my site.  Nothing seem to work.  I even tried altering the <em>gateway.php</em> file to point directly to the directories without using the check code included.  Going directly to the <em>gateway.php</em> on my website would show the same error I was getting when connecting.  So, I figured I could modify the init file until that error went away.  After several attempts at different directory options, I finally saw &#8220;Zend Amf Endpoint&#8221; on the gateway page.  Woo hoo!!</p>
<p>Unfortunately the PHP remote connection still wasn&#8217;t working, which is when I noticed that it said something about the release folder and the gateway file.  When I initially deployed the Flex application, it was under the <em>bin-debug</em> folder, while the ZendFramework was a few levels higher.</p>
<p><a href="http://deanlogic.com/wp-content/uploads/2011/09/FlexAMFDirectory.png"><img class="aligncenter size-medium wp-image-1705" title="Flex Zend AMF Directory" src="http://deanlogic.com/wp-content/uploads/2011/09/FlexAMFDirectory-300x267.png" alt="" width="300" height="267" /></a></p>
<p>By moving all of the deploy files to the same level as the ZendFramework folder, I finally got the PHP Zend remote connection to work.  When the connection works, it uses the EmployeeService to get information from the database to be used in the rest of the Test Drive demonstration.</p>
<p><a href="http://deanlogic.com/wp-content/uploads/2011/09/TestDriveDataConnection.png"><img class="aligncenter size-medium wp-image-1706" title="Test Drive DataConnection" src="http://deanlogic.com/wp-content/uploads/2011/09/TestDriveDataConnection-300x99.png" alt="" width="300" height="99" /></a></p>
<p>Hopefully later I get the directory setup so it is a little cleaner.  It seems that everything I add just drops into the main folder.  The Dreamweaver Widgets did this as did the CSS from the style sheet.  I prefer things to be much more organized.  But, for now, I&#8217;m glad the data connection is working so I can move on with the Test Drive.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/09/zend-amf-and-flash-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ArrayCollection in an ArrayCollection</title>
		<link>http://deanlogic.com/2011/09/arraycollection-in-an-arraycollection/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=arraycollection-in-an-arraycollection</link>
		<comments>http://deanlogic.com/2011/09/arraycollection-in-an-arraycollection/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 20:49:26 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Accordion]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[ArrayCollection]]></category>
		<category><![CDATA[DataGrid]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[HorizontalList]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1701</guid>
		<description><![CDATA[At work I am trying to display a bunch of information retrieved from a web services.  The data has a header table (top item) and then supporting item tables (sub items).  My current data only brings back one top item, but I have set it up to display multiple top items using a HorizontalList.  I [...]]]></description>
			<content:encoded><![CDATA[<p>At work I am trying to display a bunch of information retrieved from a web services.  The data has a header table (top item) and then supporting item tables (sub items).  My current data only brings back one top item, but I have set it up to display multiple top items using a <a title="Horizontal List" href="http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_3.html" target="_blank">HorizontalList</a>.  I created a custom component based on a <a title="Form" href="http://livedocs.adobe.com/flex/3/html/help.html?content=layouts_08.html" target="_blank">Form</a>, which allows me to easily display header and values.  In the future, I can probably use the form for inputs, but for now it is just displaying.  I am also using an <a title="Accordion" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/containers/Accordion.html" target="_blank">Accordion</a> container to display each of the header items that are wrapped in an overall item.  In each Accordion item, I dynamically create a box, to hold the form, which is dynamically created by passing it in as a new <a title="ClassFacotry" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/ClassFactory.html" target="_blank">ClassFactory</a>.  The Form acts as an item render in the HorizontalList.  Well, the problem I ran into is, that you can only pass in one DataProvider into the HorizontalList.  This was causing an issue with an item that would have an over all header information and then a DataGrid full up sub items.   After starting to fuss around with other options, it occurred to me to pass in the sub items as an ArrayCollection type.</p>
<p>For example, if I had a class called MyObject</p>
<pre class="brush: as3; title: ; notranslate">

package {

public class MyObject {

[Bindable]
 public var ID:Number:

[Bindable]
 public var Name:String:

[Bindable]
 public var itemList:ArrayCollection
}
}
</pre>
<p>And earlier I populated an ArrayCollection called itemListArrayCollection with data, then I wanted to add this to an ArrayCollection called myMainArrayCollection, it would look something like this.</p>
<pre class="brush: as3; title: ; notranslate">

var newObject:MyObject = new MyObject();

newObject.ID = 1;

newObject.Name = 'Test';

newObject.itemList = itemListArrayCollection;

myMainArrayCollection.addItem(newObject);
</pre>
<p>Then, in the Form I created to display the items, I would set the FormItems to show ID and Name</p>
<pre class="brush: as3; title: ; notranslate">

&lt;mx:FormItem&gt;

&lt;mx:Label text=&quot;{data.ID}&quot; /&gt;

&lt;/mx:FormItem&gt;

&lt;mx:FormItem&gt;

&lt;mx:Label text=&quot;{data.Name}&quot; /&gt;

&lt;/mx:FormItem&gt;
</pre>
<p>And the DataGrid within the form would get it&#8217;s DataProvider through the initial data value.  I can also point to the columns (DataFields) in the itemListArrayCollection in order to set up the DataGridColumns.</p>
<pre class="brush: as3; title: ; notranslate">

&lt;mx:DataGrid dataprovider=&quot;{data.itemList}&quot;&gt;

&lt;mx:columns&gt;

&lt;mx:DataGridColumn DataField=&quot;listField1&quot; /&gt;

&lt;mx:DataGridColumn DataField=&quot;listField2&quot; /&gt;

&lt;mx:DataGridColumn DataField=&quot;listField2&quot; /&gt;

&lt;/mx:columns&gt;

&lt;/mx:DataGrid&gt;
</pre>
<p>I&#8217;m sure I&#8217;m not the first person to pass an ArrayCollection inside of an ArrayCollection, but it was an &#8220;ah ha!&#8221; moment for me today.  I&#8217;m not sure if it is considered best practice to do this, but it works for what I need much simpler than trying to create a component to receive multiple multiples of DataProviders.  Once I get things straightened out with the current web services, I know I will have to go back and probably have an overall ArrayCollection with 3 &#8211; 5 ArrayCollections passed into it.</p>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/09/arraycollection-in-an-arraycollection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe BrowserLab</title>
		<link>http://deanlogic.com/2011/09/adobe-browserlab/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adobe-browserlab</link>
		<comments>http://deanlogic.com/2011/09/adobe-browserlab/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 01:42:30 +0000</pubDate>
		<dc:creator>DeanLogic</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe BrowserLabe]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[preview]]></category>
		<category><![CDATA[resolution]]></category>

		<guid isPermaLink="false">http://deanlogic.com/?p=1693</guid>
		<description><![CDATA[I decided to take a glance at the widgets I put in earlier today and stumbled onto a nice little tool over at Adobe.  In Dreamweaver you have a few options for viewing your work to determine how it will look in the real world.  The first method is to use a split view, which [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to take a glance at the widgets I put in <a title="Dreamweaver Widgets" href="http://deanlogic.com/2011/09/dreamweaver-widgets/" target="_blank">earlier today</a> and stumbled onto a nice little tool over at <a title="Adobe" href="http://www.adobe.com" target="_blank">Adobe</a>.  In <a title="Adobe Dreamweaver" href="http://www.adobe.com/Dreamweaver" target="_blank">Dreamweaver</a> you have a few options for viewing your work to determine how it will look in the real world.  The first method is to use a split view, which gives you one frame of code and another frame of design.  The obvious benefit is that you can quickly find your code problems before sending it up to the site.  However, as you notice from the image below, it might not actually be what  you really see.</p>
<p><a href="http://deanlogic.com/wp-content/uploads/2011/09/DreamweaverSplitView.png"><img class="aligncenter size-medium wp-image-1695" title="Dreamweaver Split View editor" src="http://deanlogic.com/wp-content/uploads/2011/09/DreamweaverSplitView-300x161.png" alt="" width="300" height="161" /></a>Adobe apparently has their previewer using some of the same code as Chrome, because the color changes I added to the Aqua Button widget show in the preview but not in my FireFox browser.  Dreamweaver helps you determine what the page will look like in the real world, without loading every version of every browser, with a Preview Menu.  On the menu are the browsers loaded on your PC and then a couple of other options.</p>
<p><a href="http://deanlogic.com/wp-content/uploads/2011/09/DreamweaverPreview.png"><img class="aligncenter size-medium wp-image-1696" title="Dreamweaver Preview Menu" src="http://deanlogic.com/wp-content/uploads/2011/09/DreamweaverPreview-300x161.png" alt="" width="300" height="161" /></a></p>
<p>There is a <em>Preview in <a title="Adobe BrowserLab" href="https://browserlab.adobe.com/en-us/features.html" target="_blank">BrowserLab</a></em> option that launches Adobe BrowserLab.  This, complimentary until April 12, 2012, tool allows you to view a web page in multiple browser simulators.  The browser choices even differentiate between OS version, because there are FireFox for OS X and Windows options.  The menu launches BrowserLab with your file version of your page or  you can load your site using the URL.   You can select multiple browsers for viewing the site, but BrowserLab will do a initial loading of all the select browsers before you can view.  Once everything is loaded, you can switch between the browsers selected and view 2 browser options at the same time, either in split view or onion layers. From the screen shot below, you can see that Chrome displays orange buttons, while FireFox does not.  This makes BrowserLab a very useful tool for quickly viewing your website across many browser version.  I hope that Adobe keeps it free for those who have Dreamweaver.  I also have used <a title="Adobe Story" href="https://story.adobe.com/en-us/index.html" target="_blank">Adobe Story </a>for some movie projects, which also has a &#8220;complimentary until April 12, 2012&#8243;.  I am guessing Super Duber Master Creative Collection Suite 6 will be launched then.  Maybe by then, I&#8217;ll have made some money off of one of my hobbies to pay for the expensive upgrade.</p>
<p><a href="http://deanlogic.com/wp-content/uploads/2011/09/AdobeBrowserLabe.png"><img class="aligncenter size-medium wp-image-1694" title="Adobe Browser Lab" src="http://deanlogic.com/wp-content/uploads/2011/09/AdobeBrowserLabe-300x130.png" alt="" width="300" height="130" /></a>The other option on the Preview menu is <em>Preview in <a title="Adobe Device Central" href="http://www.adobe.com/products/devicecentral.html" target="_blank">Device Central</a></em> .  Device Central is part of a few different Adobe applications.  It makes sense that Dreamweaver would give a device preview.  Everybody wants to know how their site will look like on mobile devices or a tablet or even a television. Yes, a television.   There is a device library that allows for downloading of different device profiles.  Even though Apple doesn&#8217;t like Adobe much, apparently Adobe is nice enough to provide iPad and iPhone profiles.  There are also BlackBerry phone and tablet profiles and bunch others.  And if Adobe didn&#8217;t create a profile you are looking for, apparently you can create one and share it in the library.  Once you have download the profile, you can add it to your test devices.</p>
<p><a href="http://deanlogic.com/wp-content/uploads/2011/09/DreamweaverDevicePreview.png"><img class="aligncenter size-medium wp-image-1697" title="Dreamweaver Device Preview" src="http://deanlogic.com/wp-content/uploads/2011/09/DreamweaverDevicePreview-300x211.png" alt="" width="300" height="211" /></a>Finally, you can use the Multiscreen Preview to see how your site will look in different screen resolutions.  The default sizes are Phone (320 x 300), Tablet (768 x 300) and Desktop (1126 x 276).  Since these dimensions won&#8217;t fit all issue, you can modify the sizes, however, they might not fit neatly in the three pain window like the defaults.  You can also use this tool to setup multiple css files to be shown based on the size of the screen (small, medium, large).</p>
<p><a href="http://deanlogic.com/wp-content/uploads/2011/09/DreamweaverMultiscreenPreview.png"><img class="aligncenter size-medium wp-image-1698" title="Dreamweaver Multiscreen Preview" src="http://deanlogic.com/wp-content/uploads/2011/09/DreamweaverMultiscreenPreview-300x199.png" alt="" width="300" height="199" /></a>With all of these tools, it will be easy for anyone to prepare their site for almost any possible viewer.</p>
]]></content:encoded>
			<wfw:commentRss>http://deanlogic.com/2011/09/adobe-browserlab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

