<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>kreativeKING - Interactive Developer</title><generator>Tumblr (3.0; @kreativeking)</generator><link>http://blog.kreativeking.com/</link><item><title>Where's my Sound ???</title><description>&lt;p&gt;Here&amp;#8217;s a Handy little tip I just figured out today. So I have a button that plays sound and once if finishes playing it should fire the Event.SOUND_COMPLETE. In this events handler, it resets the position back to the beginning of the clip. Now the problem is once I try to play it again, it doesn&amp;#8217;t seem to fire the Event.SOUND_COMPLETE event. Have you ever had the issue of your Event.SOUND_COMPLETE not firing properly?? Read on and find out why&amp;#8230;&amp;#8230;&lt;/p&gt;
&lt;p&gt;After some debugging, I noticed that every time you pause a sound and play it again, a new SoundChannel is returned. Any event listeners I had applied to the SoundChannel before are disregarded once I pause and play. Instead of&amp;#160;:&lt;/p&gt;
&lt;pre&gt;&lt;br/&gt;function playSound():void&lt;br/&gt;{&lt;br/&gt;      mySound : Sound = new Sound();&lt;br/&gt;      mySound.addEventListener(Event.COMPLETE, soundLoaded);&lt;br/&gt;      mySound.load(MY SONG REQUEST);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function soundLoaded(e : Event):void&lt;br/&gt;{&lt;br/&gt;      myChannel = new SoundChannel();&lt;br/&gt;      myChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete);&lt;br/&gt;      myChannel = mySound.play();&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function soundComplete(e : Event):void&lt;br/&gt;{&lt;br/&gt;      position = 0;&lt;br/&gt;      playChannel()&lt;br/&gt;      pauseChannel();&lt;br/&gt;      myChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function pauseChannel():void&lt;br/&gt;{&lt;br/&gt;     myChannel.stop();&lt;br/&gt;     position = myChannel.position;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function playChannel():void&lt;br/&gt;{&lt;br/&gt;     myChannel =  mySound.play(position);&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;
&lt;p&gt;But It should be&amp;#160;:&lt;/p&gt;
&lt;pre&gt;&lt;br/&gt;function playSound():void&lt;br/&gt;{&lt;br/&gt;      mySound : Sound = new Sound();&lt;br/&gt;      mySound.addEventListener(Event.COMPLETE, soundLoaded);&lt;br/&gt;      mySound.load(MY SONG REQUEST);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function soundLoaded(e : Event):void&lt;br/&gt;{&lt;br/&gt;      myChannel = new SoundChannel();&lt;br/&gt;      myChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete);&lt;br/&gt;      myChannel = mySound.play();&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function soundComplete(e : Event):void&lt;br/&gt;{&lt;br/&gt;      position = 0;&lt;br/&gt;      playChannel();&lt;br/&gt;      pauseChannel();&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function pauseChannel():void&lt;br/&gt;{&lt;br/&gt;     myChannel.stop();&lt;br/&gt;     position = myChannel.position;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function playChannel():void&lt;br/&gt;{&lt;br/&gt;     myChannel =  mySound.play(position);&lt;br/&gt;     myChannel.addEventListener(Event.SOUND_COMPLETE, soundComplete);&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;
&lt;p&gt;You need to register the event listener again once you call play. I hope this saves 30 minutes of your day once you start screaming&amp;#8230;WHERE&amp;#8217;S MY SOUND!!!&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blogger.googleusercontent.com/tracker/6480215130907877002-6735805727348419179?l=testing1212121212.blogspot.com" width="1" height="1"/&gt;&lt;/p&gt;</description><link>http://blog.kreativeking.com/post/412059194</link><guid>http://blog.kreativeking.com/post/412059194</guid><pubDate>Thu, 05 Nov 2009 09:33:00 -0500</pubDate><category>sound_complete</category><category>AS3</category><category>sound</category><category>event</category></item><item><title>Shoppable Runway</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Flash, CSS, AS3&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Created @radical.media for Tommy Hilfiger&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;h6&gt;Role&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Jr. Flash Developer - Create the page Template&lt;br/&gt;- Made use of a Tweening Engine&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://usa.tommy.com/tommy/browse/feature.jsp?categoryId=1M&amp;amp;featureId=cat420002"&gt;Live Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-5650958077756419196?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412059159</link><guid>http://blog.kreativeking.com/post/412059159</guid><pubDate>Sun, 01 Nov 2009 00:23:00 -0400</pubDate><category>flash</category><category>actionscript3</category></item><item><title>Outerwear Gallery</title><description>&lt;p&gt;ul&amp;gt;&lt;/p&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Flash, CSS, AS3&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Created @radical.media for Tommy Hilfiger&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;h6&gt;Role&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Jr. Flash Developer - Create the page Template&lt;br/&gt;- Made use of a Tweening Engine&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://usa.tommy.com/tommy/browse/feature.jsp?featureId=cat400002&amp;amp;categoryId=08"&gt;Mens Live Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://usa.tommy.com/tommy/browse/feature.jsp?categoryId=1M&amp;amp;featureId=cat400004"&gt;Womens Live Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-2071108197536405756?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412059123</link><guid>http://blog.kreativeking.com/post/412059123</guid><pubDate>Sun, 01 Nov 2009 00:19:00 -0400</pubDate><category>flash</category><category>actionscript3</category></item><item><title>Marvel Powergrid</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Flash, XML, AS3&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Created at Marvel Entertainment&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;h6&gt;Role&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Jr. Flash Developer - Translate AS2 to AS3&lt;br/&gt;- Made use of a Tweening Engine&lt;br/&gt;- Receive XML and send Requests via PHP&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://marvel.com/universe/Iron_Man_%28Anthony_Stark%29"&gt;Live Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-7323500325411340859?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412059020</link><guid>http://blog.kreativeking.com/post/412059020</guid><pubDate>Sun, 01 Nov 2009 00:11:00 -0400</pubDate><category>flash</category><category>actionscript3</category></item><item><title>Tommy Hilfiger - Fashion Week 2009</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Flash, CSS, AS3&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Created @radical.media for Tommy Hilfiger&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;h6&gt;Role&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Jr. Flash Developer - Create the page Template&lt;br/&gt;- Made use of a Tweening Engine&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://usa.tommy.com/tommy/browse/peoplesplace.jsp?categoryId=cat390006"&gt;Live Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-3097571152235153974?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412058061</link><guid>http://blog.kreativeking.com/post/412058061</guid><pubDate>Sat, 26 Sep 2009 04:53:00 -0400</pubDate><category>flash</category><category>actionscript3</category></item><item><title>Get Schooled</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Flash, CSS, AS3&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Created @radical.media for Viacom&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;h6&gt;Role&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Jr. Flash Developer - Help style the CSS, animated logo, and minor AS3/AS2 Flash work&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://www.getschooled.com/"&gt;Live Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-6208013973158791828?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412058024</link><guid>http://blog.kreativeking.com/post/412058024</guid><pubDate>Sun, 06 Sep 2009 21:37:00 -0400</pubDate><category>flash</category><category>actionscript3</category></item><item><title>Burksten Group</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Wordpress, PHP, XHTML, CSS&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Programmed this design (by &lt;a href="http://www.betterinpink.com"&gt;BetterInPink&lt;/a&gt;) for Wordpress 2.7.1. This features a custom sidebar using CSS Layers and  a custom switching option for unique header on pages&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://www.burksten.com/"&gt;Live Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-873240319266433401?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412057984</link><guid>http://blog.kreativeking.com/post/412057984</guid><pubDate>Sun, 06 Sep 2009 21:23:00 -0400</pubDate><category>css</category><category>xhtml + css</category><category>wordpress</category><category>xhtml</category></item><item><title>Cool Flash Tip of the Week 5</title><description>&lt;p&gt;Hey Flashers, I know its been a long time since the last tip. Time has not been on my side recently, but I&amp;#8217;m getting some more free time and I&amp;#8217;ll be posting regularly again. Be on the look out, I have some new websites and articles coming out. You can see the latest website to date, &lt;a href="http://www.galleysmith.com"&gt;Galley Smith Blog&lt;/a&gt;. But aside from all of that, down to the tip.&lt;!--more--&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I&amp;#8217;m currently working on a 3D Flash site and I decided to use Flash 10&amp;#160;3D instead of &lt;a href="http://blog.papervision3d.org/"&gt;Papervision3D&lt;/a&gt;. I felt it would be overkill to use Papervision for this project since we couldn&amp;#8217;t get our animated 3d models into Papervision successfully. As everyone knows or some who don&amp;#8217;t, FP10 &amp;#8216;s z sorting is non-existent. I needed to have floating panels zoom up to show maximized version of the panel. The problem is that, scaling them up, if it is not at the top of the DisplayList, it would show the other panels in front of it still.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I needed to make a function that would always keep my selected panel above the rest. The &lt;em&gt;kreativeSort&lt;/em&gt; function was born. Its still in its infancy, but I see potential in it. I will work on it more throughout the project at keep everyone up to date with the progress. Here is the commented function for everyone to use if you happen to have the same issue.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;em&gt;Update&lt;/em&gt;&lt;/h5&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;em&gt;I&amp;#8217;ve been steered in a better direction and found of an alternative and faster way of doing this over at &lt;a href="http://www.actionscript.org"&gt;Actionscript.org&lt;/a&gt; from &lt;a href="http://www.lordofduct.com/"&gt;lordofduct&lt;/a&gt;. Check out the updated function at the &lt;a href="#updatedFunction"&gt;bottom&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a rel="shadowbox;width=400;height=500;" href="http://www.kreativeking.com/downloads/flash/kreativeSort/withoutSort.swf"&gt;&lt;img class="centerImg" src="http://www.kreativeking.com/downloads/images/withoutsort.jpg" alt="Without KreativeSort" width="300" height="30"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a rel="shadowbox;width=400;height=500;" href="http://www.kreativeking.com/downloads/flash/kreativeSort/withSort.swf"&gt;&lt;img class="centerImg" src="http://www.kreativeking.com/downloads/images/withsort.jpg" alt="With KreativeSort" width="300" height="30"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;/**&lt;br/&gt; * Puts selected DisplayObject on top of other DisplayObects in its container&lt;br/&gt; *&lt;br/&gt; * @param parent Container DisplayObject that holds our children.&lt;br/&gt; * @param panel Child we want to be displayed on top of the rest&lt;br/&gt; *&lt;br/&gt; * @author Clemente Gomez - kreativeKING&lt;br/&gt; */&lt;br/&gt;private function kreativeSort(parent:DisplayObjectContainer, panel:DisplayObject) : void&lt;br/&gt;{&lt;br/&gt;	var i : int = 0;&lt;br/&gt;	var length : Number = parent.numChildren;&lt;br/&gt;&lt;br/&gt;	//Position the child is located at.&lt;br/&gt;	var pos:int;&lt;br/&gt;&lt;br/&gt;	for (i ; i &amp;lt; length ; i++)&lt;br/&gt;	{&lt;br/&gt;		// When child matches the level we are at in the container, recored the level in variable "pos".&lt;br/&gt;		if(parent.getChildAt(i) == panel)&lt;br/&gt;		{&lt;br/&gt;			pos = i;&lt;br/&gt;			break;&lt;br/&gt;		}&lt;br/&gt;	}&lt;br/&gt;	// Removes child out of container.&lt;br/&gt;	parent.removeChildAt(pos);&lt;br/&gt;&lt;br/&gt;	//Adds the child back on top of the rest.&lt;br/&gt;	parent.addChildAt(panel, parent.numChildren);&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h6 id="updatedFunction"&gt;Updated Function&lt;/h6&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;function kreativeSort( parent:DisplayObjectContainer, panel:DisplayObject ):void&lt;br/&gt;{&lt;br/&gt;    if (parent.contains( panel )) parent.addChild( panel );&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-8605747437025304927?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412057950</link><guid>http://blog.kreativeking.com/post/412057950</guid><pubDate>Thu, 23 Jul 2009 13:06:00 -0400</pubDate><category>AS3</category><category>cft</category></item><item><title>Galley Smith Website</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Wordpress, PHP, XHTML, CSS&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Programmed this design (by &lt;a href="http://www.betterinpink.com"&gt;BetterInPink&lt;/a&gt;) for Wordpress 2.8. This features a custom Twitter Feed on the sidebar and various depths using CSS Layers. Also a custom Theme Options panel for changing the options easily.&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://www.galleysmith.com"&gt;Live Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://wordpress.kreativeking.com/?themedemo=gs"&gt;Demo Site&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-5162477261438411310?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412057897</link><guid>http://blog.kreativeking.com/post/412057897</guid><pubDate>Wed, 22 Jul 2009 07:13:00 -0400</pubDate><category>xhtml + css</category><category>wordpress</category></item><item><title>Web Designer Magazine 159</title><description>&lt;p&gt;Hey people, I&amp;#8217;ve been published again in Web Designer Magazine Issue 159. In this tutorial, I walk you through how to make a MP3 player with a sound visualizer. Its a pretty short and straight to the point tutorial. Hopefully everyone will be able to follow along and make some cool mp3 players. If there are any concerns or questions, post it here on the blog and I&amp;#8217;ll get back to you ASAP.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;Go pick up your copy and leave some feed back. Check out a preview &lt;a href="http://www.webdesignermag.co.uk/magazine-issues/web-designer-issue-159/"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-4182693016349224964?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412057852</link><guid>http://blog.kreativeking.com/post/412057852</guid><pubDate>Fri, 10 Jul 2009 22:01:00 -0400</pubDate><category>Design</category><category>AS 3.0</category><category>AS3</category><category>Flash News</category><category>mp3</category><category>Business</category></item><item><title>Where have I been???</title><description>&lt;p&gt;Hey valued readers, I&amp;#8217;m sorry for my absence lately. I&amp;#8217;ve had a ton of projects come in recently that have devoured my time. I haven&amp;#8217;t forgotten about the &lt;a title="Cool Flash tip of the Week" href="http://kreativeking.com/?tag=cft"&gt;Cool Flash Tips of the Week&lt;/a&gt;. I have a couple to post, but just haven&amp;#8217;t found the time to flesh them out. They should be back up and running by August 1st. The wait will be worth it people.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Happy Flashing.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-1111123000353789438?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412057803</link><guid>http://blog.kreativeking.com/post/412057803</guid><pubDate>Mon, 06 Jul 2009 14:26:00 -0400</pubDate><category>Design</category><category>Business</category></item><item><title>Cool Flash Tip of the Week 4</title><description>&lt;p&gt;I know last week I said we will be learning about a custom class, but I think I&amp;#8217;ll hold that one for next week. This week we are going to check out a quick and useful tip that I didn&amp;#8217;t even know about until a couple of days ago for selecting XML and XMLList nodes. This won&amp;#8217;t be as in depth as the last, but I still think its a great quick tip.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;We will be testing on this XML file.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;pre lang="xml"&gt;&lt;br/&gt;&lt;familytree&gt;&lt;br/&gt;&lt;family lastname="Travis"&gt;&lt;br/&gt;&lt;member&gt;Maria&lt;/member&gt;&lt;br/&gt;&lt;member&gt;Jason&lt;/member&gt;&lt;br/&gt;&lt;/family&gt;&lt;br/&gt;&lt;family lastname="Travolta"&gt;&lt;br/&gt;&lt;member&gt;Jason&lt;/member&gt;&lt;br/&gt;&lt;/family&gt;&lt;br/&gt;&lt;family lastname="Crane"&gt;&lt;br/&gt;&lt;member&gt;Chris&lt;/member&gt;&lt;br/&gt;&lt;member&gt;Jack&lt;/member&gt;&lt;br/&gt;&lt;member&gt;Maria&lt;/member&gt;&lt;br/&gt;&lt;/family&gt;&lt;br/&gt;&lt;/familytree&gt;&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;I recently found out this cool way to select XML nodes. You can actually test attributes to filter out which ones you want. Check out the example for a better idea of what I mean.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;&lt;br/&gt;var l:URLLoader = new URLLoader();&lt;br/&gt;l.addEventlistener(Event.COMPLETE, xmlLoaded);&lt;br/&gt;l.load(new URLRequest("ourXML.xml"));&lt;br/&gt;&lt;br/&gt;function xmlLoaded(e:Event):void&lt;br/&gt;{&lt;br/&gt;    var myXML:XML = XML(l.data);&lt;br/&gt;    trace(myXML.family.(@lastName == "Travis").member); // Outputs Maria , John&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;Using this method you can easily filter out a selection of nodes based on an evaluation. I find this a better way to the alternative of using array indices to select a particular tree. This is a pretty quick tip that I thought would be helpful. Next week, we are back to the in depth tips like usual. Again, if you like the post, subscribe to the &lt;a href="http://feeds2.feedburner.com/kreativeking"&gt;RSS Feed&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-1861714263667273737?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412055786</link><guid>http://blog.kreativeking.com/post/412055786</guid><pubDate>Fri, 19 Jun 2009 13:13:00 -0400</pubDate><category>XML</category><category>cft</category><category>Business</category><category>xmllist</category></item><item><title>Cool Flash Tip of the Week 3</title><description>&lt;p&gt;Welcome back everyone for the 3rd installment of the Cool Flash Tip of the Week Series. This week we are going to take a look at a new class introduced with Flash Player 10. Say hello to the Vector Class.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;The Vector class is very similar to the Array class which we all know and love. The difference is that a Vector only holds one data type. An Array can holds several different kinds of values. A Vector is an Array of the same type. Check out the psuedo code underneath to get a better understanding of what I mean.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;&lt;br/&gt;//Array&lt;br/&gt;[ String, Number,  ,int, Sprite ];&lt;br/&gt;&lt;br/&gt;//Vector&lt;br/&gt;[ String, String, null, String, String ];&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;If you paid close attention to that last snippet, you notice that the Array has an empty index, which is just fine. But when it comes to a Vector, there can not be any empty indices. If you must have an empty spot, make sure to set the value to &lt;code&gt;null&lt;/code&gt;. Leaving it empty will throw an Error. A Vector is a dense data typed Array. Moving right along, to create a Vector is quite different than creating any other instance in Actionscript 3. Check out the example below.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;&lt;br/&gt;//Syntax&lt;br/&gt;Vector.&lt;datatype&gt;&lt;br/&gt;&lt;br/&gt;//Correct&lt;br/&gt;var myVector:Vector.&lt;sprite&gt; = new Vector.&lt;sprite&gt;();&lt;br/&gt;&lt;br/&gt;//Throws Error&lt;br/&gt;var myVector:Vector.&lt;displayobject&gt; = new Vector.&lt;sprite&gt;();&lt;br/&gt;&lt;/sprite&gt;&lt;/displayobject&gt;&lt;/sprite&gt;&lt;/sprite&gt;&lt;/datatype&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;As you can see, the type of the Vector can only be instantiated to that class. Even though Sprite is a subclass of DisplayObject. So make sure to avoid this and you should have a smooth time. There is however a way we can still make this work. This would be using the &lt;code&gt;Vector()&lt;/code&gt; function. This will allow you to turn an Array or Vector into another base class.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;&lt;br/&gt;//Copy a Sprite Vector to a DisplayObject Vector&lt;br/&gt;var myVector:Vector.&lt;sprite&gt; = new Vector.&lt;sprite&gt;();&lt;br/&gt;myVector[0] = new Sprite();&lt;br/&gt;var myVector2:Vector.&lt;displayobject&gt; = Vector.&lt;displayobject&gt;(myVector);&lt;br/&gt;&lt;br/&gt;//Copy an Array to a Vector&lt;br/&gt;var myArray:Array = [new Sprite(), new Sprite()];&lt;br/&gt;var myVector2:Vector.&lt;displayobject&gt; = Vector.&lt;displayobject&gt;(myArray);&lt;br/&gt;&lt;br/&gt;//Make sure your Array are all the same Type or you will get an Error&lt;br/&gt;var myArray:Array = [new Sprite(), new Sprite(), new String()];&lt;br/&gt;var myVector2:Vector.&lt;displayobject&gt; = Vector.&lt;displayobject&gt;(myArray); //Throws Error because String is not a DisplayObject&lt;br/&gt;&lt;br/&gt;//They can all be DisplayObjects though&lt;br/&gt;var myArray:Array = [new Sprite(), new Sprite(), new MovieClip()];&lt;br/&gt;var myVector2:Vector.&lt;displayobject&gt; = Vector.&lt;displayobject&gt;(myArray); // Accepts this array since Sprite and MovieClips are both DisplayObjects&lt;br/&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/sprite&gt;&lt;/sprite&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;So based on our examples, directly assigning a SubClass Vector to a SuperClass Vector will throw an Error. You must copy the Array or Vector into the the Super Class Vector. The Vector constructor takes 2 optional parameters. The first parameter is the length and the second is the fixed parameter. If you set the fixed parameter to true, trying to create something in an index past that will throw an Error. This result is the same when using a method that changes the length of the Vector such as &lt;code&gt;pop()&lt;/code&gt;, &lt;code&gt;push()&lt;/code&gt;, etc.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;pre lang="actionscript3"&gt;&lt;br/&gt;var myVector2:Vector.&lt;displayobject&gt; = new Vector.&lt;displayobject&gt;(3, true);&lt;br/&gt;trace(myVector2) //outputs null,null,null&lt;br/&gt;&lt;br/&gt;var myVector2:Vector.&lt;displayobject&gt; = new Vector.&lt;displayobject&gt;(3, true);&lt;br/&gt;myVector2[3] = new Sprite(); // Throws Error because fixed is set to true and we tried to place something in an index that exceeds the length.&lt;br/&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/displayobject&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;Now with all these restrictions, this makes Vector a lot faster than using Arrays and is recommended when dealing with an Array which holds all the same DataType. Vectors are approximately 40% faster according to &lt;a href="http://www.mikechambers.com/blog/2008/09/24/actioscript-3-vector-array-performance-comparison/"&gt;Mike Chambers&lt;/a&gt; to Arrays. When dealing with a large Array that is the same type, use a Vector. Also note that Vectors are only available in Flash Player 10, so that is bit of a downfall for the moment, but will be the new standard once the Flash Player 10 penetration numbers get higher.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;Hopefully this little look into Vectors will get you to make the switch if you are publishing to the 10th version of the Flash Player. Next week, be prepared, we Are going to take a look into a Custom Class. If you enjoyed this post, tweet it, share it, bookmark it and subscribe. Stay tuned for next week.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/Vector.html"&gt;More Info&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-3017363348637438199?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412055754</link><guid>http://blog.kreativeking.com/post/412055754</guid><pubDate>Wed, 10 Jun 2009 10:41:00 -0400</pubDate><category>AS3</category><category>cft</category><category>vector</category></item><item><title>Win 1000 Business Cards and a Canvas Print from UPrinting!!</title><description>&lt;p&gt;&lt;a href="http://www.idesignstudios.com/"&gt;Selene M. Bowlby&lt;/a&gt; also known on twitter as &lt;a href="http://twitter.com/idesignstudios"&gt;idesignstudios&lt;/a&gt; is having a huge giveaway. To commemorate 1 year as a full-time freelancer, she is hosting a 1000 Business Cards + Canvas Print giveaway sponsored by &lt;a href="http://www.uprinting.com/"&gt;UPrinting&lt;/a&gt;. Its super easy to enter. Just leave a comment on &lt;a href="http://www.idesignstudios.com/blog/"&gt;her blog&lt;/a&gt; with an explanation of why you should win. For more info on the giveaway, check out her post.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;a href="http://www.idesignstudios.com/blog/business/uprinting-giveaway/"&gt;UPrinting 1000 Business Card + Canvas Print Giveaway!&lt;/a&gt;&lt;/h5&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-2466819715397249480?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412055714</link><guid>http://blog.kreativeking.com/post/412055714</guid><pubDate>Wed, 03 Jun 2009 00:48:00 -0400</pubDate><category>giveaway</category><category>Business</category></item><item><title>Cool Flash Tip of the Week 2</title><description>&lt;p&gt;I&amp;#8217;ve gotten a lot of positive feedback on the &lt;a href="http://kreativeking.com/?tag=cft"&gt;Cool Flash Tip of the Week series&lt;/a&gt;. So as long as people find them useful, I&amp;#8217;ll keep them coming. Make sure to &lt;strong&gt;&lt;a href="http://feeds2.feedburner.com/kreativeking"&gt;subscribe&lt;/a&gt;&lt;/strong&gt; to be on top of all tips and &lt;a href="http://www.twitter.com/cg219"&gt;add me on twitter&lt;/a&gt;. Now with all the formalities out the way, lets get a move on to the tip of the week. This week&amp;#8217;s tip is about Events!!&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I&amp;#8217;m sure you are wondering, what kind of tips can you not know already. Events are a big topic in Actionscript 3.0. Almost everything is based on event listeners and is event driven. During my time coding, I found a couple of handy shortcuts that made my day easier. Let&amp;#8217;s say you have a  simple event handler that adds a MovieClip to the stage when a link is clicked. For simplicity&amp;#8217;s sake , lets pretend we have a MovieClip in the library named &amp;#8220;myMC&amp;#8221;, and a button on the stage called &amp;#8220;myLink&amp;#8221;.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;myLink.addEventListener(MouseEvent.CLICK, addClip);&lt;br/&gt;&lt;br/&gt;function addClip(e:MouseEvent):void&lt;br/&gt;{&lt;br/&gt;    stage.addChild(myClip);&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;This would be the typical way we would do it. This is absolutely correct, but what if we wanted in a different function to add the clip as well. Some one would probably try to execute that this way.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;&lt;br/&gt;myLink.addEventListener(MouseEvent.CLICK, addClip);&lt;br/&gt;otherFunction();&lt;br/&gt;&lt;br/&gt;function addClip(e:MouseEvent):void&lt;br/&gt;{&lt;br/&gt;    stage.addChild(myClip);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;function otherFunction():void&lt;br/&gt;{&lt;br/&gt;    stage.addChild(myClip);&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;Although this is correct, the ideal way to program is to reuse code as much as possible so that when its time to update you caan change the code in one spot and it will update throughout the program. Not to mention it cleans up the code considerably. A better alternative to this would be to call addClip(). But WAIT!!, this is an event handler, if I call this I get an Argument Error. This is true, but we can setup the event handler to be an event listener and also be called without needing an event. Here is how we acheive that.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;&lt;br/&gt;myLink.addEventListener(MouseEvent.CLICK, addClip);&lt;br/&gt;addClip();&lt;br/&gt;&lt;br/&gt;function addClip(e:MouseEvent = null):void&lt;br/&gt;{&lt;br/&gt;    stage.addChild(myClip);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;//------------------OR--------------------&lt;br/&gt;myLink.addEventListener(MouseEvent.CLICK, addClip);&lt;br/&gt;addClip(null);&lt;br/&gt;&lt;br/&gt;function addClip(e:MouseEvent):void&lt;br/&gt;{&lt;br/&gt;    stage.addChild(myClip);&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;That was pretty simple now was it. I use this all the time in my code to shorten things up and clean my code. I do prefer to the first method than the second alternative. I rather not have to keep passing null than just setting the default to null instead. Keep in mind, that this will only work if you do not need the actual event in your functions logic. If you do, then you need to an event. Well that&amp;#8217;s all for this week&amp;#8217;s tip. I hope you found it useful in any sense. Next week will be a big week, so stay tuned and &lt;strong&gt;&lt;a href="http://feeds2.feedburner.com/kreativeking"&gt;subscribe to the feed.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-7671167118692731008?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412055669</link><guid>http://blog.kreativeking.com/post/412055669</guid><pubDate>Tue, 02 Jun 2009 05:06:00 -0400</pubDate><category>flash</category><category>AS 3.0</category><category>AS3</category><category>cft</category></item><item><title>Cool Flash Tip of the Week 1</title><description>&lt;p&gt;I&amp;#8217;m going to start a series that will occur every week. A cool flash tip or something I think not many people know about. Be on the lookout every week for a new tip. This week&amp;#8217;s CFT is &amp;#8230;&amp;#8230;drumroll&amp;#8230;&amp;#8230;.&lt;em&gt;&amp;#8221; The Tertiary Operator &amp;#8220;.&lt;/em&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I spend alot of time traversing flash posts looking at other peoples code and I often see a large &lt;code&gt;if else&lt;/code&gt; block to change a simple variable. Using the Tertiary Operator we can simplify this into one line of code. Shorter code is always better in my opinion. Plus can save you a couple bytes in your code.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Here is an example of what I see.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;var myBool:Boolean = false;&lt;br/&gt;var myVar:Number = 12;&lt;br/&gt;&lt;br/&gt;if(myBool == true)&lt;br/&gt;{&lt;br/&gt;    myVar = 15;&lt;br/&gt;}&lt;br/&gt;else if(myBool == false &amp;amp;&amp;amp; myVar == 10)&lt;br/&gt;{&lt;br/&gt;    myVar = 40;&lt;br/&gt;}&lt;br/&gt;else&lt;br/&gt;{&lt;br/&gt;      myVar = 0;&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Now this is all well and dandy, but it is a waste of space and can be simplified by a lot. One, when testing a &lt;code&gt;Boolean&lt;/code&gt; there is no need to test to &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;. Instead if you want to test if something is &lt;code&gt;true&lt;/code&gt;, you can just place the variable in the if parenthesis. This will automatically test to true. To test if a variable is &lt;code&gt;false&lt;/code&gt;, use &lt;strong&gt;!&lt;/strong&gt;. Here is an example.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;var myBool:Boolean = false;&lt;br/&gt;var myVar:Number = 12;&lt;br/&gt;&lt;br/&gt;if(myBool )&lt;br/&gt;{&lt;br/&gt;    myVar = 15;&lt;br/&gt;}&lt;br/&gt;else if(!myBool &amp;amp;&amp;amp; myVar == 10)&lt;br/&gt;{&lt;br/&gt;    myVar = 40;&lt;br/&gt;}&lt;br/&gt;else&lt;br/&gt;{&lt;br/&gt;      myVar = 0;&lt;br/&gt;}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;This already shortens up our code a bit. But we can take this a step further using the Tertiary Operator. The syntax for this is pretty simple once you know what it means.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;//Tertiary Syntax&lt;br/&gt;&lt;br/&gt;(Test) ? True : False;&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Basically, If the test is true, the code after the&amp;#160;? executes. If the test is false the code after the&amp;#160;: executes.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;&lt;li&gt;? = if&lt;/li&gt;&lt;br/&gt;&lt;li&gt;: = else&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;You can also string together Tertiary statements to make and if else if else etc. Here&amp;#8217;s how we write the same code from above over using the Tertiary Operator.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;pre lang="actionscript3"&gt;var myBool:Boolean = false;&lt;br/&gt;var myVar:Number = 12;&lt;br/&gt;&lt;br/&gt;myVar = (myBool ) ? 15 : (!myBool &amp;amp;&amp;amp; myVar == 10)  ? 40 : 0;&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;WOW, look how much space we saved, and it i still readable. I implore everyone to start using this and save space =D. &lt;em&gt;Be aware that it is advised no to string Tertiary statements past &amp;#8220;If..Else&amp;#8221;. &lt;/em&gt;If you liked this idea of CFT ( Cool Flash Tip ), &lt;a href="#commentsSection"&gt;then leave a commen&lt;/a&gt;t, &lt;a href="http://feeds2.feedburner.com/kreativeking"&gt;subscribe to the feed&lt;/a&gt; or / and &lt;a href="http://www.twitter.com/cg219"&gt;follow me on twitter&lt;/a&gt;. It would be great to get some feedback on if this is helpful or not and maybe some tips you would like to see featured here.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Happy Flashing&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-4529314267044330584?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412055628</link><guid>http://blog.kreativeking.com/post/412055628</guid><pubDate>Thu, 28 May 2009 08:00:00 -0400</pubDate><category>flash</category><category>AS 3.0</category><category>AS3</category><category>cft</category><category>tertiary</category></item><item><title>kreativeMP3 - MP3 Player</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt;- Actionscript 3.0, XML&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt;- Nice, advanced audio player with simple controls.&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Features&lt;/h6&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;- ID3 Tags support (Up to v2.4)&lt;/li&gt;&lt;br/&gt;&lt;li&gt;- Loop and Shuffle functionality&lt;/li&gt;&lt;br/&gt;&lt;li&gt;- Animated Volume Slider&lt;/li&gt;&lt;br/&gt;&lt;li&gt;- Live Scrubbing&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://flashden.net/item/kreativemp3-mp3-player-with-id3-tag-support/42721?ref=cg219"&gt;Purchase Here&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-9211749684906607121?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412055599</link><guid>http://blog.kreativeking.com/post/412055599</guid><pubDate>Tue, 26 May 2009 22:52:00 -0400</pubDate><category>flash</category><category>AS 3.0</category><category>XML</category><category>actionscript3</category><category>mp3</category></item><item><title>kreativeROTATE - XML Banner Rotator</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;- Actionscript 3.0, XML&lt;/p&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;- Simple and clean banner / image rotator. XML driven slide show which supports links and loads JPEGS , PNGS, GIFS and SWFS .&lt;/p&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://flashden.net/item/kreativerotate-as3-xml-banner-rotator/33531?ref=cg219"&gt;Purchase Here&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-5354666025878022226?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412055557</link><guid>http://blog.kreativeking.com/post/412055557</guid><pubDate>Tue, 26 May 2009 19:28:00 -0400</pubDate><category>flash</category><category>AS 3.0</category><category>XML</category><category>actionscript3</category></item><item><title>5+ Flash Developer Blogs To Subscribe To</title><description>&lt;p&gt;Finding a good Flash Blog as a developer is sometimes hard to find. Here are a couple that I keep stashed in my RSS Reader.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;a href="http://blog.oaxoa.com/feed/"&gt;Oaxoa Blog&lt;/a&gt;&lt;/h5&gt;&lt;br/&gt;&lt;h6&gt;&lt;a href="http://blog.oaxoa.com/"&gt;&lt;a href="http://blog.oaxoa.com/"&gt;http://blog.oaxoa.com/&lt;/a&gt;&lt;/a&gt;&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;This is an excellent blog of experiments and cool effects that you can do in Flash. Some of the popular posts on this blog include an ASCII Art Generator that turns images AND videos into ASCII characters.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;a href="http://blog.inspirit.ru/?feed=rss2"&gt;astatic notes&lt;/a&gt;&lt;/h5&gt;&lt;br/&gt;&lt;h6&gt;&lt;a href="http://blog.inspirit.ru/"&gt;&lt;a href="http://blog.inspirit.ru/"&gt;http://blog.inspirit.ru/&lt;/a&gt;&lt;/a&gt;&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Another great experimental blog that is heavily concentrated on 3d and particles.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;a href="http://flashartofwar.com/feed/"&gt;The Flash Art of War&lt;/a&gt;&lt;/h5&gt;&lt;br/&gt;&lt;h6&gt;&lt;a href="http://flashartofwar.com/"&gt;&lt;a href="http://flashartofwar.com/"&gt;http://flashartofwar.com/&lt;/a&gt;&lt;/a&gt;&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;A very informative blog and home to the FlashCamo Decal framework. I call The Flash Art of War a developer&amp;#8217;s view in laymen terms. Make sure if you are in the NYC area to check out &lt;a href="http://www.meetup.com/nyc-flash-developer-happy-hour/"&gt;NYC Flash Developers Happy Hour&lt;/a&gt;.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;a href="http://theflashblog.com/?feed=rss2"&gt;The Flash Blog&lt;/a&gt;&lt;/h5&gt;&lt;br/&gt;&lt;h6&gt;&lt;a href="http://theflashblog.com/"&gt;&lt;a href="http://theflashblog.com/"&gt;http://theflashblog.com/&lt;/a&gt;&lt;/a&gt;&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Stay on top of everything Flash from Platform Evangelist Lee Brimelow. Make sure to check out &lt;a href="http://www.gotoandlearn.com/"&gt;gotoAndLearn&lt;/a&gt; and browse through the excellent screencasts.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;a href="http://www.bytearray.org/?feed=rss2"&gt;ByteArray&lt;/a&gt;&lt;/h5&gt;&lt;br/&gt;&lt;h6&gt;&lt;a href="http://www.bytearray.org/"&gt;&lt;a href="http://www.bytearray.org/"&gt;http://www.bytearray.org/&lt;/a&gt;&lt;/a&gt;&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Great resource for learning what you can do with ByteArrays and all sorts of techniques that are hard to find around the web.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;a href="http://www.gskinner.com/blog/index.rdf"&gt;gskinner&lt;/a&gt;&lt;/h5&gt;&lt;br/&gt;&lt;h6&gt;&lt;a href="http://www.gskinner.com/blog/"&gt;&lt;a href="http://www.gskinner.com/blog/"&gt;http://www.gskinner.com/blog/&lt;/a&gt;&lt;/a&gt;&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Excellent resource about memory and cpu management involving the Flash Player. Also home to the &lt;a href="http://blog.kreativeking.com/2009/03/tweenlite-family-and-gtween-are-getting-married/"&gt;retired&lt;/a&gt; but popular gTween Tweening Engine.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;br class="spacer_"/&gt;&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h5&gt;&lt;a href="http://feeds.feedburner.com/drawlogic"&gt;*drawlogic&lt;/a&gt;&lt;/h5&gt;&lt;br/&gt;&lt;h6&gt;&lt;a href="http://www.drawlogic.com/"&gt;&lt;a href="http://drawlogic.com/"&gt;http://drawlogic.com/&lt;/a&gt;&lt;/a&gt;&lt;/h6&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Great resource for programing in Actionscript 3.0. This blog usually has tons of information on open source API&amp;#8217;s and popular topics like Augmented Reality, Flash Player 10&amp;#160;3D and much more&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-5415701398101808707?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412053578</link><guid>http://blog.kreativeking.com/post/412053578</guid><pubDate>Mon, 25 May 2009 01:57:00 -0400</pubDate><category>flash</category><category>Flash News</category></item><item><title>Quick View Portfolio</title><description>&lt;ul&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Technologies&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Flex Framework, Actionscript 3.0, mySQL, PHP&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;br/&gt;&lt;h6&gt;Brief&lt;/h6&gt;&lt;br/&gt;&lt;p&gt; - Practicing the Flex Framework which in the end turned into  project. This is a quick portfolio view of work which is pulled out of a database using mySQL and PHP.&lt;/p&gt;&lt;br/&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;a href="http://artbycg.com/qvp/"&gt;Launch&lt;/a&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/6480215130907877002-7267029326769962109?l=testing1212121212.blogspot.com" alt=""/&gt;&lt;/div&gt;</description><link>http://blog.kreativeking.com/post/412053542</link><guid>http://blog.kreativeking.com/post/412053542</guid><pubDate>Sat, 23 May 2009 14:42:00 -0400</pubDate><category>flash</category><category>Flex</category><category>php</category><category>actionscript3</category><category>mysql</category></item></channel></rss>

