<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>All I don&#039;t know &#187; ActionScript</title>
	<atom:link href="http://blog.derraab.com/category/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.derraab.com</link>
	<description>About Flash™, Flex™, software development and my computer. And JavaScript.</description>
	<lastBuildDate>Sat, 26 Nov 2011 18:31:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Removing comments in CSS, HTML and ECMAScript (JavaScript)</title>
		<link>http://blog.derraab.com/2011/11/26/removing-comments-in-css-html-and-ecmascript-javascript/</link>
		<comments>http://blog.derraab.com/2011/11/26/removing-comments-in-css-html-and-ecmascript-javascript/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 18:31:36 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=767</guid>
		<description><![CDATA[While working on an Adobe AIR based source code editor I was looking for an easy way to remove comments from different kind of source codes. What first seemed like an easy regular expression turned out to be much more &#8230; <a href="http://blog.derraab.com/2011/11/26/removing-comments-in-css-html-and-ecmascript-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While working on an Adobe AIR based source code editor I was looking for an easy way to remove comments from different kind of source codes. What first seemed like an easy regular expression turned out to be much more complex because comment pre- and suffixes can also occur in string literals or regular expressions and our old friend Internet Explorer allows <a href="http://en.wikipedia.org/wiki/Conditional_Comments" title="http://en.wikipedia.org/wiki/Conditional_Comments" target="_blank"><code>HTML</code> conditional comments and <code>JavaScript</code> conditional compilation</a>. Great.</p>
<p>First I had a look at <a href="http://developer.yahoo.com/yui/compressor/" title="http://developer.yahoo.com/yui/compressor/" target="_blank"><code>YUICompressor</code>s</a> source code and <a href="http://code.google.com/intl/en-EN/speed/page-speed/" title="http://code.google.com/intl/en-EN/speed/page-speed/" target="_blank">Google Page Speed</a> but then I decided to port a script for <a href="http://james.padolsey.com/javascript/removing-comments-in-javascript" title="http://james.padolsey.com/javascript/removing-comments-in-javascript" target="_blank">removing <code>JavaScript</code> comments created by James Padolsey</a>.</p>
<p>I just improved the recognition for regular expressions a little and since this code should work with all <code>ECMAScript</code> based source codes I named my class <code>ECMAScriptParser</code> instead of <code>JavaScriptParser</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package de.<span style="color: #006600;">superclass</span>.<span style="color: #006600;">parser</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">/**
     * @author Markus Raab (superclass.de | blog.derRaab.com)
     */</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ECMAScriptParser
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #808080; font-style: italic;">/**
         * Removes inline and block comments from an ECMAScript source string. 
         * 
         * This is a port of James Padolsey     with an slightly improved RegExp recognition.
         * @see: http://james.padolsey.com/javascript/removing-comments-in-javascript
         * 
         * @param ecmaScript        ECMAScript source string
         * @param removeCondComp    Optional (default=false) - Whether to remove Internet Explorers JavasScript conditional compilation comments or not.   
         * @return                    ECMAScript source string without comments
         */</span>
        <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> removeComments<span style="color: #66cc66;">&#40;</span> ecmaScript : <span style="color: #0066CC;">String</span>, removeCondComp : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">String</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> modeSingleQuote        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeDoubleQuote        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeRegExp            : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeBlockComment    : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeLineComment        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeCondComp        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>; 
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> vector : Vector.<span style="color: #66cc66;">&lt;</span>String<span style="color: #66cc66;">&gt;</span> = Vector.<span style="color: #66cc66;">&lt;</span>String<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'__'</span> + ecmaScript + <span style="color: #ff0000;">'__'</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">''</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
                vector.<span style="color: #006600;">fixed</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> c : <span style="color: #0066CC;">int</span> = vector.<span style="color: #0066CC;">length</span>;
&nbsp;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">string</span> : <span style="color: #0066CC;">String</span> = vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span>;
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeRegExp <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeRegExp = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeSingleQuote <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">&quot;'&quot;</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeSingleQuote = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeDoubleQuote <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'&quot;'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeDoubleQuote = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeBlockComment <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                        modeBlockComment = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeLineComment<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #0066CC;">string</span> = vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span>;
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #66cc66;">||</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\r</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeLineComment = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeCondComp <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'@'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeCondComp = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'&quot;'</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    modeDoubleQuote = <span style="color: #000000; font-weight: bold;">true</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">&quot;'&quot;</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    modeSingleQuote = <span style="color: #000000; font-weight: bold;">true</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span> removeCondComp <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'@'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeCondComp = <span style="color: #000000; font-weight: bold;">true</span>;
                        <span style="color: #b1b100;">continue</span>;
                    <span style="color: #66cc66;">&#125;</span>
&nbsp;
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
&nbsp;
                        modeBlockComment = <span style="color: #000000; font-weight: bold;">true</span>;
                        <span style="color: #b1b100;">continue</span>;
                    <span style="color: #66cc66;">&#125;</span>
&nbsp;
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                        modeLineComment = <span style="color: #000000; font-weight: bold;">true</span>;
                        <span style="color: #b1b100;">continue</span>;
                    <span style="color: #66cc66;">&#125;</span>
&nbsp;
                    <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> k : <span style="color: #0066CC;">int</span> = i - <span style="color: #cc66cc;">1</span>; <span style="color: #000000; font-weight: bold;">true</span>; k-- <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        <span style="color: #0066CC;">string</span> = vector<span style="color: #66cc66;">&#91;</span> k <span style="color: #66cc66;">&#93;</span>;
                        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">&#41;</span>
                        <span style="color: #66cc66;">&#123;</span>
                            <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'='</span> <span style="color: #66cc66;">&#41;</span>
                            <span style="color: #66cc66;">&#123;</span>
                                modeRegExp = <span style="color: #000000; font-weight: bold;">true</span>;
                            <span style="color: #66cc66;">&#125;</span>
                            <span style="color: #b1b100;">break</span>;
                        <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #66cc66;">&#125;</span>
                <span style="color: #66cc66;">&#125;</span>
            <span style="color: #66cc66;">&#125;</span>
            <span style="color: #b1b100;">return</span> vector.<span style="color: #0066CC;">join</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">''</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">slice</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">2</span>, -<span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Allright &#8211; CSS doesn&#8217;t allow inline or conditional comments so I removed this script functionality and created a <code>CSSParser</code> class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package de.<span style="color: #006600;">superclass</span>.<span style="color: #006600;">parser</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">/**
     * @author Markus Raab (superclass.de | blog.derRaab.com)
     */</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CSSParser
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #808080; font-style: italic;">/**
         * Removes comments from a CSS string. 
         * 
         * This is a shrinked port of James Padolseys script.
         * @see: http://james.padolsey.com/javascript/removing-comments-in-javascript
         * 
         * @param css                CSS string
         * @return                    CSS string without comments
         */</span>
        <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> removeComments<span style="color: #66cc66;">&#40;</span> css : <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">String</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> modeSingleQuote        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeDoubleQuote        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeBlockComment    : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> vector : Vector.<span style="color: #66cc66;">&lt;</span>String<span style="color: #66cc66;">&gt;</span> = Vector.<span style="color: #66cc66;">&lt;</span>String<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'__'</span> + css + <span style="color: #ff0000;">'__'</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">''</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
                vector.<span style="color: #006600;">fixed</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> c : <span style="color: #0066CC;">int</span> = vector.<span style="color: #0066CC;">length</span>;
&nbsp;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">string</span> : <span style="color: #0066CC;">String</span> = vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span>;
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeSingleQuote <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">&quot;'&quot;</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeSingleQuote = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeDoubleQuote <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'&quot;'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeDoubleQuote = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeBlockComment <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                        modeBlockComment = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'&quot;'</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    modeDoubleQuote = <span style="color: #000000; font-weight: bold;">true</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">&quot;'&quot;</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    modeSingleQuote = <span style="color: #000000; font-weight: bold;">true</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
&nbsp;
                        modeBlockComment = <span style="color: #000000; font-weight: bold;">true</span>;
                        <span style="color: #b1b100;">continue</span>;
                    <span style="color: #66cc66;">&#125;</span>
                <span style="color: #66cc66;">&#125;</span>
            <span style="color: #66cc66;">&#125;</span>
            <span style="color: #b1b100;">return</span> vector.<span style="color: #0066CC;">join</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">''</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">slice</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">2</span>, -<span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Good. Lastly I extended the code to remove all comments within <code>HTML</code> source code, which can also contain <code>JavaScript</code> and of course <code>CSS</code>. This is the <code>HTMLParser</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package de.<span style="color: #006600;">superclass</span>.<span style="color: #006600;">parser</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">/**
     * @author Markus Raab (superclass.de | blog.derRaab.com)
     */</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> HTMLParser
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #808080; font-style: italic;">/**
         * Removes all HTML, CSS and ECMAScript comments from a HTML string.
         * 
         * This is an extended port of James Padolseys script with an improved RegExp recognition.
         * @see: http://james.padolsey.com/javascript/removing-comments-in-javascript
         * 
         * @param html                        HTML string
         * @param removeHTMLCondComment        Optional (default=false) - Whether to remove Internet Explorers HTML conditional comments or not.
         * @param removeJSCondComp            Optional (default=false) - Whether to remove Internet Explorers JavasScript conditional compilation comments or not.
         * @return                            HTML string without comments
         */</span>
        <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> removeComments<span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">html</span> : <span style="color: #0066CC;">String</span>, removeHTMLCondComment : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>, removeJSCondComp : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">String</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> modeSingleQuote        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeDoubleQuote        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeRegExp            : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeBlockComment    : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeLineComment        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> modeJSCondComp        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> modeHTMLComment        : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
            <span style="color: #000000; font-weight: bold;">var</span> modeHTMLCondComment    : <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> vector : Vector.<span style="color: #66cc66;">&lt;</span>String<span style="color: #66cc66;">&gt;</span> = Vector.<span style="color: #66cc66;">&lt;</span>String<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'__'</span> + <span style="color: #0066CC;">html</span> + <span style="color: #ff0000;">'__'</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">''</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
                vector.<span style="color: #006600;">fixed</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> c : <span style="color: #0066CC;">int</span> = vector.<span style="color: #0066CC;">length</span>;
&nbsp;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">string</span> : <span style="color: #0066CC;">String</span> = vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span>;
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeRegExp <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeRegExp = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeSingleQuote <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">&quot;'&quot;</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeSingleQuote = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeDoubleQuote <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'&quot;'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\\</span>'</span><span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeDoubleQuote = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeBlockComment <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'/'</span><span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                        modeBlockComment = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeLineComment<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #0066CC;">string</span> = vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span>;
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #66cc66;">||</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\r</span>'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeLineComment = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeJSCondComp <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'@'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&amp;&amp;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeJSCondComp = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeHTMLComment <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #808080; font-style: italic;">// --&gt; </span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'-'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'-'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'&gt;'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                        vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
&nbsp;
                        modeHTMLComment = <span style="color: #000000; font-weight: bold;">false</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> modeHTMLCondComment <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'i'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'f'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">']'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'-'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'-'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">5</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'&gt;'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">// if]--&gt; </span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeHTMLCondComment = <span style="color: #000000; font-weight: bold;">false</span>;
                        i += <span style="color: #cc66cc;">5</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'&lt;'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'!'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'-'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'-'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">// &lt;!--</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span> removeHTMLCondComment <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'['</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">5</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'i'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">6</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'f'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">// &lt;!--[if</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeHTMLCondComment = <span style="color: #000000; font-weight: bold;">true</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">else</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                        modeHTMLComment = <span style="color: #000000; font-weight: bold;">true</span>;
                    <span style="color: #66cc66;">&#125;</span>
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'&quot;'</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    modeDoubleQuote = <span style="color: #000000; font-weight: bold;">true</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">&quot;'&quot;</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    modeSingleQuote = <span style="color: #000000; font-weight: bold;">true</span>;
                    <span style="color: #b1b100;">continue</span>;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span> removeJSCondComp <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&amp;&amp;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'@'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        modeJSCondComp = <span style="color: #000000; font-weight: bold;">true</span>;
                        <span style="color: #b1b100;">continue</span>;
                    <span style="color: #66cc66;">&#125;</span>
&nbsp;
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'*'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
&nbsp;
                        modeBlockComment = <span style="color: #000000; font-weight: bold;">true</span>;
                        <span style="color: #b1b100;">continue</span>;
                    <span style="color: #66cc66;">&#125;</span>
&nbsp;
                    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> vector<span style="color: #66cc66;">&#91;</span> i + <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> === <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">''</span>;
                        modeLineComment = <span style="color: #000000; font-weight: bold;">true</span>;
                        <span style="color: #b1b100;">continue</span>;
                    <span style="color: #66cc66;">&#125;</span>
&nbsp;
                    <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> k : <span style="color: #0066CC;">int</span> = i - <span style="color: #cc66cc;">1</span>; <span style="color: #000000; font-weight: bold;">true</span>; k-- <span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        <span style="color: #0066CC;">string</span> = vector<span style="color: #66cc66;">&#91;</span> k <span style="color: #66cc66;">&#93;</span>;
                        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> <span style="color: #66cc66;">!</span>== <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">&#41;</span>
                        <span style="color: #66cc66;">&#123;</span>
                            <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">string</span> === <span style="color: #ff0000;">'='</span> <span style="color: #66cc66;">&#41;</span>
                            <span style="color: #66cc66;">&#123;</span>
                                modeRegExp = <span style="color: #000000; font-weight: bold;">true</span>;
                            <span style="color: #66cc66;">&#125;</span>
                            <span style="color: #b1b100;">break</span>;
                        <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #66cc66;">&#125;</span>
                <span style="color: #66cc66;">&#125;</span>
            <span style="color: #66cc66;">&#125;</span>
            <span style="color: #b1b100;">return</span> vector.<span style="color: #0066CC;">join</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">''</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">slice</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">2</span>, -<span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Let me know if I made a mistake but it seems to work quite well. Or do you know a good library that already does this kind of optimizations?</p>
<p>Well, that&#8217;s it for now. Have fun coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2011/11/26/removing-comments-in-css-html-and-ecmascript-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linked List Performance Test using Getter or Interface</title>
		<link>http://blog.derraab.com/2011/04/21/linked-list-performance-test-using-getter-or-interface/</link>
		<comments>http://blog.derraab.com/2011/04/21/linked-list-performance-test-using-getter-or-interface/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 13:30:52 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=596</guid>
		<description><![CDATA[Another test regarding linked lists. Since I heavily use interfaces within the frameworks I&#8217;m working on I tried to define interfaces for my linked list items. I would love to use an abstract interface but with the full linked list &#8230; <a href="http://blog.derraab.com/2011/04/21/linked-list-performance-test-using-getter-or-interface/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another test regarding linked lists. Since I heavily use interfaces within the frameworks I&#8217;m working on I tried to define interfaces for my linked list items. I would love to use an abstract interface but with the full linked list speed. Seems not possible. If you create an interface you need to use at least one getter function which kills performance.</p>
<p>I compared execution time using this code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #0066CC;">getTimer</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
    <span style="color: #0066CC;">public</span> final <span style="color: #000000; font-weight: bold;">class</span> LinkedListPerformanceCheck <span style="color: #0066CC;">extends</span> Sprite
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _firstItemWithPublicVar : ItemWithPublicVar;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _firstFinalItemWithPublicVar : FinalItemWithPublicVar;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _firstItemWithGetter : ItemWithGetter;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _firstFinalItemWithGetter : FinalItemWithGetter;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _firstIItemWithGetter : IItemWithGetter;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _firstIFinalItemWithGetter : IFinalItemWithGetter;
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _c : <span style="color: #0066CC;">int</span>;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _i : <span style="color: #0066CC;">int</span>;
&nbsp;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> LinkedListPerformanceCheck<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
            loaderInfo.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span>, run <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> run<span style="color: #66cc66;">&#40;</span> event : Event <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            _c = <span style="color: #cc66cc;">5000000</span>;
            _i = <span style="color: #cc66cc;">0</span>;
            addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, <span style="color: #0066CC;">onEnterFrame</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onEnterFrame</span><span style="color: #66cc66;">&#40;</span> event : Event <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">switch</span><span style="color: #66cc66;">&#40;</span> _i++ <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">0</span> : createItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1</span> : createFinalItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2</span> : createItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">3</span> : createFinalItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">4</span> : createImplementedIItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">5</span> : createImplementedIFinalItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">6</span> : <span style="color: #b1b100;">break</span>; <span style="color: #808080; font-style: italic;">// wait</span>
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">7</span> : <span style="color: #b1b100;">break</span>; <span style="color: #808080; font-style: italic;">// wait</span>
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">8</span> : <span style="color: #b1b100;">break</span>; <span style="color: #808080; font-style: italic;">// wait</span>
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">9</span> : <span style="color: #b1b100;">break</span>; <span style="color: #808080; font-style: italic;">// wait</span>
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">10</span> : runItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">11</span> : runFinalItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">12</span> : runItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">13</span> : runFinalItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">14</span> : runImplementedIItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">15</span> : runImplementedIFinalItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>;
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">16</span> : runItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>; <span style="color: #808080; font-style: italic;">// again - just to make sure...</span>
                <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">17</span> : runFinalItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #b1b100;">break</span>; <span style="color: #808080; font-style: italic;">// again - just to make sure...</span>
                <span style="color: #000000; font-weight: bold;">default</span>: removeEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, <span style="color: #0066CC;">onEnterFrame</span> <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : ItemWithPublicVar = _firstItemWithPublicVar = <span style="color: #000000; font-weight: bold;">new</span> ItemWithPublicVar<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> _c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span> = <span style="color: #000000; font-weight: bold;">new</span> ItemWithPublicVar<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> runItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : ItemWithPublicVar = _firstItemWithPublicVar;
            <span style="color: #000000; font-weight: bold;">var</span> startTime : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> item <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span>; <span style="color: #66cc66;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">duration</span> : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;LinkedListPerformanceCheck.runItemWithPublicVarTest( &quot;</span> +<span style="color: #0066CC;">duration</span> + <span style="color: #ff0000;">&quot; )&quot;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createFinalItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : FinalItemWithPublicVar = _firstFinalItemWithPublicVar = <span style="color: #000000; font-weight: bold;">new</span> FinalItemWithPublicVar<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> _c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span> = <span style="color: #000000; font-weight: bold;">new</span> FinalItemWithPublicVar<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> runFinalItemWithPublicVarTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : FinalItemWithPublicVar = _firstFinalItemWithPublicVar;
            <span style="color: #000000; font-weight: bold;">var</span> startTime : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> item <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span>; <span style="color: #66cc66;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">duration</span> : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;LinkedListPerformanceCheck.runFinalItemWithPublicVarTest( &quot;</span> +<span style="color: #0066CC;">duration</span> + <span style="color: #ff0000;">&quot; )&quot;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : ItemWithGetter = _firstItemWithGetter = <span style="color: #000000; font-weight: bold;">new</span> ItemWithGetter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> _c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span> = <span style="color: #000000; font-weight: bold;">new</span> ItemWithGetter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> runItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : ItemWithGetter = _firstItemWithGetter;
            <span style="color: #000000; font-weight: bold;">var</span> startTime : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> item <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span>; <span style="color: #66cc66;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">duration</span> : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;LinkedListPerformanceCheck.runItemWithGetterTest( &quot;</span> +<span style="color: #0066CC;">duration</span> + <span style="color: #ff0000;">&quot; )&quot;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createFinalItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : FinalItemWithGetter = _firstFinalItemWithGetter = <span style="color: #000000; font-weight: bold;">new</span> FinalItemWithGetter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> _c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span> = <span style="color: #000000; font-weight: bold;">new</span> FinalItemWithGetter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> runFinalItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : FinalItemWithGetter = _firstFinalItemWithGetter;
            <span style="color: #000000; font-weight: bold;">var</span> startTime : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> item <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span>; <span style="color: #66cc66;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">duration</span> : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;LinkedListPerformanceCheck.runFinalItemWithGetterTest( &quot;</span> +<span style="color: #0066CC;">duration</span> + <span style="color: #ff0000;">&quot; )&quot;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createImplementedIItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : IItemWithGetter = _firstIItemWithGetter = <span style="color: #000000; font-weight: bold;">new</span> ImplementedIItemWithGetter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> _c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span> = <span style="color: #000000; font-weight: bold;">new</span> ImplementedIItemWithGetter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> runImplementedIItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : IItemWithGetter = _firstIItemWithGetter;
            <span style="color: #000000; font-weight: bold;">var</span> startTime : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> item <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span>; <span style="color: #66cc66;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">duration</span> : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;LinkedListPerformanceCheck.runImplementedIItemWithGetterTest( &quot;</span> +<span style="color: #0066CC;">duration</span> + <span style="color: #ff0000;">&quot; )&quot;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createImplementedIFinalItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : IFinalItemWithGetter = _firstIFinalItemWithGetter = <span style="color: #000000; font-weight: bold;">new</span> ImplementedIFinalItemWithGetter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> _c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span> = <span style="color: #000000; font-weight: bold;">new</span> ImplementedIFinalItemWithGetter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> runImplementedIFinalItemWithGetterTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> item : IFinalItemWithGetter = _firstIFinalItemWithGetter;
            <span style="color: #000000; font-weight: bold;">var</span> startTime : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> item <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span> item = item.<span style="color: #006600;">next</span>; <span style="color: #66cc66;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">duration</span> : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;LinkedListPerformanceCheck.runImplementedIFinalItemWithGetterTest( &quot;</span> +<span style="color: #0066CC;">duration</span> + <span style="color: #ff0000;">&quot; )&quot;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> ItemWithPublicVar <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> next : ItemWithPublicVar; <span style="color: #66cc66;">&#125;</span>
&nbsp;
final <span style="color: #000000; font-weight: bold;">class</span> FinalItemWithPublicVar <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> next : FinalItemWithPublicVar; <span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> ItemWithGetter
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _next : ItemWithGetter;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> next<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : ItemWithGetter <span style="color: #66cc66;">&#123;</span> <span style="color: #b1b100;">return</span> _next; <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> next<span style="color: #66cc66;">&#40;</span> value : ItemWithGetter <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> _next = value; <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
final <span style="color: #000000; font-weight: bold;">class</span> FinalItemWithGetter
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _next : FinalItemWithGetter;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> next<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : FinalItemWithGetter <span style="color: #66cc66;">&#123;</span> <span style="color: #b1b100;">return</span> _next; <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> next<span style="color: #66cc66;">&#40;</span> value : FinalItemWithGetter <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> _next = value; <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">interface</span> IItemWithGetter
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> next<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : IItemWithGetter;
    <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> next<span style="color: #66cc66;">&#40;</span> value : IItemWithGetter <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> ImplementedIItemWithGetter <span style="color: #0066CC;">implements</span> IItemWithGetter
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _next : IItemWithGetter;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> next<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : IItemWithGetter <span style="color: #66cc66;">&#123;</span> <span style="color: #b1b100;">return</span> _next; <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> next<span style="color: #66cc66;">&#40;</span> value : IItemWithGetter <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> _next = value; <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">interface</span> IFinalItemWithGetter
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> next<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : IFinalItemWithGetter;
    <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> next<span style="color: #66cc66;">&#40;</span> value : IFinalItemWithGetter <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
final <span style="color: #000000; font-weight: bold;">class</span> ImplementedIFinalItemWithGetter <span style="color: #0066CC;">implements</span> IFinalItemWithGetter
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _next : IFinalItemWithGetter;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> next<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : IFinalItemWithGetter <span style="color: #66cc66;">&#123;</span> <span style="color: #b1b100;">return</span> _next; <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> next<span style="color: #66cc66;">&#40;</span> value : IFinalItemWithGetter <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> _next = value; <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Result:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">LinkedListPerformanceCheck.<span style="color: #006600;">runItemWithPublicVarTest</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">86</span> <span style="color: #66cc66;">&#41;</span>
LinkedListPerformanceCheck.<span style="color: #006600;">runFinalItemWithPublicVarTest</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">88</span> <span style="color: #66cc66;">&#41;</span>
LinkedListPerformanceCheck.<span style="color: #006600;">runItemWithGetterTest</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">1247</span> <span style="color: #66cc66;">&#41;</span>
LinkedListPerformanceCheck.<span style="color: #006600;">runFinalItemWithGetterTest</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">1148</span> <span style="color: #66cc66;">&#41;</span>
LinkedListPerformanceCheck.<span style="color: #006600;">runImplementedIItemWithGetterTest</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">1161</span> <span style="color: #66cc66;">&#41;</span>
LinkedListPerformanceCheck.<span style="color: #006600;">runImplementedIFinalItemWithGetterTest</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">1160</span> <span style="color: #66cc66;">&#41;</span>
LinkedListPerformanceCheck.<span style="color: #006600;">runItemWithPublicVarTest</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">64</span> <span style="color: #66cc66;">&#41;</span>
LinkedListPerformanceCheck.<span style="color: #006600;">runFinalItemWithPublicVarTest</span><span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">62</span> <span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Using public variables instead of getter functions is much faster. To make sure memory allocation doesn&#8217;t kill performance I repeated the public variables test at the end. Even faster.</p>
<p>Is there a way to define Interfaces for public variables?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2011/04/21/linked-list-performance-test-using-getter-or-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FFK11 &#8211; beyond tellerrand notes</title>
		<link>http://blog.derraab.com/2011/04/08/ffk11-beyond-tellerrand-notes/</link>
		<comments>http://blog.derraab.com/2011/04/08/ffk11-beyond-tellerrand-notes/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 22:03:46 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash on iOS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[iPhone / iPad]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=578</guid>
		<description><![CDATA[I&#8217;m still not sure if &#8220;beyond tellerrand&#8221; is a subtitle or will become the new brand for the one and only Flashforum conference here in germany. Sascha Wolter and Marc Thiele did a great job as always and even I &#8230; <a href="http://blog.derraab.com/2011/04/08/ffk11-beyond-tellerrand-notes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still not sure if &#8220;<a href="http://ffk11.beyondtellerrand.com/">beyond tellerrand</a>&#8221; is a subtitle or will become the new brand for the one and only <a href="http://www.flashforum.de/">Flashforum</a> conference here in germany. <a href="http://www.wolter.biz/">Sascha Wolter</a> and <a href="http://www.marcthiele.com/">Marc Thiele</a> did a great job as always and even I never went to another conference, FFK seems still to be a special one. Again I was lucky listening to some really cool stuff.</p>
<p>Interestingly most of my <a href="http://blog.derraab.com/2010/04/20/ffk10-flashforum-conference-notes/">last year notes</a> are still up to date, which doesn&#8217;t help if you don&#8217;t keep them in mind. So I think it&#8217;s a good idea to read my own notes from time to time. <img src='http://blog.derraab.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>That&#8217;s what I became aware of this time:</p>
<p><strong>AIR 2.6</strong></p>
<ul>
<li>Lee Brimelow mentioned AIR 2.6 on iOS is faster than on Android!  Yeah.</li>
<li>Adobe is working hard on increasing performance near to native code.</li>
<li>Installing a runtime seems to be annoying for Android users, so Adobe is thinking about compiling for Android like for iOS. Which might bring some extra performance as well.</li>
<li>I asked Lee Brimelow about A<strong>IR on Windows Phone 7</strong> and he said something like &#8220;Adobe is currently not working on that and it would be a lot of work&#8221;. Well, of course Microsoft is not interested having AIR on their system, but it would be a really important platform for all of us. So in my opinion Adobe at least has a small team checking out what&#8217;s possible. What do you think about Windows Phone 7 and AIR support?</li>
</ul>
<p><strong>Flex Builder 4.5</strong></p>
<ul>
<lI>You can get Flex SDK 4.5 already, but there&#8217;s also a way to join the private pre-release program to get early access to Flex Builder 4.5. Just visit <a href="http://www.surveymonkey.com/s/flexprerelease">http://www.surveymonkey.com/s/flexprerelease</a>. They are working on some useful stuff and it might be a good idea to test some of the new features.</li>
<li>Deepa Supramaniam mentioned spark MXML skins have performance issues on mobile devices. That&#8217;s why they created pure ActionScript spark skins for mobile applications. Hopefully, within the private beta Flex SDKs, we&#8217;ll find some great improvements: <a href="http://www.riagora.com/2011/03/preview-of-flex-on-ios/">http://www.riagora.com/2011/03/preview-of-flex-on-ios/</a>.</li>
</ul>
<p><strong>NUI</strong></p>
<ul>
<li><a href="https://www.xing.com/profile/Wolfgang_Henseler">Wolfgang Henseler</a> (<a href="http://vimeo.com/18400281">Talk I missed at FFK10</a>)  opened my mind according <a href="http://en.wikipedia.org/wiki/Natural_user_interface">NUI</a>.</li>
<li>Don&#8217;t think of apps on mobile devices but of services allowing you reaching your goal faster than a website.</li>
<li>Think about providing services, combining them, rethinking them.</li>
<li>Use less design and let objects provide their functionalities (e.g. tap on image to get some options).</li>
<li>My brain is very busy with that NUI thing. E. g. he mentioned the <a href="http://siri.com/">Siri</a> iPhone app. It&#8217;s not about how it looks like (not so cool) but how it works! Combining lots of possibilities with a really easy interface (speech) . He was also talking about &#8220;in body technology&#8221; (sensors and stuff like that.) and <a href="http://www.tedmed.com/">http://www.tedmed.com/</a></li>
<li>After Dennis Ippels Kinect (<a href="http://openkinect.org">OpenKinect</a> / <a href="http://www.primesense.com/">http://www.primesense.com/</a>) introduction I finally know something about the magic behind this device as well.</li>
</ul>
<p><strong>Molehill</strong></p>
<ul>
<li><a href="http://tinyurl.com/molehilldemos">http://tinyurl.com/molehilldemos</a>. What can I say. Molehill performance is stunning (for the web).</li>
<li>And keep in mind that you need to set <code>wmode="direct"</code> within your HTML settings! Otherwise you won&#8217;t get hardware acceleration.</li>
<li>Molehill itself is way to low level for most of us. So we&#8217;ll use 3D frameworks as we did before.</li>
<li><a href="http://away3d.com/">Away 3D </a>currently seems to be the weapon of choice.</li>
<li><a href="http://www.derschmale.com/">David Lenaerts</a> gave us some real insights. Thanks, man!</li>
<li>And if you&#8217;re using FDT you should check out: <a href="http://blog.powerflasher.de/macht-euer-fdt-molehill-ready/">http://blog.powerflasher.de/macht-euer-fdt-molehill-ready/</a> (german).</li>
</ul>
<p><strong>Additional useful links:</strong></p>
<ul>
<li><a href="http://www.appannie.com/">http://www.appannie.com/</a></li>
<li><a href="http://flixel.org/">http://flixel.org/</a></li>
<li><a href="http://pushbuttonengine.com/">http://pushbuttonengine.com/</a> (like last year!;)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2011/04/08/ffk11-beyond-tellerrand-notes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SWF meta tag</title>
		<link>http://blog.derraab.com/2011/04/04/swf-meta-tag/</link>
		<comments>http://blog.derraab.com/2011/04/04/swf-meta-tag/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 15:00:39 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=549</guid>
		<description><![CDATA[I&#8217;m always searching for it so here is a useful blogpost. As the latest FDT version ( Beta 4 ) does not set compiler arguments concerning SWF-size, framerate etc. by default I started using SWF-Metatags to specify these settings. I&#8217;m &#8230; <a href="http://blog.derraab.com/2011/04/04/swf-meta-tag/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m always searching for it so <a href="http://www.beautifycode.com/swf-compile-meta-tags">here is a useful blogpost</a>.</p>
<blockquote><p>As the latest FDT version ( Beta 4 ) does not set compiler arguments concerning SWF-size, framerate etc. by default I started using SWF-Metatags to specify these settings.</p>
<p>I&#8217;m talking of these things:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;910&quot;</span>, <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;610&quot;</span>, <span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span>, frameRate=<span style="color: #ff0000;">&quot;40&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span></pre></div></div>

<p>Just set this tag above your class opening in the one you&#8217;re going to compile. Here is a complete list of (useful) arguments you can pass in:</p>
<p>width<br />
widthPercent<br />
height<br />
heightPercent<br />
scriptTimeLimit<br />
frameRate<br />
backgroundColor</p>
<p>So basically this is the fastest way to set up common compile-arguments to your project. By the way there is no Flex-Framework required &#8211; these tags also work in pure AS3 projects.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2011/04/04/swf-meta-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Date.time vs. Date.setTime() getTime() performance</title>
		<link>http://blog.derraab.com/2011/03/24/date-time-vs-date-settime-gettime-performance/</link>
		<comments>http://blog.derraab.com/2011/03/24/date-time-vs-date-settime-gettime-performance/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 14:14:17 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=540</guid>
		<description><![CDATA[Using Date.setTime() and Date.getTime() is faster than Date.time. My quick speed test to determine the fastest way to get and set time values on Date objects: var date : Date = new Date&#40;&#41;; var max : Number = date.time; &#160; &#8230; <a href="http://blog.derraab.com/2011/03/24/date-time-vs-date-settime-gettime-performance/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Using <code>Date.setTime()</code> and <code>Date.getTime()</code> is faster than <code>Date.time</code>.</p>
<p>My quick speed test to determine the fastest way to get and set time values on Date objects:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">date</span> : <span style="color: #0066CC;">Date</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Date</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">max</span> : <span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">date</span>.<span style="color: #0066CC;">time</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">start</span> : <span style="color: #0066CC;">int</span>;
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">end</span> : <span style="color: #0066CC;">int</span>;
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">time</span> : <span style="color: #0066CC;">Number</span>;
<span style="color: #000000; font-weight: bold;">var</span> times : Vector.<span style="color: #66cc66;">&lt;</span>Number<span style="color: #66cc66;">&gt;</span> = <span style="color: #000000; font-weight: bold;">new</span> Vector.<span style="color: #66cc66;">&lt;</span>Number<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; 
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> c : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">1000000</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> times.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">max</span> <span style="color: #66cc66;">*</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">start</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> i = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">date</span>.<span style="color: #0066CC;">time</span> = times<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span>; <span style="color: #66cc66;">&#125;</span>;
<span style="color: #0066CC;">end</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;date.time = times[ i ];&quot;</span>, <span style="color: #0066CC;">end</span> - <span style="color: #0066CC;">start</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">start</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> i = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">date</span>.<span style="color: #0066CC;">setTime</span><span style="color: #66cc66;">&#40;</span> times<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>;
<span style="color: #0066CC;">end</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;date.setTime( times[ i ] );&quot;</span>, <span style="color: #0066CC;">end</span> - <span style="color: #0066CC;">start</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">start</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> i = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">time</span> = <span style="color: #0066CC;">date</span>.<span style="color: #0066CC;">time</span>; <span style="color: #66cc66;">&#125;</span>;
<span style="color: #0066CC;">end</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;time = date.time;&quot;</span>, <span style="color: #0066CC;">end</span> - <span style="color: #0066CC;">start</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">start</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> i = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">time</span> = <span style="color: #0066CC;">date</span>.<span style="color: #0066CC;">getTime</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #66cc66;">&#125;</span>;
<span style="color: #0066CC;">end</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;time = date.getTime();&quot;</span>, <span style="color: #0066CC;">end</span> - <span style="color: #0066CC;">start</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// Result:</span>
<span style="color: #808080; font-style: italic;">//</span>
<span style="color: #808080; font-style: italic;">// date.time = times[ i ];        381</span>
<span style="color: #808080; font-style: italic;">// date.setTime( times[ i ] );    270</span>
<span style="color: #808080; font-style: italic;">// time = date.time;            184</span>
<span style="color: #808080; font-style: italic;">// time = date.getTime();        65</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2011/03/24/date-time-vs-date-settime-gettime-performance/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Linked List Performance Test</title>
		<link>http://blog.derraab.com/2010/09/22/linked-list-performance-test/</link>
		<comments>http://blog.derraab.com/2010/09/22/linked-list-performance-test/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 17:11:56 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=410</guid>
		<description><![CDATA[I was thinking about not creating linked lists for every data type I use but using one abstract data structure containing my specific data types. So I wrote this short performance check: package de.superclass &#123; import flash.display.Sprite; import flash.events.Event; import &#8230; <a href="http://blog.derraab.com/2010/09/22/linked-list-performance-test/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was thinking about not creating linked lists for every data type I use but using one abstract data structure containing my specific data types.</p>
<p>So I wrote this short performance check:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package de.<span style="color: #006600;">superclass</span> 
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #0066CC;">getTimer</span>;
&nbsp;
    <span style="color: #0066CC;">public</span> final <span style="color: #000000; font-weight: bold;">class</span> LinkedListTest <span style="color: #0066CC;">extends</span> Sprite 
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _abstractItemLinkedList : AbstractItem;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _dataItemLinkedList : DataItem;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _vector : Vector.<span style="color: #66cc66;">&lt;</span>DataItem<span style="color: #66cc66;">&gt;</span>;
&nbsp;
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> LinkedListTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
            loaderInfo.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span>, onLoaderInfoComplete <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onLoaderInfoComplete<span style="color: #66cc66;">&#40;</span> event : Event <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> 
        <span style="color: #66cc66;">&#123;</span>
            createData<span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> timer : Timer = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">3000</span>, <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;
                timer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> TimerEvent.<span style="color: #006600;">TIMER_COMPLETE</span>, onTimerComplete <span style="color: #66cc66;">&#41;</span>;
                timer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onTimerComplete<span style="color: #66cc66;">&#40;</span>event : TimerEvent<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> 
        <span style="color: #66cc66;">&#123;</span>
            runTest<span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> 
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> vector : Vector.<span style="color: #66cc66;">&lt;</span>DataItem<span style="color: #66cc66;">&gt;</span> = _vector = <span style="color: #000000; font-weight: bold;">new</span> Vector.<span style="color: #66cc66;">&lt;</span>DataItem<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">5000000</span>; i++ <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">var</span> dataItem : DataItem = <span style="color: #000000; font-weight: bold;">new</span> DataItem<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                    dataItem.<span style="color: #0066CC;">index</span> = i;
&nbsp;
                vector.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span> dataItem <span style="color: #66cc66;">&#41;</span>;
&nbsp;
                <span style="color: #000000; font-weight: bold;">var</span> abstractItem : AbstractItem = <span style="color: #000000; font-weight: bold;">new</span> AbstractItem<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                    abstractItem.<span style="color: #0066CC;">data</span> = dataItem;
&nbsp;
                <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> i == <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    _dataItemLinkedList = dataItem;
                    _abstractItemLinkedList = abstractItem;
                <span style="color: #66cc66;">&#125;</span>
                <span style="color: #b1b100;">else</span>
                <span style="color: #66cc66;">&#123;</span>
                    previousDataItem.<span style="color: #006600;">next</span> = dataItem;
                    previousAbstractItem.<span style="color: #006600;">next</span> = abstractItem;
                <span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">var</span> previousDataItem : DataItem = dataItem;
                <span style="color: #000000; font-weight: bold;">var</span> previousAbstractItem : AbstractItem = abstractItem;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> runTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> 
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> dataItem : DataItem;
            <span style="color: #000000; font-weight: bold;">var</span> startTime : <span style="color: #0066CC;">int</span>;
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> vector : Vector.<span style="color: #66cc66;">&lt;</span>DataItem<span style="color: #66cc66;">&gt;</span> = _vector;
            <span style="color: #000000; font-weight: bold;">var</span> c : <span style="color: #0066CC;">int</span> = vector.<span style="color: #0066CC;">length</span>;
&nbsp;
            startTime = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> c; i++ <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                dataItem = vector<span style="color: #66cc66;">&#91;</span> i <span style="color: #66cc66;">&#93;</span>;
                dataItem.<span style="color: #0066CC;">index</span> = dataItem.<span style="color: #0066CC;">index</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> durationVector : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
&nbsp;
            startTime = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            dataItem = _dataItemLinkedList;
            <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span> dataItem <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                dataItem.<span style="color: #0066CC;">index</span> = dataItem.<span style="color: #0066CC;">index</span>;
                dataItem = dataItem.<span style="color: #006600;">next</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> durationDataItemLinkedList : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
&nbsp;
            startTime = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #000000; font-weight: bold;">var</span> abstractItem : AbstractItem = _abstractItemLinkedList;
            <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span> abstractItem <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                dataItem = abstractItem.<span style="color: #0066CC;">data</span>;
                dataItem.<span style="color: #0066CC;">index</span> = dataItem.<span style="color: #0066CC;">index</span>;
                abstractItem = abstractItem.<span style="color: #006600;">next</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> durationAbstractItemLinkedList : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
&nbsp;
            startTime = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;
            abstractItem = _abstractItemLinkedList;
            <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span> abstractItem <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                dataItem = DataItem<span style="color: #66cc66;">&#40;</span> abstractItem.<span style="color: #0066CC;">data</span> <span style="color: #66cc66;">&#41;</span>;
                dataItem.<span style="color: #0066CC;">index</span> = dataItem.<span style="color: #0066CC;">index</span>;
                abstractItem = abstractItem.<span style="color: #006600;">next</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> durationAbstractItemLinkedListWithCast : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
&nbsp;
            startTime = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span>;
            abstractItem = _abstractItemLinkedList;
            <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span> abstractItem <span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#123;</span>
                dataItem = abstractItem.<span style="color: #0066CC;">data</span> as DataItem;
                dataItem.<span style="color: #0066CC;">index</span> = dataItem.<span style="color: #0066CC;">index</span>;
                abstractItem = abstractItem.<span style="color: #006600;">next</span>;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">var</span> durationAbstractItemLinkedListWithAs : <span style="color: #0066CC;">int</span> = <span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - startTime;
&nbsp;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;Durations:&quot;</span> <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;Vector&quot;</span>, durationVector <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;DataItem LinkedList&quot;</span>, durationDataItemLinkedList <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;AbstractItem LinkedList&quot;</span>, durationAbstractItemLinkedList <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;AbstractItemLinkedList Using Cast&quot;</span>, durationAbstractItemLinkedListWithCast <span style="color: #66cc66;">&#41;</span>;
            <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;AbstractItemLinkedList Using As&quot;</span>, durationAbstractItemLinkedListWithAs <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> AbstractItem
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">data</span> : <span style="color: #66cc66;">*</span>;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> next : AbstractItem;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> DataItem
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">index</span> : <span style="color: #0066CC;">int</span>;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> next : DataItem;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Results on my MacBook Pro i7:</p>
<pre>Durations:
Vector 91
DataItem LinkedList 53
AbstractItem LinkedList 76
AbstractItemLinkedList Using Cast 108
AbstractItemLinkedList Using As 121</pre>
<p><strong>Alsways use explicit implemented linked lists!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/09/22/linked-list-performance-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone / iPad ActionScript Guide quotes</title>
		<link>http://blog.derraab.com/2010/09/17/iphone-ipad-actionscript-guide-quotes/</link>
		<comments>http://blog.derraab.com/2010/09/17/iphone-ipad-actionscript-guide-quotes/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 22:04:48 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[iPhone / iPad]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=371</guid>
		<description><![CDATA[As I mentioned here I strongly recommend to read Adobe&#8217;s Building ADOBE® AIR® Applications with the Packager for iPhone® guide or Flash Platform for iPhone. Just some ActionScript facts: ActionScript APIs unsupported on mobile devices ActionScript APIs specific to mobile &#8230; <a href="http://blog.derraab.com/2010/09/17/iphone-ipad-actionscript-guide-quotes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As I mentioned <a href="http://blog.derraab.com/2010/09/17/iphone-ipad-development-guide-quotes">here</a> I strongly recommend to read Adobe&#8217;s <a href="http://download.macromedia.com/pub/labs/packagerforiphone/packagerforiphone_devguide.pdf">Building ADOBE® AIR® Applications with the Packager for iPhone®</a> guide or <a href="http://help.adobe.com/en_US/as3/iphone/index.html">Flash Platform for iPhone</a>.</p>
<p>Just some ActionScript facts:</p>
<p><a href="http://help.adobe.com/en_US/as3/iphone/WS789ea67d3e73a8b24b55b57a124b32b5b57-7fff.html">ActionScript APIs unsupported on mobile devices</a><br />
<a href="http://help.adobe.com/en_US/as3/iphone/WS789ea67d3e73a8b24b55b57a124b32b5b57-7ffe.html">ActionScript APIs specific to mobile AIR applications</a><br />
<a href="http://help.adobe.com/en_US/as3/iphone/WS789ea67d3e73a8b24b55b57a124b32b5b57-7ffd.html">ActionScript APIs of special interest to mobile application developers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/09/17/iphone-ipad-actionscript-guide-quotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source Media Framework 1.0</title>
		<link>http://blog.derraab.com/2010/05/28/open-source-media-framework-1-0/</link>
		<comments>http://blog.derraab.com/2010/05/28/open-source-media-framework-1-0/#comments</comments>
		<pubDate>Fri, 28 May 2010 12:30:19 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash in Browser]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Librarys]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=289</guid>
		<description><![CDATA[Adobe recently released OSMF version 1.0! Again just some links: OSMF Blog &#8211; Announcing OSMF 1.0! Source ZIP Release Notes PDF ASDocs ZIP]]></description>
			<content:encoded><![CDATA[<p>Adobe recently released OSMF version 1.0! Again just some links:</p>
<p><a href="http://blogs.adobe.com/osmf/2010/05/announcing_osmf_10.html">OSMF Blog &#8211; Announcing OSMF 1.0!</a><br />
<a href="http://download.macromedia.com/pub/opensource/osmf/osmf_source_v1-0.zip">Source ZIP</a><br />
<a href="http://opensource.adobe.com/wiki/download/attachments/34373765/ReleaseNotesv1.0.pdf?version=2">Release Notes PDF</a><br />
<a href="http://download.macromedia.com/pub/opensource/osmf/osmf_asdocs_v1-0.zip">ASDocs ZIP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/05/28/open-source-media-framework-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Performance Visualizer</title>
		<link>http://blog.derraab.com/2010/05/26/flash-performance-visualizer/</link>
		<comments>http://blog.derraab.com/2010/05/26/flash-performance-visualizer/#comments</comments>
		<pubDate>Wed, 26 May 2010 17:43:48 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash in Browser]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=283</guid>
		<description><![CDATA[Mr.doop&#8217;s Hi-ReS! Stats is a must have for every ActionScript developer. Seems to be still no. 1! And I don&#8217;t want to search again&#8230; So here just the links: Mr.doop&#8217;s blog &#124; Hi-ReS! Stats Mr.doop&#8217;s Stats.as @ GitHub Update &#8211; &#8230; <a href="http://blog.derraab.com/2010/05/26/flash-performance-visualizer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Mr.doop&#8217;s Hi-ReS! Stats is a must have for every ActionScript developer. Seems to be still no. 1!<br />
And I don&#8217;t want to search again&#8230; So here just the links:</p>
<p><a href="http://mrdoob.com/blog/post/582">Mr.doop&#8217;s blog | Hi-ReS! Stats</a><br />
<strike><a href="http://github.com/mrdoob/Hi-ReS-Stats">Mr.doop&#8217;s Stats.as @ GitHub</a></strike></p>
<p>Update &#8211; Most recent version I found:<br />
<a href="http://code.google.com/p/mrdoob/source/browse/trunk/libs/net/hires/debug/Stats.as">http://code.google.com/p/mrdoob/source/browse/trunk/libs/net/hires/debug/Stats.as</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/05/26/flash-performance-visualizer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Undocumented XMLUtil class in Adobe Flash CS5?</title>
		<link>http://blog.derraab.com/2010/05/18/undocumented-xmlutil-class-in-adobe-flash-cs5/</link>
		<comments>http://blog.derraab.com/2010/05/18/undocumented-xmlutil-class-in-adobe-flash-cs5/#comments</comments>
		<pubDate>Tue, 18 May 2010 09:39:14 +0000</pubDate>
		<dc:creator>derRaab</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash in Browser]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://blog.derraab.com/?p=273</guid>
		<description><![CDATA[I tried to recompile an older Flash CS 4 project with Flash CS 5 but got this compile time error 1061: Call to a possibly undefined method reuseNodes through a reference with static type Class caused by the usage of &#8230; <a href="http://blog.derraab.com/2010/05/18/undocumented-xmlutil-class-in-adobe-flash-cs5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I tried to recompile an older Flash CS 4 project with Flash CS 5 but got this compile time error <code>1061: Call to a possibly undefined method reuseNodes through a reference with static type Class</code> caused by the usage of one of my utility classes:</p>
<p><strong>This didn&#8217;t work</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> de.<span style="color: #006600;">superclass</span>.<span style="color: #006600;">util</span>.<span style="color: #006600;">XMLUtil</span>;
...
<span style="color: #006600;">XMLUtil</span>.<span style="color: #006600;">someMethod</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><strong>This still works</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">...<span style="color: #006600;">de</span>.<span style="color: #006600;">superclass</span>.<span style="color: #006600;">util</span>.<span style="color: #006600;">XMLUtil</span>.<span style="color: #006600;">someMethod</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>So there was no error in my class because it&#8217;s still usable when I use the full class package but it didn&#8217;t work when I just import it with the import statement.</p>
<p>After some research I found an undocumented <code>XMLUtil</code> class which avoids the correct access to my <code>de.superclass.util.XMLUtil</code> class.</p>
<p>This class doesn&#8217;t exist in Flash CS 4 but is available in Flash CS 5. Simply create a new FLA in Flash CS 5 an run this code on timeline</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> describeType<span style="color: #66cc66;">&#40;</span> XMLUtil <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>and you&#8217;ll get this result:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;XMLUtil&quot;</span> <span style="color: #000066;">base</span>=<span style="color: #ff0000;">&quot;Class&quot;</span> <span style="color: #000066;">isDynamic</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">isFinal</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">isStatic</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;extendsClass</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Class&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;extendsClass</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Object&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrYMin&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrXMax&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrYMax&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrObj0&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrObj1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrX0&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrY0&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrX1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagGravity&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrY1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagCollideSpace&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrType&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagRigidBody&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrPin&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagRect&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrSlider&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagJoint&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrLength&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagSpring&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrStrength&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagFrames&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrDamping&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagFrame&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrSimSpeed&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagFluid&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrAxis&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagEmitter&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrAsset&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagOrigin&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrSpring&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagKeyframes&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrSpringStrength&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagKey&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrSpringDamping&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagView&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;variable</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kTagGeom&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrIndex&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrCollideType&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrCellSize&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrSpringValue&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrCollideSpace&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrRowDimen&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrDensity&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrColDimen&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrPosX&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrTimeStep&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrPosY&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrTime&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrAngle&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrColor&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrVelX&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrStrokeColor&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrVelY&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrAlpha&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrVelA&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrFPS&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrCOR&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrSprings&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrCOF&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrLimits&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrFixed&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrMinAngle&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrID&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrDBlend&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrPoseStrength&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrPoseDamping&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrBodyDamping&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrX&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrY&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;constant</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;kAttrXMin&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;accessor</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;prototype&quot;</span> <span style="color: #000066;">access</span>=<span style="color: #ff0000;">&quot;readonly&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000066;">declaredBy</span>=<span style="color: #ff0000;">&quot;Class&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;method</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;nodeHasAttribute&quot;</span> <span style="color: #000066;">declaredBy</span>=<span style="color: #ff0000;">&quot;XMLUtil&quot;</span> <span style="color: #000066;">returnType</span>=<span style="color: #ff0000;">&quot;Boolean&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;XML&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/method<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;method</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;getIntAttribute&quot;</span> <span style="color: #000066;">declaredBy</span>=<span style="color: #ff0000;">&quot;XMLUtil&quot;</span> <span style="color: #000066;">returnType</span>=<span style="color: #ff0000;">&quot;int&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;XML&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;int&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/method<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;method</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;getNumberAttribute&quot;</span> <span style="color: #000066;">declaredBy</span>=<span style="color: #ff0000;">&quot;XMLUtil&quot;</span> <span style="color: #000066;">returnType</span>=<span style="color: #ff0000;">&quot;Number&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;XML&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Number&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/method<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;method</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;getBoolAttribute&quot;</span> <span style="color: #000066;">declaredBy</span>=<span style="color: #ff0000;">&quot;XMLUtil&quot;</span> <span style="color: #000066;">returnType</span>=<span style="color: #ff0000;">&quot;Boolean&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;XML&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Boolean&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/method<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;method</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;getStringAttribute&quot;</span> <span style="color: #000066;">declaredBy</span>=<span style="color: #ff0000;">&quot;XMLUtil&quot;</span> <span style="color: #000066;">returnType</span>=<span style="color: #ff0000;">&quot;String&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;XML&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parameter</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">&quot;3&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;String&quot;</span> <span style="color: #000066;">optional</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/method<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;factory</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;XMLUtil&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;extendsClass</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Object&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/factory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>So I had to rename my class to <code>de.superclass.util.XMLUtil<b>s</b></code>.</p>
<p><b>You might run into the same problems when using <code>mx.utils.XMLUtil</code> (Flex Framework) or <code>com.adobe.utils.XMLUtil</code> (AS3CoreLib) but I didn&#8217;t test it!</b></p>
<p><strong>UPDATE:</strong><br />
I found <code>XMLUtil</code> classes in<br />
<em>Adobe Flash CS5/Common/Configuration/ActionScript 3.0/libs/ik.swc</em> and<br />
<em>Adobe Flash CS5/Common/Configuration/ActionScript 3.0/libs/PffLib.swc</em></p>
<p><b>Removing the <em>$(AppConfig)/ActionScript 3.0/libs</em> directory within the ActionScript export settings avoids the problem. But I have no time to test if this directory is necessary. If you run into problems please leave me a comment!</b></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.derraab.com/2010/05/18/undocumented-xmlutil-class-in-adobe-flash-cs5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

