<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Zorked!</title>
	
	<link>http://www.zorked.com</link>
	<description>Progressive Web Development</description>
	<lastBuildDate>Mon, 15 Dec 2008 19:38:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/zorked" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Flex SWF Loads Twice</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/7gNAZp7Hilc/</link>
		<comments>http://www.zorked.com/flash/flex-swf-loads-twice/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 19:37:17 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.zorked.com/uncategorized/flex-swf-loads-twice/</guid>
		<description><![CDATA[I noticed recently that my Flex application SWF was loading twice. I would see the main Flex SWF file load at full size (~500kb), and then I would see it requested a second time, at a significantly lower file size: 64kb. It appears that this second load is the Flex framework loading in your styles [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed recently that my Flex application SWF was loading twice. I would see the main Flex SWF file load at full size (~500kb), and then I would see it requested a second time, at a significantly lower file size: 64kb. It appears that this second load is the Flex framework loading in your styles that were compiled into the app. If you check the &#8220;Compile CSS to SWF&#8221; option in Flex Builder, this probably won&#8217;t happen in your app.</p>
<p>With that said, there doesn&#8217;t appear to be a major downside to this, other than that you might see an additional HTTP request for your SWF.</p>
<p>Comments and additional research are always welcome!</p>
Similar Posts:<ul><li><a href="http://www.zorked.com/security/ie-mixed-content-secure-nonsecure-items/" rel="bookmark" title="April 17, 2008">IE Mixed Content &#8211; Page Contains Both Secure and Nonsecure Items</a></li>

<li><a href="http://www.zorked.com/flash/flash-and-navigatetourl-popup-blocking/" rel="bookmark" title="April 3, 2008">Popups Blocked in AS3 with navigateToURL()</a></li>

<li><a href="http://www.zorked.com/flash/flash-player-9-security-updates/" rel="bookmark" title="February 2, 2008">Flash Player 9 Security Updates</a></li>

<li><a href="http://www.zorked.com/html/html-snob-choose-the-right-doctype-not-all-the-hype/" rel="bookmark" title="April 12, 2007">HTML Snob: Choose The Right DOCTYPE, Not All The Hype</a></li>

<li><a href="http://www.zorked.com/css/organize-your-css-organize-your-life/" rel="bookmark" title="November 15, 2007">Organize Your CSS, Organize Your Life</a></li>
</ul><!-- Similar Posts took 10.362 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=7gNAZp7Hilc:VadFsYzjJ7k:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=7gNAZp7Hilc:VadFsYzjJ7k:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=7gNAZp7Hilc:VadFsYzjJ7k:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=7gNAZp7Hilc:VadFsYzjJ7k:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=7gNAZp7Hilc:VadFsYzjJ7k:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=7gNAZp7Hilc:VadFsYzjJ7k:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=7gNAZp7Hilc:VadFsYzjJ7k:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=7gNAZp7Hilc:VadFsYzjJ7k:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/7gNAZp7Hilc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/flash/flex-swf-loads-twice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.zorked.com/flash/flex-swf-loads-twice/</feedburner:origLink></item>
		<item>
		<title>Advanced E4X Filters in AS3</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/zHG4U3uUXHE/</link>
		<comments>http://www.zorked.com/flash/advanced-e4x-filters-in-as3/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 08:50:13 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[as3]]></category>

		<guid isPermaLink="false">http://www.zorked.com/?p=51</guid>
		<description><![CDATA[E4X is a tidy little querying language. Of all the new features in AS3, this one is probably the best.
Most people use E4X for retrieving data straight up, which is good if you have your server-side code doing the filter crunching, but if you&#8217;re going for chunky data calls, it&#8217;s nice to be able to [...]]]></description>
			<content:encoded><![CDATA[<p>E4X is a tidy little querying language. Of all the new features in AS3, this one is probably the best.</p>
<p>Most people use E4X for retrieving data straight up, which is good if you have your server-side code doing the filter crunching, but if you&#8217;re going for chunky data calls, it&#8217;s nice to be able to filter on the client-side too. Thankfully, E4X gives us plenty of capability for filtering.</p>
<p>Let&#8217;s start by laying out our common data set. I&#8217;m using an XML file with automotive data consisting of Makes-&gt;Make-&gt;Models-&gt;Model. You can see the XML file here: <a href="http://www.zorked.com/wp-content/uploads/2008/09/AutomotiveData.xml">AutomotiveData.xml</a></p>
<p>In my code, I&#8217;ve set a variable called xmlData to the value of the data in AutomotiveData.xml. xmlData corresponds to the root node (Makes) in the data.</p>
<h2>Basic E4X filters:</h2>
<p>Let&#8217;s retrieve the list of Honda models:</p>
<p>trace(xmlData.Make.(@name == &#8220;Honda&#8221;).Models.toXMLString());</p>
<p>&#8220;name&#8221; is the attribute of the Make node that we&#8217;re working with, so you target attributes with the @ symbol in front. Everything inside of the parentheses is interpreted as normal ActionScript, so you can run pretty much any code that you want to inside there, even if it doesn&#8217;t make sense. Just remember, in order to actually filter data, you need to run a function that evaluates to a Boolean: true or false.</p>
<h2>Multiple E4X filters:</h2>
<p>Let&#8217;s get all Makes that have models that cost less than $30,000 and have at least 8 models (this will return Honda and Toyota).</p>
<p>trace(xmlData.Make.(@minMSRP &lt; 30000 &amp;&amp; @modelCount &gt;= 8).Models.toXMLString());</p>
<p>Now, you&#8217;ll notice that I have an attribute called @modelCount that contains a sum of the model count for that Make. If you don&#8217;t have that attribute, you could also count quite easily:</p>
<p>trace(xmlData.Make.(@minMSRP &lt; 30000 &amp;&amp; <em><strong>Models.Model.length()</strong> </em>&gt;= 8).Models.toXMLString());</p>
<p>E4X recognizes Models as the currently scoped Models node, since we&#8217;ve already descended to xmlData.Make. It would not work to say xmlData.(Models.Model.length() &gt;= <img src='http://www.zorked.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> because the scope of &#8220;xmlData.&#8221; only gets you to Make, not Models.</p>
<p>In the above example, notice that I ran a function, .length() on the XML, and that I in fact ran E4X inside of E4X. You can nest E4X pretty much as far as you would ever need without hitting any limits. If you do hit limts, you should restructure your XML or consider using a filtering function, which I will talk about later.</p>
<h2>Nested E4X and Local Variables</h2>
<p>Let&#8217;s say we want to find all Makes that have a Model that starts with the letter &#8220;R&#8221;:</p>
<p>var strModelFirstCharacter:String = &#8220;R&#8221;;<br />
trace(xmlData.Make.(Models.Model.(@name.toString().indexOf(strModelFirstCharacter) == 0).length() &gt; 0).@name.toXMLString());</p>
<p>Notice that we&#8217;re running a nested query so that we can keep the Make scope and get the Make.@name attribute. Also, we&#8217;ve passed in a variable this time so that we can modify this E4X to run off of any character or phrase.</p>
<p>If a user was selecting the filters, you could also have them pass in a value, like so:</p>
<p>var strAttribute:String = &#8220;mpgCity&#8221;; //mpgHighway<br />
var intMinValue:uint = 22;<br />
trace(xmlData.Make.Models.Model.(attribute(strAttribute) &gt; intMinValue).@name.toXMLString());</p>
<h2>E4X Filter Functions</h2>
<p>Something that just using variables above leaves out is the ability to change the greater than operator without a bunch of messy inline code. However, since we can do basically anything inside of the parentheses, you can create a function to handle variance:</p>
<p><code></p>
<pre>function GenericFilter(data:XML, attributeName:String, value:Object, comparison:String = "equal"):Boolean {
    switch(comparison) {
        case "&lt;":
        case "less":
            return data.attribute(attributeName) &lt; value;
        case "&gt;":
        case "greater":
            return data.attribute(attributeName) &gt; value;
        case "=":
        case "equal":
            return data.attribute(attributeName) == value;
    }
    return false;
}</pre>
<p></code></p>
<p>Then, your E4X can be structured as such:</p>
<p>var strAttribute:String = &#8220;seating&#8221;;<br />
var intValue:Object = 8;<br />
var comparisonType:String = &#8220;=&#8221;;<br />
trace(xmlData.Make.Models.Model.(GenericFilter(valueOf(), strAttribute, intValue, comparisonType)).@name.toXMLString());</p>
<p>Notice the valueOf() function; this is passing Model nodes into the GenericFilter, which is why that function accepts an XML node as the data parameter. The comparisonType is simply a string that you can pass in. I&#8217;m using a switch because I don&#8217;t think there&#8217;s a way to pass an actual equality or greater than operator as a parameter in ActionScript. You could of course extend GenericFilter() to accept greater than or equal, or do fuzzy logic, whatever you want to do is acceptable.</p>
<p>These E4X filter functions are pretty much the most powerful thing in E4X; you can run anything that you could possibly want to.</p>
<h2>More to come&#8230;</h2>
<p>I&#8217;ll update this article with more information as requests come in or I try new things. Keep in mind that <a href="/flash/e4x-attribute-filter-doesnt-work-in-switch-statements/">E4X attribute filters don&#8217;t work in switch statements</a>.</p>
Similar Posts:<ul><li><a href="http://www.zorked.com/flash/e4x-attribute-filter-doesnt-work-in-switch-statements/" rel="bookmark" title="January 26, 2008">E4X Attribute Filter Doesn&#8217;t Work In Switch Statements</a></li>

<li><a href="http://www.zorked.com/software/cool-new-stuff-in-creative-suite-3/" rel="bookmark" title="May 2, 2007">Cool New Stuff in Creative Suite 3</a></li>

<li><a href="http://www.zorked.com/flash/as3-date/" rel="bookmark" title="September 9, 2008">Going on a Date() with AS3</a></li>

<li><a href="http://www.zorked.com/flash/stacking-and-windowing-in-flash/" rel="bookmark" title="January 28, 2008">Stacking and Windowing in Flash</a></li>

<li><a href="http://www.zorked.com/security/ie-mixed-content-secure-nonsecure-items/" rel="bookmark" title="April 17, 2008">IE Mixed Content &#8211; Page Contains Both Secure and Nonsecure Items</a></li>
</ul><!-- Similar Posts took 10.455 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=zHG4U3uUXHE:HCdlU3b-7dc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=zHG4U3uUXHE:HCdlU3b-7dc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=zHG4U3uUXHE:HCdlU3b-7dc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=zHG4U3uUXHE:HCdlU3b-7dc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=zHG4U3uUXHE:HCdlU3b-7dc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=zHG4U3uUXHE:HCdlU3b-7dc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=zHG4U3uUXHE:HCdlU3b-7dc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=zHG4U3uUXHE:HCdlU3b-7dc:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/zHG4U3uUXHE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/flash/advanced-e4x-filters-in-as3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.zorked.com/flash/advanced-e4x-filters-in-as3/</feedburner:origLink></item>
		<item>
		<title>Going on a Date() with AS3</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/BUI3i8CZ2Yc/</link>
		<comments>http://www.zorked.com/flash/as3-date/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 05:57:15 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[as3]]></category>

		<guid isPermaLink="false">http://www.zorked.com/?p=26</guid>
		<description><![CDATA[Download the Date Utility referenced in this article: DateUtility.as
Despite what you&#8217;ve heard, it&#8217;s actually really easy to get a Date() with AS3. You just have to know how the right things to say so that you can smooth-talk her a little bit.
Let&#8217;s get started:
Get the current date &#38; time:
var dtCurrent:Date = new Date();
This will give [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Download the Date Utility referenced in this article: <a href="http://www.zorked.com/wp-content/uploads/2008/09/DateUtility.as">DateUtility.as</a></strong></p>
<p>Despite what you&#8217;ve heard, it&#8217;s actually really easy to get a Date() with AS3. You just have to know how the right things to say so that you can smooth-talk her a little bit.</p>
<p>Let&#8217;s get started:</p>
<h2>Get the current date &amp; time:</h2>
<p><code>var dtCurrent:Date = new Date();</code></p>
<p>This will give you the current date and time, according to the computer that Flash Player is running on. It will use the computer&#8217;s timezone and DST settings.</p>
<h2>Create an arbitrary date &amp; time:</h2>
<p><code>var dtWhenever:Date = new Date(2008, 4, 7, 16, 5, 30, 250);</code><br />
This gives you  May 7th, 2008, at 4:05:30.250pm. Take special care to notice that month (4) is zero-based, meaning that January is 0, and December is 11. Hour, the 4th parameter, starts with 0 as midnight, and ends with 23 as 11pm. The constructor is in the format <em>new Date(year, month, day, hours, minutes, seconds, milliseconds)</em>.</p>
<h2>Adding to and Subtracting from a date:</h2>
<p>Fortunately, AS3 makes this very easy. Say that you want to add 4 days to a date. All you have to do is say:<br />
<code>dtMyDate.date += 4;</code></p>
<p>Remember, .date is the property that you and I think of as the day of the month. So, you&#8217;re probably starting to think of some edge cases, such as &#8220;what if it&#8217;s the last day of the month?&#8221;. The great news is that AS3 will automatically bump the month up as well, rather than having September 34th or something silly.</p>
<p>This works with any of the properties of a Date as well. For example:<br />
<code>dtMyDate.fullYear += 1;</code><br />
or<br />
<code>dtMyDate.minutes += 300</code></p>
<p>Subtraction works the exact same way, except you of course would say<br />
<code>dtMyDate.minutes -= 300;</code></p>
<h2>Number of days in a month:</h2>
<p>AS3 doesn&#8217;t easily give you the number of days in a month, such as &#8220;April has 30 days&#8221;. However, we can use the subtracting technique from above and set a day of the month of &#8220;0&#8243;, which is the same as the last day in the previous month. So, if you wanted to get the number of days in March, you could say <code>new Date(new Date().year, 2 + 1, 0).date;</code></p>
<p>This fills in the current year, then a month of 2 (March) + 1 (April), and then sets the day of the month to 0. In the DateUtility class, you can say DateUtility.GetDaysInMonth(monthIndex);. Remember, AS3 uses a zero-based index for months, so January is 0, December is 11; the GetDaysInMonth() function follows that standard.</p>
<h2>Difference in days between two dates:</h2>
<p>If you would like to find the difference between two dates, you can simply find the number of milliseconds between them with the .time parameter, and then divide that by 86400000, the number of milliseconds in one day.<br />
<code><br />
var dtDate1:Date = new Date(2008, 4, 1); //May 1st, 2008<br />
var dtDate2:Date = new Date(2008, 6, 20); //July 20th, 2008<br />
var difference:uint =  Math.floor(Math.abs((dtDate2.time - dtDate1.time) / 86400000));<br />
</code></p>
<p>We use Math.floor so that we don&#8217;t get a partial date, such as 20.2 days. Math.abs is so that you&#8217;re actually finding the difference between the days. You can of course remove that if you need to know which date is greater than the other.</p>
<h2>Switching to a different timezone:</h2>
<p>First of all, you need to get back to UTC, which is easy with the Date.getTimezoneOffset() function.<br />
<code><br />
var dtNow:Date = new Date();<br />
dtNow.minutes += dtNow.getTimezoneOffset();<br />
</code><br />
At this point, you have UTC time, and it&#8217;ll be easy to convert to a different timezone. Let&#8217;s say we have<br />
<code><br />
var timezone:Number = -7; //Mountain time<br />
</code></p>
<p>To convert, this simple math will work:<br />
<code>dtNow.minutes -= (convertToTimezone * 60);</code></p>
<p>However, you&#8217;re quickly going to run into Daylight Savings Time. A silly little way I get around it is with creating an arbitrary date in January and seeing if it has a timezone offset that&#8217;s greater than the date I&#8217;m working with, like so:<br />
<code><br />
var blnIsDST:Boolean = (dtNow.getTimezoneOffset() &lt; new Date(2000, 0, 1).getTimezoneOffset());<br />
</code></p>
<p>Then, to convert, you can say:<br />
<code>dtNow.minutes += blnIsDST ? 60 : 0;</code></p>
<p>If you would prefer, I&#8217;ve wrapped up all of the timezone switch functionality in my DateUtility.as that you can download. <a href="http://www.zorked.com/wp-content/uploads/2008/09/DateUtility.as">Download DateUtility.as »</a></p>
<h2>Date Formatting</h2>
<p>If you want a formatted date that&#8217;s more robust than dtNow.toString(), then you can use the DateFormatter class found in mx.formatters.DateFormatter.<br />
<code><br />
var df:DateFormatter = new DateFormatter();<br />
df.formatString = "EEEE, MMMM DD, YYYY @ L:NNA";<br />
trace(df.format(new Date()));<br />
</code><br />
This should print out something like &#8220;Tuesday, September 09, 2008 @ 1:41am&#8221;. You can see the full docs on the formatString parameter on <a href="http://livedocs.adobe.com/flex/3/langref/mx/formatters/DateFormatter.html#formatString" target="_blank">the Adobe LiveDocs page</a>.</p>
<h2>Date()-ing Tips and Gotchas</h2>
<p>Remember that the hours, month, and day properties are zero-based. Hour 0 is midnight, month 2 is March, and day 6 is Saturday.</p>
<p>Date.time is the number of milliseconds since midnight, 1/1/1970 UTC, also known as the Epoch: an arbitrary point in time used to store the value of a date. I like to use Date.time to do a quick compare to see if one Date is greater than another, as in the date difference example above.</p>
<p>Also, Date.date is the day of the month, while Date.day is the day of the week.</p>
<p>Please let me know if there&#8217;s something I&#8217;ve forgotten that you&#8217;re interested in.</p>
<p><a href="http://www.zorked.com/wp-content/uploads/2008/09/DateUtility.as">Download DateUtility.as »</a></p>
Similar Posts:<ul><li><a href="http://www.zorked.com/flash/new-flash-player-9-statistics/" rel="bookmark" title="April 22, 2007">New Flash Player 9 Statistics</a></li>

<li><a href="http://www.zorked.com/best-practices/web-design-for-your-toaster/" rel="bookmark" title="October 29, 2007">Web Design For Your Toaster</a></li>

<li><a href="http://www.zorked.com/html/html-snob-choose-the-right-doctype-not-all-the-hype/" rel="bookmark" title="April 12, 2007">HTML Snob: Choose The Right DOCTYPE, Not All The Hype</a></li>

<li><a href="http://www.zorked.com/css/organize-your-css-organize-your-life/" rel="bookmark" title="November 15, 2007">Organize Your CSS, Organize Your Life</a></li>

<li><a href="http://www.zorked.com/software/cool-new-stuff-in-creative-suite-3/" rel="bookmark" title="May 2, 2007">Cool New Stuff in Creative Suite 3</a></li>
</ul><!-- Similar Posts took 11.530 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=BUI3i8CZ2Yc:a-Q6AFJYJF8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=BUI3i8CZ2Yc:a-Q6AFJYJF8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=BUI3i8CZ2Yc:a-Q6AFJYJF8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=BUI3i8CZ2Yc:a-Q6AFJYJF8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=BUI3i8CZ2Yc:a-Q6AFJYJF8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=BUI3i8CZ2Yc:a-Q6AFJYJF8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=BUI3i8CZ2Yc:a-Q6AFJYJF8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=BUI3i8CZ2Yc:a-Q6AFJYJF8:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/BUI3i8CZ2Yc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/flash/as3-date/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.zorked.com/flash/as3-date/</feedburner:origLink></item>
		<item>
		<title>Base CSS vs. CSS Reset</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/XGAxe7AmwJ4/</link>
		<comments>http://www.zorked.com/css/base-css-vs-css-reset/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 09:44:38 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.zorked.com/?p=24</guid>
		<description><![CDATA[There&#8217;s been a good bit of talk lately about CSS resets, and how good/bad they are. This conversation tends to come up every 6 months to a year and always gets people excited. This time around, Jonathan Snook&#8217;s No CSS Reset is &#8220;the culprit&#8221;. I think his general sentiment is good, and he comes to [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been a good bit of talk lately about CSS resets, and how good/bad they are. This conversation tends to come up every 6 months to a year and always gets people excited. This time around, Jonathan Snook&#8217;s <a href="http://snook.ca/archives/html_and_css/no_css_reset/" target="_blank">No CSS Reset</a> is &#8220;the culprit&#8221;. I think his general sentiment is good, and he comes to almost the same conclusion, except that I&#8217;ve actually created the Base CSS file that he speaks of. More to follow&#8230;</p>
<h2>The Ugly</h2>
<p>I&#8217;ve seen lots of people use a star reset: * {margin: 0; padding: 0;}. If you use this by itself, and you aren&#8217;t resetting margin and padding on other elements like headings, p, and form elements, <strong>you are going to get bitten</strong>. Hard. Firefox and IE6 are the special offenders here: form elements, especially checkboxes, radio buttons, and selects will get styled especially poorly and need to be restyled with some padding or the arrows won&#8217;t appear, or they become impossible to select.</p>
<h2>The Bad</h2>
<p>The bad is when you don&#8217;t do any common groundwork; every project means you start over and you avoid CSS resets like the plague. Ok, so this isn&#8217;t really all that bad, but it&#8217;s going to cost you a lot of time in the long run, especially if you&#8217;re developing on a team. What happens when you have the n00b that doesn&#8217;t understand some of the nuances of cross-browser text sizing, or the way different form elements are handled? You&#8217;ll probably say &#8220;educate them!&#8221; or &#8220;then don&#8217;t let them touch it until they know what they&#8217;re doing!&#8221;, but that essentially makes them non-productive. <strong>It&#8217;s bad practice to make CSS more magical than it already is; give everybody a headstart and lay a common framework.</strong></p>
<h2>The Good</h2>
<p>As usual, we want to find the middle ground.</p>
<p>I think Eric Meyer&#8217;s CSS is moving in the right direction, but it&#8217;s a bit bare at the end result. I think the point of a base CSS is that it&#8217;s supposed to look decent after you&#8217;re done so that you don&#8217;t have to think about every style. The idea is to make it look very similar cross-browser, not to pull a Dark Ages Catholic Church and reset everything. Eric mentions this in his article, but a lot of people just download and plug it in.</p>
<p>There are plenty of UI frameworks out there that have a common CSS file that they use, mostly filled up with proprietary classes and IDs, but you can often extract bits and pieces from the generic parts to use. The point is, rather than resetting everything, you can instead <strong>create a foundation or base for your CSS</strong> to at least make it cross-browser friendly, and at least presentable by default.</p>
<p>I&#8217;ve been using my current base.css file for about 3 years now, and I update it from time to time. Feel free to use it if you&#8217;d like. You can see it in action at <a href="http://labs.zorked.com/lib/base.html" target="_blank">http://labs.zorked.com/lib/base.html</a></p>
<p><strong>Download:</strong> <a href="http://labs.zorked.com/lib/base.css">Base.css</a></p>
Similar Posts:<ul><li><a href="http://www.zorked.com/css/organize-your-css-organize-your-life/" rel="bookmark" title="November 15, 2007">Organize Your CSS, Organize Your Life</a></li>

<li><a href="http://www.zorked.com/css/alternating-table-rows-using-css-only/" rel="bookmark" title="March 17, 2008">Alternating Table Rows Using CSS Only</a></li>

<li><a href="http://www.zorked.com/conference/life-at-sxsw/" rel="bookmark" title="March 15, 2007">Life at SxSW</a></li>

<li><a href="http://www.zorked.com/best-practices/directory-auto-includes/" rel="bookmark" title="September 22, 2007">Directory Auto-Includes</a></li>

<li><a href="http://www.zorked.com/standards/outside-the-web-standards-box/" rel="bookmark" title="December 30, 2007">Outside The Web Standards Box</a></li>
</ul><!-- Similar Posts took 11.486 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=XGAxe7AmwJ4:i_NKLxrJtc4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=XGAxe7AmwJ4:i_NKLxrJtc4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=XGAxe7AmwJ4:i_NKLxrJtc4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=XGAxe7AmwJ4:i_NKLxrJtc4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=XGAxe7AmwJ4:i_NKLxrJtc4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=XGAxe7AmwJ4:i_NKLxrJtc4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=XGAxe7AmwJ4:i_NKLxrJtc4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=XGAxe7AmwJ4:i_NKLxrJtc4:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/XGAxe7AmwJ4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/css/base-css-vs-css-reset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.zorked.com/css/base-css-vs-css-reset/</feedburner:origLink></item>
		<item>
		<title>IE Mixed Content – Page Contains Both Secure and Nonsecure Items</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/Xw7CwY28qGA/</link>
		<comments>http://www.zorked.com/security/ie-mixed-content-secure-nonsecure-items/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 00:55:13 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[browsers]]></category>

		<guid isPermaLink="false">http://www.zorked.com/?p=20</guid>
		<description><![CDATA[I ran into IE&#8217;s mixed content security alert feature earlier today when trying to load our application&#8217;s secure credit application page. Obviously it&#8217;s a bad user experience and it looks bad on us so I set out to fix it and found the following things that hopefully will save someone else some time.
The reason for [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into IE&#8217;s mixed content security alert feature earlier today when trying to load our application&#8217;s secure credit application page. Obviously it&#8217;s a bad user experience and it looks bad on us so I set out to fix it and found the following things that hopefully will save someone else some time.</p>
<p>The reason for the warning is that you&#8217;re on an SSL-secured (https protocol) page that is attempting to load non-SSL (http protocol) content. It&#8217;s ok if you&#8217;re on an HTTP page and you request HTTPS; you won&#8217;t receive the error.</p>
<p>First of all, you should download a tool for HTTP sniffing. I use <a href="http://www.fiddlertool.com/fiddler/" target="_blank">Fiddler</a>.</p>
<p>Run Fiddler and then browse to the page that is causing the message. You&#8217;ll see a bunch of requests go through, most likely. You can ignore any CONNECT requests; anything else should be showing up as HTTPS.</p>
<p>Most likely, you have a script or CSS file that is requesting HTTP content. If you set them all to HTTPS or leave them as relative paths, you should be ok.</p>
<p>For example:<br />
/css/site.css &#8211; OK<br />
https://www.example.com/css/site.css &#8211; OK<br />
http://www.example.com/css/site.css &#8211; Error</p>
<p>Here&#8217;s your checklist of things to do:</p>
<ul>
<li>All loaded assets, such as images, scripts, css, favicons, etc. must be relative paths or be HTTPS.</li>
<li>All iframes must point to an actual page (relative or HTTPS). No SRC attribute, or an SRC of # or about:blank will raise the error. Some people have used javascript: false; with success.</li>
<li>Make sure all requests from your page are HTTPS. Google Analytics and other 3rd-party tools often have a special link you can use for HTTPS.</li>
<li>The codebase attribute of an object (Flash, Applets, etc) must be HTTPS. IE doesn&#8217;t actually make a request on this, but it does check the protocol for some reason.</li>
<li>Anything that returns an HTTP error will cause the error to pop up, since IE considers its error pages to be &#8220;insecure&#8221;. Of course, the whole browser&#8217;s insecure, but that&#8217;s another article.</li>
<li>If you have a JavaScript that calls removeChild() on a node that has a background image, it may cause this error. You can set outerHTML = &#8221; instead without consequence. Retarded, but it works.</li>
</ul>
<p>Things that you don&#8217;t have to worry about:</p>
<ul>
<li>DOCTYPES</li>
<li>XHTML namespaces</li>
<li>Links in the page (anchors, not the link element)</li>
</ul>
<p>The one that got me was the codebase attribute of an object element. I figured it was just too stupid to be the actual problem. Silly me; IE strikes again.</p>
<p>Hope this saves some folks time.</p>
Similar Posts:<ul><li><a href="http://www.zorked.com/flash/flex-swf-loads-twice/" rel="bookmark" title="December 15, 2008">Flex SWF Loads Twice</a></li>

<li><a href="http://www.zorked.com/flash/flash-and-navigatetourl-popup-blocking/" rel="bookmark" title="April 3, 2008">Popups Blocked in AS3 with navigateToURL()</a></li>

<li><a href="http://www.zorked.com/html/html-snob-choose-the-right-doctype-not-all-the-hype/" rel="bookmark" title="April 12, 2007">HTML Snob: Choose The Right DOCTYPE, Not All The Hype</a></li>

<li><a href="http://www.zorked.com/rss/design-your-site-for-rss-first/" rel="bookmark" title="September 1, 2007">Design Your Site For RSS First</a></li>

<li><a href="http://www.zorked.com/seo/lazy-mans-seo-5-easy-ways-to-improve-search-engine-rankings/" rel="bookmark" title="June 2, 2007">Lazy Man&#8217;s SEO: 5 Easy Ways To Improve Search Engine Rankings</a></li>
</ul><!-- Similar Posts took 10.397 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=Xw7CwY28qGA:_fivS_FwxQA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=Xw7CwY28qGA:_fivS_FwxQA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=Xw7CwY28qGA:_fivS_FwxQA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=Xw7CwY28qGA:_fivS_FwxQA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=Xw7CwY28qGA:_fivS_FwxQA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=Xw7CwY28qGA:_fivS_FwxQA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=Xw7CwY28qGA:_fivS_FwxQA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=Xw7CwY28qGA:_fivS_FwxQA:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/Xw7CwY28qGA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/security/ie-mixed-content-secure-nonsecure-items/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		<feedburner:origLink>http://www.zorked.com/security/ie-mixed-content-secure-nonsecure-items/</feedburner:origLink></item>
		<item>
		<title>Popups Blocked in AS3 with navigateToURL()</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/5eeRbGwYk3k/</link>
		<comments>http://www.zorked.com/flash/flash-and-navigatetourl-popup-blocking/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 04:21:56 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.zorked.com/flash/flash-and-popup-blocking/</guid>
		<description><![CDATA[By default, browsers with a built-in popup blocker will usually block Flash navigateToURL requests that open in a &#8220;_blank&#8221; window. For example: navigateToURL(&#8221;http://www.google.com&#8221;, &#8220;_blank&#8221;); will generally get blocked. Even if you have a mouse click event to send off the navigateToURL call, it will be blocked.
The good news is that you can get around this [...]]]></description>
			<content:encoded><![CDATA[<p>By default, browsers with a built-in popup blocker will usually block Flash navigateToURL requests that open in a &#8220;_blank&#8221; window. For example: navigateToURL(&#8221;http://www.google.com&#8221;, &#8220;_blank&#8221;); will generally get blocked. Even if you have a mouse click event to send off the navigateToURL call, it will be blocked.</p>
<p>The good news is that you can get around this behaviour by calling out to JavaScript to handle the request for you. Go ahead and <a href="http://www.zorked.com/wp-content/uploads/2008/08/URLNavigator.as">download URLNavigator.as</a> and save it as ~/com/zorked/URLNavigator.as, where ~ is the folder that your FLA or Flex project resides within. In your ActionScript code, import com.zorked.URLNavigator, then call out to method with URLNavigator.ChangePage(&#8221;http://www.example.com&#8221;, &#8220;_blank&#8221;); in the mouse event that you&#8217;re capturing.</p>
<p>Now, I&#8217;ve tested this with a variety of systems, and it works on a lot of them but it&#8217;s not foolproof. So far, it works in IE 6, 7, &amp; 8 (beta), Firefox 2 &amp; 3, Opera 9.x, Safari 3, and runs on XP, Vista, and OSX. It may work on additional systems, but my testing is limited. You may also have problems if you embed your SWF in a strange way. It seems to work with most JavaScript embed libraries, but different parameters on the &lt;object&gt; and &lt;embed&gt; could conceivably cause problems.</p>
<p>However, the caveat is this: you CANNOT call this code except within a click mouse event that you&#8217;re listening for. Popup blockers will rightfully block an automatic popup, and there is no way around it. If you ask me how to do an auto-popup, I&#8217;ll find your house while you&#8217;re sleeping; this method is for white-hat developers looking to open a new browser window for good reason.</p>
<p>Additionally, I made an update to the link that was originally saved: Wordpress likes to save files as lowercase names, which Flash had problems with, since the file didn&#8217;t match the name of the class. You should be able to download and work with it without having to rename it.</p>
<p>I&#8217;m open to suggestions and improvements, and if anyone has access to additional browsers or operating systems that it&#8217;s worked for them on, please let me know.</p>
<h4>Download: <a href="http://www.zorked.com/wp-content/uploads/2008/08/URLNavigator.as">URLNavigator.as</a></h4>
Similar Posts:<ul><li><a href="http://www.zorked.com/security/ie-mixed-content-secure-nonsecure-items/" rel="bookmark" title="April 17, 2008">IE Mixed Content &#8211; Page Contains Both Secure and Nonsecure Items</a></li>

<li><a href="http://www.zorked.com/flash/stacking-and-windowing-in-flash/" rel="bookmark" title="January 28, 2008">Stacking and Windowing in Flash</a></li>

<li><a href="http://www.zorked.com/css/organize-your-css-organize-your-life/" rel="bookmark" title="November 15, 2007">Organize Your CSS, Organize Your Life</a></li>

<li><a href="http://www.zorked.com/software/cool-new-stuff-in-creative-suite-3/" rel="bookmark" title="May 2, 2007">Cool New Stuff in Creative Suite 3</a></li>

<li><a href="http://www.zorked.com/css/base-css-vs-css-reset/" rel="bookmark" title="April 19, 2008">Base CSS vs. CSS Reset</a></li>
</ul><!-- Similar Posts took 10.152 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=5eeRbGwYk3k:gkt-vN96mq8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=5eeRbGwYk3k:gkt-vN96mq8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=5eeRbGwYk3k:gkt-vN96mq8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=5eeRbGwYk3k:gkt-vN96mq8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=5eeRbGwYk3k:gkt-vN96mq8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=5eeRbGwYk3k:gkt-vN96mq8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=5eeRbGwYk3k:gkt-vN96mq8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=5eeRbGwYk3k:gkt-vN96mq8:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/5eeRbGwYk3k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/flash/flash-and-navigatetourl-popup-blocking/feed/</wfw:commentRss>
		<slash:comments>99</slash:comments>
		<feedburner:origLink>http://www.zorked.com/flash/flash-and-navigatetourl-popup-blocking/</feedburner:origLink></item>
		<item>
		<title>Alternating Table Rows Using CSS Only</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/BG72XxhAsWk/</link>
		<comments>http://www.zorked.com/css/alternating-table-rows-using-css-only/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 05:54:29 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.zorked.com/css/alternating-table-rows-using-css-only/</guid>
		<description><![CDATA[This post will be more relevant in the future when more browsers support the new CSS 3 Selector specification, which includes a lot of neat attribute and pseudo-element selectors, among other things.
I&#8217;ve been looking for a way to do alternating table rows with CSS only; no JavaScript and no adding class=&#8221;alternating&#8221; to the tr element [...]]]></description>
			<content:encoded><![CDATA[<h4>This post will be more relevant in the future when more browsers support the new CSS 3 Selector specification, which includes a lot of neat attribute and pseudo-element selectors, among other things.</h4>
<p>I&#8217;ve been looking for a way to do alternating table rows with CSS only; no JavaScript and no adding class=&#8221;alternating&#8221; to the tr element in server-side code. After a tiny bit of experimenting, I found the following solutions:</p>
<p>Alternating every other row:<br />
<code><br />
tr:nth-child(odd) {<br />
background-color: #CCCCCC;<br />
}</code></p>
<p><code>tr:nth-child(even) {<br />
background-color: #6699FF;<br />
}</code></p>
<p>Changing between 3 different colors:<br />
<code><br />
tr:nth-child(3n-2) {<br />
background-color: #FF9900;<br />
}</code><br />
<code><br />
tr:nth-child(3n-1) {<br />
background-color: #006633;<br />
}</code><br />
<code></code><span id="more-19"></span><code><br />
tr:nth-child(3n) {<br />
background-color: #CCCC99;<br />
}</code></p>
<p>As you now know, the nth-child() pseudo-selector retreives all children of a node, regardless of their type. You could do *:nth-child(odd) to do something with every other child in the DOM, beginning with the 1st.</p>
<p>Inside of the selector parameters you put in a multiplier in the format an + b, where &#8220;a&#8221; is replaced with a multiplier, and &#8220;b&#8221; is replaced with an offset. So, 3n means every 3rd selected child has an operation done to it. nth-child(3n) would retrieve items 3, 6, 9, and 12. To operate on every third child, but start on the 1st child, use the &#8220;b&#8221; offset to subtract 2: nth-child(3n -2) will retrieve children 1, 4, 7, etc.</p>
<p>If all you want are alternating rows, you can use the &#8220;odd&#8221; and &#8220;even&#8221; keywords, but if you felt excited about CSS, you could also use the nth-child(2n -1) and nth-child(2n) to respectively match the keywords.</p>
<h2>Browser Support</h2>
<p>Last check: March 17th, 2008</p>
<table>
<tr>
<th>Browser</th>
<th>Support?</th>
<th>First Version w/Support</th>
</tr>
<tr>
<td>Opera</td>
<td>Yes</td>
<td>9.5 (in beta)</td>
</tr>
<tr>
<td>Konqueror</td>
<td>Yes</td>
<td>3.5.4 (not verified)</td>
</tr>
<tr>
<td>Safari</td>
<td>Yes?</td>
<td>r30118 (in alpha, not verified)</td>
</tr>
<tr>
<td>Firefox</td>
<td>No</td>
<td>n/a</td>
</tr>
<tr>
<td>Internet Explorer</td>
<td>No</td>
<td>n/a</td>
</tr>
</table>
Similar Posts:<ul><li><a href="http://www.zorked.com/css/organize-your-css-organize-your-life/" rel="bookmark" title="November 15, 2007">Organize Your CSS, Organize Your Life</a></li>

<li><a href="http://www.zorked.com/best-practices/web-design-for-your-toaster/" rel="bookmark" title="October 29, 2007">Web Design For Your Toaster</a></li>

<li><a href="http://www.zorked.com/seo/lazy-mans-seo-5-easy-ways-to-improve-search-engine-rankings/" rel="bookmark" title="June 2, 2007">Lazy Man&#8217;s SEO: 5 Easy Ways To Improve Search Engine Rankings</a></li>

<li><a href="http://www.zorked.com/flash/advanced-e4x-filters-in-as3/" rel="bookmark" title="September 25, 2008">Advanced E4X Filters in AS3</a></li>

<li><a href="http://www.zorked.com/flash/as3-date/" rel="bookmark" title="September 9, 2008">Going on a Date() with AS3</a></li>
</ul><!-- Similar Posts took 12.520 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=BG72XxhAsWk:04_LZaZHzoM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=BG72XxhAsWk:04_LZaZHzoM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=BG72XxhAsWk:04_LZaZHzoM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=BG72XxhAsWk:04_LZaZHzoM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=BG72XxhAsWk:04_LZaZHzoM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=BG72XxhAsWk:04_LZaZHzoM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=BG72XxhAsWk:04_LZaZHzoM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=BG72XxhAsWk:04_LZaZHzoM:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/BG72XxhAsWk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/css/alternating-table-rows-using-css-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.zorked.com/css/alternating-table-rows-using-css-only/</feedburner:origLink></item>
		<item>
		<title>Flash Player 9 Security Updates</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/UKjHRPdpE8U/</link>
		<comments>http://www.zorked.com/flash/flash-player-9-security-updates/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 19:54:03 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.zorked.com/uncategorized/flash-player-9-security-updates/</guid>
		<description><![CDATA[Ok, so we all know how much the Flash Player security model blows. So, because we weren&#8217;t in enough pain, Adobe is in the process of making the player even more strict (which is good) by giving you even more mundane tasks to complete if you ever want to do something totally crazy and out [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so we all know how much the Flash Player security model blows. So, because we weren&#8217;t in enough pain, Adobe is in the process of making the player even more strict (which is good) by giving you even more mundane tasks to complete if you ever want to do something totally crazy and out there like load SWFs from a subdomain.</p>
<p>You&#8217;ve probably already dealt with the crossdomain.xml file, but there are a few changes that you can make to it now, specifically to prohibit crossdomain spoofing if you allow file uploads. You can set the crossdomain file in the root of your folder to be the meta-mega-powerful-nothing-else-counts crossdomain file now.</p>
<p>The really great part about all of this is that regardless of how your set your crossdomain files, Flash Player will NEVER let you load a SWF from another domain and operate on it without the Security.allowDomain() set on the loaded SWF. It doesn&#8217;t matter if your crossdomain is as loose as a college cheerleader, or if you do the meta-crossdomain file, or set a crossdomain on both the loading and loaded domain. It doesn&#8217;t matter. The only way to get around this is to create a proxy SWF on the domain of the loaded site and pass in the URL that&#8217;s on the same domain as the proxy that you actually want to load.</p>
<p>More info on the <a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html">Flash Player 9 Security Updates.</a></p>
Similar Posts:<ul><li><a href="http://www.zorked.com/flash/new-flash-player-9-statistics/" rel="bookmark" title="April 22, 2007">New Flash Player 9 Statistics</a></li>

<li><a href="http://www.zorked.com/security/ie-mixed-content-secure-nonsecure-items/" rel="bookmark" title="April 17, 2008">IE Mixed Content &#8211; Page Contains Both Secure and Nonsecure Items</a></li>

<li><a href="http://www.zorked.com/flash/flex-swf-loads-twice/" rel="bookmark" title="December 15, 2008">Flex SWF Loads Twice</a></li>

<li><a href="http://www.zorked.com/flash/advanced-e4x-filters-in-as3/" rel="bookmark" title="September 25, 2008">Advanced E4X Filters in AS3</a></li>

<li><a href="http://www.zorked.com/best-practices/directory-auto-includes/" rel="bookmark" title="September 22, 2007">Directory Auto-Includes</a></li>
</ul><!-- Similar Posts took 10.050 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=UKjHRPdpE8U:T028o-82Qn8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=UKjHRPdpE8U:T028o-82Qn8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=UKjHRPdpE8U:T028o-82Qn8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=UKjHRPdpE8U:T028o-82Qn8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=UKjHRPdpE8U:T028o-82Qn8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=UKjHRPdpE8U:T028o-82Qn8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=UKjHRPdpE8U:T028o-82Qn8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=UKjHRPdpE8U:T028o-82Qn8:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/UKjHRPdpE8U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/flash/flash-player-9-security-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.zorked.com/flash/flash-player-9-security-updates/</feedburner:origLink></item>
		<item>
		<title>Stacking and Windowing in Flash</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/xbsiP3m4fuo/</link>
		<comments>http://www.zorked.com/flash/stacking-and-windowing-in-flash/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 08:04:22 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.zorked.com/uncategorized/stacking-and-windowing-in-flash/</guid>
		<description><![CDATA[There are a lot of problems with the transparent windowing mode (or wmode, as many are familiar with it) in the Flash browser plugin. It&#8217;s especially bad in Firefox&#8217;s implementation, as it will no longer dispatch Event.RENDER, which the CS3 component architecture is dependent on. Without a RENDER call, the components don&#8217;t show up, although [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of problems with the transparent windowing mode (or wmode, as many are familiar with it) in the Flash browser plugin. It&#8217;s especially bad in Firefox&#8217;s implementation, as it will no longer dispatch Event.RENDER, which the CS3 component architecture is dependent on. Without a RENDER call, the components don&#8217;t show up, although they will take text input. The only way you can tell that they&#8217;re alive is that they FocusRectangle will come up if you click on it.</p>
<p>Now, if you legitimately need the transparency of the windowing mode because you&#8217;re popping a huge purple gorilla over the normal page, you&#8217;re pretty much stuck, unless you want to hack the UIComponent class to use an ENTER_FRAME event instead (which did not work for me). However, most people are actually looking to be able to z-index the Flash movie, in which case you can just use the &#8220;opaque&#8221; attribute value instead of &#8220;transparent&#8221;.</p>
<p>Remember, this is a single param of the object, like <code>&lt;param name="wmode" value="opaque" /&gt;</code> instead of <code>&lt;param name="wmode" value="transparent" /&gt;</code></p>
<p>If you&#8217;re interested in what&#8217;s happening behind the scenes, here&#8217;s the deal: normally whenever a browser lets a plugin lay itself on the screen, it&#8217;s actually doing a managed window outside of the actual page that you&#8217;re browsing; in short, it&#8217;s not part of the actual layout. So, instead of being on the screen, it&#8217;s in a layer above everything else except for other plugins. When you scroll the page, the browser scrolls the plugin too. Normally, you don&#8217;t notice this because it&#8217;s pretty much instantaneous. The only time you notice is when you have a dropdown menu that always falls behind the plugin, for example.</p>
<p>When you put the wmode (window mode for short, remember) parameter on the object/plugin, it&#8217;s now telling the browser to interlay the plugin with the rest of the elements that are in the page. In fact, it actually is one of the elements of the page, and is now z-indexable.</p>
<p>One minor problem with this approach is that performance is slightly slower, regardless of whether you chose transparent or opaque mode (although transparent is even slower). Most users will not notice, but be aware of it if you&#8217;re doing timer and sound synced animations.</p>
Similar Posts:<ul><li><a href="http://www.zorked.com/flash/flash-and-navigatetourl-popup-blocking/" rel="bookmark" title="April 3, 2008">Popups Blocked in AS3 with navigateToURL()</a></li>

<li><a href="http://www.zorked.com/best-practices/directory-auto-includes/" rel="bookmark" title="September 22, 2007">Directory Auto-Includes</a></li>

<li><a href="http://www.zorked.com/html/html-snob-choose-the-right-doctype-not-all-the-hype/" rel="bookmark" title="April 12, 2007">HTML Snob: Choose The Right DOCTYPE, Not All The Hype</a></li>

<li><a href="http://www.zorked.com/flash/advanced-e4x-filters-in-as3/" rel="bookmark" title="September 25, 2008">Advanced E4X Filters in AS3</a></li>

<li><a href="http://www.zorked.com/software/cool-new-stuff-in-creative-suite-3/" rel="bookmark" title="May 2, 2007">Cool New Stuff in Creative Suite 3</a></li>
</ul><!-- Similar Posts took 11.008 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=xbsiP3m4fuo:BCDYZv2jfec:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=xbsiP3m4fuo:BCDYZv2jfec:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=xbsiP3m4fuo:BCDYZv2jfec:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=xbsiP3m4fuo:BCDYZv2jfec:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=xbsiP3m4fuo:BCDYZv2jfec:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=xbsiP3m4fuo:BCDYZv2jfec:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=xbsiP3m4fuo:BCDYZv2jfec:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=xbsiP3m4fuo:BCDYZv2jfec:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/xbsiP3m4fuo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/flash/stacking-and-windowing-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.zorked.com/flash/stacking-and-windowing-in-flash/</feedburner:origLink></item>
		<item>
		<title>E4X Attribute Filter Doesn’t Work In Switch Statements</title>
		<link>http://feedproxy.google.com/~r/zorked/~3/hkmUW68lVTA/</link>
		<comments>http://www.zorked.com/flash/e4x-attribute-filter-doesnt-work-in-switch-statements/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 21:09:38 +0000</pubDate>
		<dc:creator>jordan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[e4x]]></category>

		<guid isPermaLink="false">http://www.zorked.com/flash/e4x-attribute-filter-doesnt-work-in-switch-statements/</guid>
		<description><![CDATA[Here&#8217;s a nice gotcha I found a while back when trying to run a filter on some XML data. If you write an attribute filter inside of a switch statement, the query will return null when you assign it to the XMLList variable. If you trace out the query instead of assigning it, it works [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a nice gotcha I found a while back when trying to run a filter on some XML data. If you write an attribute filter inside of a switch statement, the query will return null when you assign it to the XMLList variable. If you trace out the query instead of assigning it, it works fine.</p>
<p><code><br />
switch (anything) {<br />
case "testcase":<br />
var xlData:XMLList = xmlData.Books.Book.(@author == 'Dickens');<br />
break;<br />
}</code></p>
<p>The above code will fail; apparently the scoping inside of switch statements is broken. There&#8217;s a <a href="http://bugs.adobe.com/jira/browse/ASC-2901">bug report filed already</a>, but it would be nice to see a fix for this.</p>
Similar Posts:<ul><li><a href="http://www.zorked.com/flash/advanced-e4x-filters-in-as3/" rel="bookmark" title="September 25, 2008">Advanced E4X Filters in AS3</a></li>

<li><a href="http://www.zorked.com/software/switched-to-wordpress/" rel="bookmark" title="January 26, 2008">Switched to Wordpress</a></li>

<li><a href="http://www.zorked.com/html/html-snob-choose-the-right-doctype-not-all-the-hype/" rel="bookmark" title="April 12, 2007">HTML Snob: Choose The Right DOCTYPE, Not All The Hype</a></li>

<li><a href="http://www.zorked.com/flash/new-flash-player-9-statistics/" rel="bookmark" title="April 22, 2007">New Flash Player 9 Statistics</a></li>

<li><a href="http://www.zorked.com/css/organize-your-css-organize-your-life/" rel="bookmark" title="November 15, 2007">Organize Your CSS, Organize Your Life</a></li>
</ul><!-- Similar Posts took 10.097 ms --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zorked?a=hkmUW68lVTA:jnRFrEvbvko:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zorked?i=hkmUW68lVTA:jnRFrEvbvko:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=hkmUW68lVTA:jnRFrEvbvko:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/zorked?i=hkmUW68lVTA:jnRFrEvbvko:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=hkmUW68lVTA:jnRFrEvbvko:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zorked?i=hkmUW68lVTA:jnRFrEvbvko:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zorked?a=hkmUW68lVTA:jnRFrEvbvko:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/zorked?i=hkmUW68lVTA:jnRFrEvbvko:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zorked/~4/hkmUW68lVTA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zorked.com/flash/e4x-attribute-filter-doesnt-work-in-switch-statements/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.zorked.com/flash/e4x-attribute-filter-doesnt-work-in-switch-statements/</feedburner:origLink></item>
	</channel>
</rss>
