<?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"
	>

<channel>
	<title>FLEX{er}</title>
	<atom:link href="http://www.flexer.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexer.info</link>
	<description>flex developers web corner</description>
	<pubDate>Tue, 08 Jul 2008 14:56:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
	<image>
  <link>http://www.flexer.info</link>
  <url>http://www.flexer.info/fxr.ico</url>
  <title>FLEX{er}</title>
</image>
		<item>
		<title>Flash Player 10 Beta 2 Released</title>
		<link>http://www.flexer.info/2008/07/04/flash-player-10-beta-2-released/</link>
		<comments>http://www.flexer.info/2008/07/04/flash-player-10-beta-2-released/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 12:24:18 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[Flash Player]]></category>

		<category><![CDATA[Flex news]]></category>

		<category><![CDATA[astro]]></category>

		<category><![CDATA[beta]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=222</guid>
		<description><![CDATA[Astro is getting closer to a release. A new beta version is out and you can read the announcement on Adobe&#8217;s site: http://labs.adobe.com/technologies/flashplayer10/. Please read also the release notes here: http://labs.adobe.com/technologies/flashplayer10/releasenotes.html.
What is new? To be short&#8230;

Fullscreen Keyboard Access - now you can catch key events for non-printing keys (arrows, shift, enter, tab, space, etc)
Enhanced Audio [...]]]></description>
			<content:encoded><![CDATA[<p>Astro is getting closer to a release. A new beta version is out and you can read the announcement on Adobe&#8217;s site: <a href="http://labs.adobe.com/technologies/flashplayer10/" onclick="javascript:pageTracker._trackPageview('/outbound/article/labs.adobe.com');" target="_blank">http://labs.adobe.com/technologies/flashplayer10/</a>. Please read also the release notes here: <a href="http://labs.adobe.com/technologies/flashplayer10/releasenotes.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/labs.adobe.com');" target="_blank">http://labs.adobe.com/technologies/flashplayer10/releasenotes.html</a>.</p>
<p>What is new? To be short&#8230;</p>
<ul class="ul">
<li><strong>Fullscreen Keyboard Access</strong> - now you can catch key events for non-printing keys (arrows, shift, enter, tab, space, etc)</li>
<li><strong>Enhanced Audio APIs</strong><?li>
<li><strong>Linux WMODE</strong> - windowless mode for Linux</li>
<li><strong>File Reference runtime access</strong> - let users load files into RIAs</li>
<li><strong>Dynamic Sound Generation</strong></li>
<li><strong>Large Bitmap Support</strong> - up to 16,777,216 pixels (4096 by 4096)</li>
<li><strong>Context Menu</strong> - more control available</li>
<li><strong>Last character set compliant</strong> - GB18030</li>
<li><strong>Ubuntu support</strong></li>
<li><strong>Video4Linux v2 Support (V4L2)</strong></li>
<li><strong>unloadAndStop</strong> - better garbage collection for SWF - see <a href="http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.gskinner.com');" target="_blank">Grant Skinner&#8217;s article</a></li>
</ul>
<p>This info was taken from the release notes but shortened. </p>
<p>If you want to install it please read in <a href="http://labs.adobe.com/technologies/flashplayer10/releasenotes.html#install" onclick="javascript:pageTracker._trackPageview('/outbound/article/labs.adobe.com');" target="_blank">release notes</a> how to do that. Also take a look at <a href="http://labs.adobe.com/technologies/flashplayer10/releasenotes.html#known" onclick="javascript:pageTracker._trackPageview('/outbound/article/labs.adobe.com');" target="_blank">Known Issues</a> and <a href="http://labs.adobe.com/technologies/flashplayer10/releasenotes.html#fixed" onclick="javascript:pageTracker._trackPageview('/outbound/article/labs.adobe.com');" target="_blank">Fixed Issues</a>.</p>
<p>Now&#8230; we wait for more info and examples&#8230; and for the next beta realease of Flash Player 10.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/07/04/flash-player-10-beta-2-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How To Get an Adobe Certification</title>
		<link>http://www.flexer.info/2008/07/03/how-to-get-an-adobe-certification/</link>
		<comments>http://www.flexer.info/2008/07/03/how-to-get-an-adobe-certification/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 03:20:22 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[How to]]></category>

		<category><![CDATA[adobe]]></category>

		<category><![CDATA[certification]]></category>

		<category><![CDATA[exam]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=221</guid>
		<description><![CDATA[Some times ago I started to get interested to get an Adobe Certification. I started reading documents on Adobe&#8217;s website and started to ask people at Adobe and community people that already got some certifications. This is what I found&#8230;
Available Certifications
There are 3 (three) types of certifications:

per product certification: Adobe Certified Expert and Adobe Certified [...]]]></description>
			<content:encoded><![CDATA[<p>Some times ago I started to get interested to get an Adobe Certification. I started reading documents on Adobe&#8217;s website and started to ask people at Adobe and community people that already got some certifications. This is what I found&#8230;</p>
<h2>Available Certifications</h2>
<p>There are 3 (three) types of certifications:</p>
<ul class="ul">
<li>per product certification: <strong>Adobe Certified Expert</strong> and <strong>Adobe Certified Professional</strong></li>
<li>specialist certification: <strong>Adobe Certified Specialist</strong></li>
<li>instructor certification: <strong>Adobe Certified Instructor</strong></li>
</ul>
<p>I found out that Adobe Certified Expert is the same with Adobe Certified Professional (the older Macromedia Certified Professional) the main difference being that ACE is released by Adobe after they acquired Macromedia, but ACP (MCP) is from the old Macromedia released before the acquisition.</p>
<p>From <a href="http://partners.adobe.com/public/en/ace/ACE_Exam_Guide_Flex2.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/partners.adobe.com');" target="_blank">this document</a>, page 3, you can see that for Specialist (Master) certification you can choose from these tree certifications: <strong>Print Specialist</strong>, <strong>Web Specialist</strong> and <strong>Video Specialist</strong>.</p>
<h2>About Exams</h2>
<p>Exams can be taken at <a href="http://www.pearsonvue.com/adobe/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.pearsonvue.com');" target="_blank">Pearson Vue</a> or <a href="http://www.prometric.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.prometric.com');" target="_blank">Prometric</a> and each one of them consists of 60 to 90 questions with multiple choices having maximum 2 hours to complete it.</p>
<p>The results will be communicated right after the exam.</p>
<p>The price for one exam is 150 USD or 135 EUR.</p>
<h2>Curriculum</h2>
<p><a href="http://partners.adobe.com/public/ace/main.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/partners.adobe.com');" target="_blank">Here</a> you can see exams and the documents with what is needed to learn before taking an exam.</p>
<p>You can study for your exams using:</p>
<ul class="ul">
<li>the help from the application</li>
<li>any book about the product</li>
<li>getting trained at a certified training center</li>
<li>online at ElemenK - <a href="http://adobe.elementk.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/adobe.elementk.com');" target="_blank">adobe.elementk.com</a></li>
<li>videos and tutorials from <a href="http://www.totaltraining.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.totaltraining.com');" target="_blank">Total Training</a></li>
<li>any other way - specialized blogs, forums, user groups</li>
<li>meeting with fellows that use the same product as you</li>
</ul>
<h2>What is missing</h2>
<p>The greatest missing is the <strong>practice test books</strong> - books with questions to practice the exam. And if we think about Flex to few books and resources&#8230; but this will grow in time as flex framework will evolve.</p>
<h2>More info and links</h2>
<p><a href="http://www.adobe.com/support/certification/ace.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');" target="_blank">http://www.adobe.com/support/certification/ace.html</a><br />
<a href="http://partners.adobe.com/public/ace/main.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/partners.adobe.com');" target="_blank">http://partners.adobe.com/public/ace/main.html</a><br />
<a href="http://www.pearsonvue.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.pearsonvue.com');" target="_blank">http://www.pearsonvue.com</a><br />
<a href="http://www.prometric.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.prometric.com');" target="_blank">http://www.prometric.com</a><br />
<a href="http://myadobe.ro/2008/07/01/cum-obtin-o-certificare-adobe/" onclick="javascript:pageTracker._trackPageview('/outbound/article/myadobe.ro');" target="_blank">http://myadobe.ro/2008/07/01/cum-obtin-o-certificare-adobe/</a> (in Romanian)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/07/03/how-to-get-an-adobe-certification/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flex 4 Codename Gumbo Under Development</title>
		<link>http://www.flexer.info/2008/07/02/flex-4-codename-gumbo-under-development/</link>
		<comments>http://www.flexer.info/2008/07/02/flex-4-codename-gumbo-under-development/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 08:02:13 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[Flex news]]></category>

		<category><![CDATA[flex]]></category>

		<category><![CDATA[flex 4]]></category>

		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=219</guid>
		<description><![CDATA[The Flex 3 is already released but the guys at Adobe don&#8217;t waste their time. They already started to work on Flex 4 - codename Gumbo. The final release is planned for 2009 and the first beta for late 2008.
The promises are:

easy skinning
improved states, effects and layout
backward compatibility
inline states

For more see these links:
http://opensource.adobe.com/wiki/display/flexsdk/Flex+4
http://opensource.adobe.com/wiki/display/flexsdk/Enhanced+States+Syntax
]]></description>
			<content:encoded><![CDATA[<p>The Flex 3 is already released but the guys at Adobe don&#8217;t waste their time. They already started to work on Flex 4 - codename Gumbo. The final release is planned for 2009 and the first beta for late 2008.</p>
<p>The promises are:</p>
<ul class="ul">
<li>easy skinning</li>
<li>improved states, effects and layout</li>
<li>backward compatibility</li>
<li>inline states</li>
</ul>
<p>For more see these links:<br />
<a href="http://opensource.adobe.com/wiki/display/flexsdk/Flex+4" onclick="javascript:pageTracker._trackPageview('/outbound/article/opensource.adobe.com');" target="_blank">http://opensource.adobe.com/wiki/display/flexsdk/Flex+4</a><br />
<a href="http://opensource.adobe.com/wiki/display/flexsdk/Enhanced+States+Syntax" onclick="javascript:pageTracker._trackPageview('/outbound/article/opensource.adobe.com');" target="_blank">http://opensource.adobe.com/wiki/display/flexsdk/Enhanced+States+Syntax</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/07/02/flex-4-codename-gumbo-under-development/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google And Yahoo! Are Indexing SWF Files</title>
		<link>http://www.flexer.info/2008/07/01/google-and-yahoo-are-indexing-swf-files/</link>
		<comments>http://www.flexer.info/2008/07/01/google-and-yahoo-are-indexing-swf-files/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 10:40:36 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Flash Player]]></category>

		<category><![CDATA[Flex news]]></category>

		<category><![CDATA[RIA]]></category>

		<category><![CDATA[SEO]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[indexing]]></category>

		<category><![CDATA[search]]></category>

		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=220</guid>
		<description><![CDATA[This is a great news! I&#8217;ve been waiting for this to happen for a long time. If you don&#8217;t believe me that Google is indexing flash try to search on Google by this kind of phrases: &#8220;flex filetype:swf&#8220;; and you&#8217;ll get a list of SWF files that were indexed by Google.
How does Google do this? [...]]]></description>
			<content:encoded><![CDATA[<p>This is a great news! I&#8217;ve been waiting for this to happen for a long time. If you don&#8217;t believe me that Google is indexing flash try to search on Google by this kind of phrases: &#8220;<strong>flex filetype:swf</strong>&#8220;; and you&#8217;ll get a list of SWF files that were indexed by Google.</p>
<p>How does Google do this? They explained that they are scanning the SWF file the same way an user explores it, so they are looking for:</p>
<ul class="ul">
<li>text - is indexed</li>
<li>external files like xml, txt, etc - are indexed</li>
<li>button, links, event, etc which are the way to navigate in the SWF file - are also indexed</li>
</ul>
<p>This new &#8220;<em>player</em>&#8221; takes the text together with its context (the way it got there, etc) and is indexing it. Images and FLV file are not indexed.</p>
<p>Now that flash is starting to be indexed we will see an explosion of new sites that will use flash technology because this searchability was the big stop for flash to expand. Also SEO services for flash will appear and with every step flash will be equal to the old HTML.</p>
<p>Regarding Flex technology&#8230;</p>
<blockquote><p><b>Will Adobe Flex applications now be more easily found by Google search, including those that access remote data?</b></p>
<p>Yes, any type of SWF content including Adobe Flex applications and SWF created by Adobe Flash authoring will benefit from improved indexing and search results. The improved SWF search also includes the capability to load and access remote data like XML calls and loaded SWFs.</p></blockquote>
<p>&#8230;this is a quote from <a href="http://www.adobe.com/devnet/flashplayer/articles/swf_searchability.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');" target="_blank">Adobe&#8217;s anouncement</a>.</p>
<p>Why now and not earlier? We don&#8217;t really know but it may be because recently they published the <a href="http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v9.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');" target="_blank">SWF file format specification</a> for Flash Player 9.</p>
<p>Interesting is that Microsoft is not in this partnership, maybe because they have their own technology which is direct competitor to flash - and I&#8217;m talking about Silverlight.</p>
<p>From official Google Webmaster Central we have this <a href="http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/googlewebmastercentral.blogspot.com');" target="_blank">http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html</a> and please read also the comments&#8230; you&#8217;ll find interesting things.</p>
<p>Official announcements:<br />
<a href="http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/googlewebmastercentral.blogspot.com');" target="_blank">http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html</a><br />
<a href="http://www.adobe.com/devnet/flashplayer/articles/swf_searchability.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');" target="_blank">http://www.adobe.com/devnet/flashplayer/articles/swf_searchability.html</a> </p>
<p>Other articles:<br />
<a href="http://blog.digitalbackcountry.com/?p=1470" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.digitalbackcountry.com');" target="_blank">http://blog.digitalbackcountry.com/?p=1470</a><br />
<a href="http://blog.digitalbackcountry.com/?p=1471" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.digitalbackcountry.com');" target="_blank">http://blog.digitalbackcountry.com/?p=1471</a><br />
<a href="http://www.jonnymac.com/blog/2008/06/30/adobe-announces-swf-searchability/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.jonnymac.com');" target="_blank">http://www.jonnymac.com/blog/2008/06/30/adobe-announces-swf-searchability/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/07/01/google-and-yahoo-are-indexing-swf-files/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MatrixGrid Component - Extending The DataGrid</title>
		<link>http://www.flexer.info/2008/06/30/matrixgrid-component-extending-the-datagrid/</link>
		<comments>http://www.flexer.info/2008/06/30/matrixgrid-component-extending-the-datagrid/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 10:49:53 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[ActionScript]]></category>

		<category><![CDATA[Components]]></category>

		<category><![CDATA[Events]]></category>

		<category><![CDATA[MXML]]></category>

		<category><![CDATA[Skin]]></category>

		<category><![CDATA[combo]]></category>

		<category><![CDATA[component]]></category>

		<category><![CDATA[datagrid]]></category>

		<category><![CDATA[event]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=217</guid>
		<description><![CDATA[MatrixGrid is a complex component I made that displays a bi-dimensional array and gives the possibility to change its values using combo boxes. These are the changes you can do:

change one single item

change one row at once
change one column at once

The MatrixGrid component receives for objects:

array with the possible values in each combo box 
the [...]]]></description>
			<content:encoded><![CDATA[<link rel='stylesheet' href='http://www.flexer.info/?wpv-css=wpv-display&post_id=217' title='wpv-display-css' type='text/css'><script type='text/javascript' src='http://www.flexer.info/?wpv-js=wpv-display&post_id=217'></script><div style='margin-bottom: 20px'><p><strong>MatrixGrid</strong> is a complex component I made that displays a bi-dimensional array and gives the possibility to change its values using combo boxes. These are the changes you can do:</p>
<ul class="ul">
<li>change one single item
<li>
<li>change one row at once</li>
<li>change one column at once</li>
</ul>
<p>The <strong>MatrixGrid</strong> component receives for objects:</p>
<ul class="ul">
<li>array with the possible values in each combo box </li>
<li>the top header array with (id, name) pairs</li>
<li>the left header array also with (id, name) pairs</li>
<li>the array to be displayed</li>
</ul>
<p>In our application we will have an XML structure that will be transformed to our needed matrix object because we want to be able to test with different structures but keep in mind that the values will be find if there is a correlation between the matrix and the other three objects (the ids must be found).<br />

<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2008/06/matrixgridapp.swf"
			width="520"
			height="745">
	<param name="movie" value="/wp-content/uploads/2008/06/matrixgridapp.swf" />
</object><br />
<strong>MatrixGrid</strong> component is complex and involves a lot of files so it will not be displayed here but everybody will be able to download it. </p>
<p>Now the application that uses the <strong>MatrixGrid</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
</pre></td><td class="code"><pre class="actionscript"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:Application xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> 
    layout=<span style="color: #ff0000;">&quot;absolute&quot;</span> xmlns:flexer=<span style="color: #ff0000;">&quot;com.flexer.MatrixGrid.*&quot;</span>
    creationComplete=<span style="color: #ff0000;">&quot;start()&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;520&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;745&quot;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:TextArea x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;200&quot;</span> id=<span style="color: #ff0000;">&quot;indata&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>mx:text<span style="color: #66cc66;">&gt;</span>
            <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&lt;</span>matrix<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid1&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid2&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid3&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;</span>b<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid4&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;</span>b<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid5&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;</span>b<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid6&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;</span>b<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid7&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;</span>b<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid8&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;</span>b<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>row id=<span style="color: #ff0000;">&quot;lid9&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid1&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid2&quot;</span><span style="color: #66cc66;">&gt;</span>b<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid3&quot;</span><span style="color: #66cc66;">&gt;</span>c<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid4&quot;</span><span style="color: #66cc66;">&gt;</span>d<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid5&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid6&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>column id=<span style="color: #ff0000;">&quot;cid7&quot;</span><span style="color: #66cc66;">&gt;</span>q1<span style="color: #66cc66;">&lt;/</span>column<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>row<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>matrix<span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;/</span>mx:text<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx:TextArea<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:<span style="color: #0066CC;">Button</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> y=<span style="color: #ff0000;">&quot;218&quot;</span> label=<span style="color: #ff0000;">&quot;SetData&quot;</span>
        click=<span style="color: #ff0000;">&quot;handleSetClick(event)&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>flexer:MatrixGrid id=<span style="color: #ff0000;">&quot;mdg&quot;</span>
        <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;250&quot;</span> x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;248&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:<span style="color: #0066CC;">Button</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> y=<span style="color: #ff0000;">&quot;506&quot;</span> label=<span style="color: #ff0000;">&quot;GetData&quot;</span>
        click=<span style="color: #ff0000;">&quot;handleGetClick(event)&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:TextArea id=<span style="color: #ff0000;">&quot;debug&quot;</span> x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;536&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;200&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ObjectUtil</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">flexer</span>.<span style="color: #006600;">Debug</span>;
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">charts</span>.<span style="color: #006600;">chartClasses</span>.<span style="color: #006600;">DualStyleObject</span>;
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> xml2Matrix<span style="color: #66cc66;">&#40;</span>x:<span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Object</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">var</span> retObj:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> item:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> x.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #000000; font-weight: bold;">var</span> rowName:<span style="color: #0066CC;">String</span> = item.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;id&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                    retObj<span style="color: #66cc66;">&#91;</span>rowName<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                    <span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> item2:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> item.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        <span style="color: #000000; font-weight: bold;">var</span> colName:<span style="color: #0066CC;">String</span> = item2.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;id&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                        retObj<span style="color: #66cc66;">&#91;</span>rowName<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>colName<span style="color: #66cc66;">&#93;</span> = item2.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                    <span style="color: #66cc66;">&#125;</span>
                <span style="color: #66cc66;">&#125;</span>
                <span style="color: #b1b100;">return</span> retObj;
            <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;">start</span><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: #808080; font-style: italic;">// our matrix</span>
                <span style="color: #808080; font-style: italic;">// every item is defined by coordinates </span>
                <span style="color: #808080; font-style: italic;">// like this: (rowId, colId)</span>
                <span style="color: #000000; font-weight: bold;">var</span> testdata:<span style="color: #0066CC;">Object</span> = xml2Matrix<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span>indata.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// the left header</span>
                <span style="color: #808080; font-style: italic;">// contains pairs of: (rowName, rowId)</span>
                <span style="color: #000000; font-weight: bold;">var</span> leftHeader:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #ff0000;">&quot;lid1&quot;</span>:<span style="color: #ff0000;">&quot;row1&quot;</span>,
                    <span style="color: #ff0000;">&quot;lid2&quot;</span>:<span style="color: #ff0000;">&quot;row3&quot;</span>,
                    <span style="color: #ff0000;">&quot;lid3&quot;</span>:<span style="color: #ff0000;">&quot;row3&quot;</span>,
                    <span style="color: #ff0000;">&quot;lid4&quot;</span>:<span style="color: #ff0000;">&quot;row3&quot;</span>,
                    <span style="color: #ff0000;">&quot;lid5&quot;</span>:<span style="color: #ff0000;">&quot;row3&quot;</span>,
                    <span style="color: #ff0000;">&quot;lid6&quot;</span>:<span style="color: #ff0000;">&quot;row6&quot;</span>,
                    <span style="color: #ff0000;">&quot;lid7&quot;</span>:<span style="color: #ff0000;">&quot;row7&quot;</span>,
                    <span style="color: #ff0000;">&quot;lid8&quot;</span>:<span style="color: #ff0000;">&quot;row8&quot;</span>,
                    <span style="color: #ff0000;">&quot;lid9&quot;</span>:<span style="color: #ff0000;">&quot;row9&quot;</span>
                <span style="color: #66cc66;">&#125;</span>;
                <span style="color: #808080; font-style: italic;">// the top header </span>
                <span style="color: #808080; font-style: italic;">// contains pairs of: (columnName, columnId)</span>
                <span style="color: #000000; font-weight: bold;">var</span> topHeader:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #ff0000;">&quot;cid1&quot;</span>:<span style="color: #ff0000;">&quot;col1&quot;</span>,
                    <span style="color: #ff0000;">&quot;cid2&quot;</span>:<span style="color: #ff0000;">&quot;col1&quot;</span>,
                    <span style="color: #ff0000;">&quot;cid3&quot;</span>:<span style="color: #ff0000;">&quot;col1&quot;</span>,
                    <span style="color: #ff0000;">&quot;cid4&quot;</span>:<span style="color: #ff0000;">&quot;col4&quot;</span>,
                    <span style="color: #ff0000;">&quot;cid5&quot;</span>:<span style="color: #ff0000;">&quot;col5&quot;</span>,
                    <span style="color: #ff0000;">&quot;cid6&quot;</span>:<span style="color: #ff0000;">&quot;col6&quot;</span>,
                    <span style="color: #ff0000;">&quot;cid7&quot;</span>:<span style="color: #ff0000;">&quot;col7&quot;</span>
                <span style="color: #66cc66;">&#125;</span>
                <span style="color: #808080; font-style: italic;">// possible values for comboboxes</span>
                <span style="color: #000000; font-weight: bold;">var</span> _possibleValues:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span>
                    <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">data</span>:<span style="color: #ff0000;">&quot;&quot;</span>,label:<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#125;</span>,
                    <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">data</span>:<span style="color: #ff0000;">&quot;q1&quot;</span>,label:<span style="color: #ff0000;">&quot;v1&quot;</span><span style="color: #66cc66;">&#125;</span>,
                    <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">data</span>:<span style="color: #ff0000;">&quot;b&quot;</span>,label:<span style="color: #ff0000;">&quot;v2&quot;</span><span style="color: #66cc66;">&#125;</span>,
                    <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">data</span>:<span style="color: #ff0000;">&quot;c&quot;</span>,label:<span style="color: #ff0000;">&quot;v3&quot;</span><span style="color: #66cc66;">&#125;</span>,
                    <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">data</span>:<span style="color: #ff0000;">&quot;d&quot;</span>,label:<span style="color: #ff0000;">&quot;v4&quot;</span><span style="color: #66cc66;">&#125;</span>
                <span style="color: #66cc66;">&#93;</span>;
                <span style="color: #808080; font-style: italic;">// setting the left header width</span>
                mdg.<span style="color: #006600;">leftHeaderWidth</span> = <span style="color: #cc66cc;">150</span>;
                <span style="color: #808080; font-style: italic;">// setting the possible values for comboboxes</span>
                mdg.<span style="color: #006600;">possibleValues</span> = _possibleValues;
                <span style="color: #808080; font-style: italic;">// setting the left header</span>
                <span style="color: #808080; font-style: italic;">// the leftheader is an object that </span>
                <span style="color: #808080; font-style: italic;">// contains pairs of: (rowName, rowId)</span>
                mdg.<span style="color: #006600;">leftHeader</span> = leftHeader;
                <span style="color: #808080; font-style: italic;">// setting the top header</span>
                <span style="color: #808080; font-style: italic;">// the top header is an object that </span>
                <span style="color: #808080; font-style: italic;">// contains pairs of: (columnName, columnId)</span>
                mdg.<span style="color: #006600;">topHeader</span> = topHeader;
                <span style="color: #808080; font-style: italic;">// setting our matrix</span>
                <span style="color: #808080; font-style: italic;">// every item is defined by coordinates </span>
                <span style="color: #808080; font-style: italic;">// like this: (rowId, colId)</span>
                mdg.<span style="color: #006600;">matrix</span> = testdata;
            <span style="color: #66cc66;">&#125;</span>
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleSetClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
                mdg.<span style="color: #006600;">matrix</span> = xml2Matrix<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span>indata.<span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#41;</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> handleGetClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<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> newData:<span style="color: #0066CC;">Object</span> = mdg.<span style="color: #006600;">matrix</span>;
                debug.<span style="color: #0066CC;">text</span> = Debug.<span style="color: #006600;">dump</span><span style="color: #66cc66;">&#40;</span>newData<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Application<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p>This component uses about 10 files to implement the following:</p>
<ul class="ul">
<li>dataGrid</li>
<li>comboBox</li>
<li>itemRenderers:
<ul class="ul">
<li>top header</li>
<li>left header</li>
<li>items</li>
</ul>
</li>
<li>events</li>
<li>skins</li>
</ul>
<p>Some interesting things I found when I implemented this <strong>MatrixGrid</strong>:</p>
<ol>
<li>is that is hard to link back to the columns and the data grid from within an item renderer. It is possible to access the data grid by using <strong>owner</strong> property, but is hard to find out the current position from an item renderer, relative to the data grid - more precise to find the column and the row</li>
<li>is even harder to dispatch an event from the item renderer to the data grid</li>
</ol>
<p>But there are ways, as you can see in the source files, but that involves to dive into the Flex framework to understand how data grid is working, in order to be able to take code and use it in you item renderers.</p>
<p>I hope <strong>MatrixGrid</strong> will be helpful for you and if it is please leave a comment and do not delete the licensing text inside source files.</p>
</div><div id='wpv-wrapper-217'><table id='wpv-table-217'><tr><td class='display-cell' onmouseover='WpvFileHandler_217.mouseOverCell(this)' onmouseout='WpvFileHandler_217.mouseOutCell(this)' onclick='WpvFileHandler_217.doDefault("wpv_file_id=200&post_id=217&file_mode=Default&hash=02fceb8f2c1fb5c610e6967756586da7")'><table style='width: 100%'><tr><td><img src='http://www.flexer.info/?wpv_file_id=200&post_id=217&file_mode=thumbnail&action_type=Default&hash=02fceb8f2c1fb5c610e6967756586da7' title='MatrixGrid_sources.zip' /></td><td style='width: 100%'><div class='wpv-file-name'>MatrixGrid_sources</div></td></tr></table></td></tr><tr><td class='display-cell' onmouseover='WpvFileHandler_217.mouseOverCell(this)' onmouseout='WpvFileHandler_217.mouseOutCell(this)' onclick='WpvFileHandler_217.doDefault("wpv_file_id=199&post_id=217&file_mode=Default&hash=98956b6cb249ae8a008ca5cee28bfa04")'><table style='width: 100%'><tr><td><img src='http://www.flexer.info/?wpv_file_id=199&post_id=217&file_mode=thumbnail&action_type=Default&hash=98956b6cb249ae8a008ca5cee28bfa04' title='MatrixGridApp.swf' /></td><td style='width: 100%'><div class='wpv-file-name'>MatrixGridApp</div></td></tr></table></td></tr></table></div>]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/06/30/matrixgrid-component-extending-the-datagrid/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ROXIK Sharikura 3D Library</title>
		<link>http://www.flexer.info/2008/06/27/roxik-sharikura-3d-library/</link>
		<comments>http://www.flexer.info/2008/06/27/roxik-sharikura-3d-library/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 12:00:32 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[3D]]></category>

		<category><![CDATA[ActionScript]]></category>

		<category><![CDATA[physics]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=216</guid>
		<description><![CDATA[Today I found a new 3D engine: AS3 ROXIK Sharikura 3D Library. It is great from what I could see from their demos. Interesting is this demo where you can add more and more object to the animation but the animation is not jerky. 
The library at this moment is not released but Masayuki Kido [...]]]></description>
			<content:encoded><![CDATA[<p>Today I found a new 3D engine: <a href="http://temp.roxik.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">AS3 ROXIK Sharikura 3D Library</a>. It is great from what I could see from their demos. Interesting is <a href="http://temp.roxik.com/datas/perform/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">this demo</a> where you can add more and more object to the animation but the animation is not jerky. </p>
<p>The library at this moment is not released but <a href="http://roxik.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/roxik.com');" target="_blank">Masayuki Kido</a> said the following to Manfred Weber in <a href="http://manfred.dschini.org/2008/06/17/sharikura-available-public/" onclick="javascript:pageTracker._trackPageview('/outbound/article/manfred.dschini.org');" target="_blank">this post</a>:</p>
<blockquote><p>I am going to exhibit Sharikura 3D as an open source.<br />
However, Sharikura 3D is unfinished.<br />
Because Sharikura 3D is my private work,<br />
please understand that it takes time to release.</p></blockquote>
<p>Releasing AS3 ROXIK Sharikura 3D Library as open source is great and we are anxious to work with it. But till then enjoy this links:<br />
<a href="http://roxik.com/toy1.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/roxik.com');" target="_blank">http://roxik.com/toy1.html</a><br />
<a href="http://temp.roxik.com/datas/perform/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">http://temp.roxik.com/datas/perform/index.html</a><br />
<a href="http://temp.roxik.com/datas/web_edition_tour/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">http://temp.roxik.com/datas/web_edition_tour/index.html</a><br />
<a href="http://temp.roxik.com/datas/bone/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">http://temp.roxik.com/datas/bone/index.html</a><br />
<a href="http://temp.roxik.com/datas/physics/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">http://temp.roxik.com/datas/physics/index.html</a><br />
<a href="http://temp.roxik.com/datas/cloth/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">http://temp.roxik.com/datas/cloth/index.html</a><br />
<a href="http://temp.roxik.com/datas/max2007/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">http://temp.roxik.com/datas/max2007/index.html</a><br />
<a href="http://temp.roxik.com/datas/mobile/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">http://temp.roxik.com/datas/mobile/index.html</a><br />
<a href="http://temp.roxik.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/temp.roxik.com');" target="_blank">http://temp.roxik.com/</a><br />
<a href="http://roxik.com/pictaps/" onclick="javascript:pageTracker._trackPageview('/outbound/article/roxik.com');" target="_blank">http://roxik.com/pictaps/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/06/27/roxik-sharikura-3d-library/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Job Posting</title>
		<link>http://www.flexer.info/2008/06/26/job-posting/</link>
		<comments>http://www.flexer.info/2008/06/26/job-posting/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 09:17:21 +0000</pubDate>
		<dc:creator>Virgil Cristea</dc:creator>
		
		<category><![CDATA[Jobs]]></category>

		<category><![CDATA[flex]]></category>

		<category><![CDATA[job]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=215</guid>
		<description><![CDATA[Today I found out about a interesting job opportunity in flex.
Location is Bucharest, Romania.
Starting Part-time and moving towards full-time.
If anyone is interested please send a resume to qbic@qbic.ro
]]></description>
			<content:encoded><![CDATA[<p>Today I found out about a interesting job opportunity in flex.</p>
<p>Location is Bucharest, Romania.</p>
<p>Starting Part-time and moving towards full-time.</p>
<p>If anyone is interested please send a resume to qbic@qbic.ro</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/06/26/job-posting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dump Debug Method (Like var_dump Function in PHP) and Debug Class</title>
		<link>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/</link>
		<comments>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 11:59:43 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[ActionScript]]></category>

		<category><![CDATA[Debug]]></category>

		<category><![CDATA[How to]]></category>

		<category><![CDATA[class]]></category>

		<category><![CDATA[static]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=212</guid>
		<description><![CDATA[Although Flex Builder and Eclipse do have nice debug utilities built in, today I needed a function/method in Actionscript to display into the current application some variables&#8217; content. So I started to implement a var_dump alike function (var_dump from PHP language).
So I started and I made the Debug class that will implement the static dump [...]]]></description>
			<content:encoded><![CDATA[<link rel='stylesheet' href='http://www.flexer.info/?wpv-css=wpv-display&post_id=212' title='wpv-display-css' type='text/css'><script type='text/javascript' src='http://www.flexer.info/?wpv-js=wpv-display&post_id=212'></script><div style='margin-bottom: 20px'><p>Although Flex Builder and Eclipse do have nice debug utilities built in, today I needed a function/method in Actionscript to display into the current application some variables&#8217; content. So I started to implement a var_dump alike function (<a href="http://www.php.net/manual/en/function.var-dump.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.php.net');" target="_blank">var_dump</a> from PHP language).</p>
<p>So I started and I made the <strong>Debug</strong> class that will implement the static <strong>dump</strong> function. Looking at the PHP var_dump function I noticed two, three main problems that will appear:</p>
<ol>
<li>data types - ex: array is displayed as object by <strong>typeof</strong> function/operator</li>
<li>length of objects and associative arrays - ex: length property for objects and associative arrays is undefined</li>
<li>behaviour of static methods and variables inside calsses - ex: a static variable will keep its content even new methods calls appear, so calling the static dump method will not reinitialize the static vars.</li>
</ol>
<p>For al these problems solutions are available:</p>
<ol>
<li>instead of using <strong>typeof</strong> we will use <a href="http://livedocs.adobe.com/flex/2/langref/flash/utils/package.html#getQualifiedClassName()" onclick="javascript:pageTracker._trackPageview('/outbound/article/livedocs.adobe.com');" target="_blank">flash.utils.getQualifiedClassName</a> static method (see also <a href="http://www.flexer.info/2007/10/18/how-to-find-the-class-name-of-an-object-instance/"  target="_blank">this old article</a>) - more about typeof operator and its return values <a href="http://livedocs.adobe.com/flex/2/langref/operators.html#typeof" onclick="javascript:pageTracker._trackPageview('/outbound/article/livedocs.adobe.com');" target="_blank">here</a></li>
<li>we will implement a method to count the first children in an object</li>
<li>there will be an internal <strong>recursiveDump</strong> function and a generic public <strong>dump</strong> function</li>
</ol>
<p>Here is the application code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="actionscript"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:Application xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> 
    layout=<span style="color: #ff0000;">&quot;absolute&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;400&quot;</span>
    creationComplete=<span style="color: #ff0000;">&quot;start()&quot;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:TextArea id=<span style="color: #ff0000;">&quot;debugTA&quot;</span> x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;10&quot;</span> 
        <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;480&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;380&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">controls</span>.<span style="color: #006600;">Alert</span>;
            <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">flexer</span>.<span style="color: #006600;">Debug</span>;
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> testdata:<span style="color: #0066CC;">Object</span>;
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">start</span><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: #808080; font-style: italic;">// even though the object is created like here</span>
                <span style="color: #808080; font-style: italic;">// the order does not reflect the order of</span>
                <span style="color: #808080; font-style: italic;">// creation - the order is somehow made internally </span>
                testdata = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                testdata<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;row1&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #ff0000;">&quot;col1&quot;</span>:<span style="color: #ff0000;">&quot;a&quot;</span>,
                    <span style="color: #ff0000;">&quot;col2&quot;</span>:<span style="color: #66cc66;">&#123;</span>
                        <span style="color: #ff0000;">&quot;12&quot;</span>:<span style="color: #ff0000;">&quot;12&quot;</span>,
                        <span style="color: #ff0000;">&quot;13&quot;</span>:<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span>,<span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span>
                    <span style="color: #66cc66;">&#125;</span>,
                    <span style="color: #ff0000;">&quot;col3&quot;</span>:<span style="color: #ff0000;">&quot;c&quot;</span>,
                    <span style="color: #ff0000;">&quot;col4&quot;</span>:<span style="color: #ff0000;">&quot;d&quot;</span>
                <span style="color: #66cc66;">&#125;</span>;
                testdata<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;row2&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                testdata<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;row2&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&lt;</span>test<span style="color: #66cc66;">&gt;&lt;</span>tag1 att=<span style="color: #ff0000;">&quot;att&quot;</span><span style="color: #66cc66;">&gt;</span>val<span style="color: #66cc66;">&lt;/</span>tag1<span style="color: #66cc66;">&gt;&lt;/</span>test<span style="color: #66cc66;">&gt;</span>;
                testdata<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;row3&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#123;</span><span style="color: #ff0000;">&quot;col1&quot;</span>:<span style="color: #ff0000;">&quot;a&quot;</span>,<span style="color: #ff0000;">&quot;col2&quot;</span>:<span style="color: #ff0000;">&quot;b&quot;</span>,<span style="color: #ff0000;">&quot;col3&quot;</span>:<span style="color: #ff0000;">&quot;c&quot;</span>,<span style="color: #ff0000;">&quot;col4&quot;</span>:<span style="color: #ff0000;">&quot;d&quot;</span><span style="color: #66cc66;">&#125;</span>;
                testdata<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;row4&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#123;</span><span style="color: #ff0000;">&quot;col1&quot;</span>:<span style="color: #ff0000;">&quot;a&quot;</span>,<span style="color: #ff0000;">&quot;col2&quot;</span>:<span style="color: #ff0000;">&quot;b&quot;</span>,<span style="color: #ff0000;">&quot;col3&quot;</span>:<span style="color: #ff0000;">&quot;c&quot;</span>,<span style="color: #ff0000;">&quot;col4&quot;</span>:<span style="color: #ff0000;">&quot;d&quot;</span><span style="color: #66cc66;">&#125;</span>;
                testdata<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;row5&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                testdata<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;row5&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;a&quot;</span>,<span style="color: #ff0000;">&quot;b&quot;</span>,<span style="color: #ff0000;">&quot;c&quot;</span>,<span style="color: #ff0000;">&quot;d&quot;</span><span style="color: #66cc66;">&#93;</span>;
                testdata<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;row6&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#123;</span><span style="color: #ff0000;">&quot;col1&quot;</span>:<span style="color: #ff0000;">&quot;a&quot;</span>,<span style="color: #ff0000;">&quot;col2&quot;</span>:<span style="color: #ff0000;">&quot;b&quot;</span>,<span style="color: #ff0000;">&quot;col3&quot;</span>:<span style="color: #ff0000;">&quot;c&quot;</span>,<span style="color: #ff0000;">&quot;col4&quot;</span>:<span style="color: #ff0000;">&quot;d&quot;</span><span style="color: #66cc66;">&#125;</span>;
                <span style="color: #808080; font-style: italic;">// calling debug.dump</span>
                debugTA.<span style="color: #0066CC;">text</span> = Debug.<span style="color: #006600;">dump</span><span style="color: #66cc66;">&#40;</span>testdata,<span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">5.5</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Application<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p>The <strong>Debug</strong> class with its static methods can be downloaded at the end but now you can see the dump of the above flex code.<br />

<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2008/06/var_dump_app.swf"
			width="500"
			height="400">
	<param name="movie" value="/wp-content/uploads/2008/06/var_dump_app.swf" />
</object>
</div><div id='wpv-wrapper-212'><table id='wpv-table-212'><tr><td class='display-cell' onmouseover='WpvFileHandler_212.mouseOverCell(this)' onmouseout='WpvFileHandler_212.mouseOutCell(this)' onclick='WpvFileHandler_212.doDefault("wpv_file_id=198&post_id=212&file_mode=Default&hash=9e02cd15a4739d838a41134541047e33")'><table style='width: 100%'><tr><td><img src='http://www.flexer.info/?wpv_file_id=198&post_id=212&file_mode=thumbnail&action_type=Default&hash=9e02cd15a4739d838a41134541047e33' title='var_dump_app.swf' /></td><td style='width: 100%'><div class='wpv-file-name'>var_dump_app</div></td></tr></table></td></tr><tr><td class='display-cell' onmouseover='WpvFileHandler_212.mouseOverCell(this)' onmouseout='WpvFileHandler_212.mouseOutCell(this)' onclick='WpvFileHandler_212.doDefault("wpv_file_id=197&post_id=212&file_mode=Default&hash=16c2db453458249a22a492f2e3137286")'><table style='width: 100%'><tr><td><img src='http://www.flexer.info/?wpv_file_id=197&post_id=212&file_mode=thumbnail&action_type=Default&hash=16c2db453458249a22a492f2e3137286' title='var_dump_sources.zip' /></td><td style='width: 100%'><div class='wpv-file-name'>var_dump_sources</div></td></tr></table></td></tr></table></div>]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/06/25/dump-debug-method-like-var_dump-function-in-php-and-debug-class/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How To Use FIVe3D And Tweening in Flex</title>
		<link>http://www.flexer.info/2008/06/19/how-to-use-five3d-and-tweening-in-flex/</link>
		<comments>http://www.flexer.info/2008/06/19/how-to-use-five3d-and-tweening-in-flex/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 10:50:46 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[3D]]></category>

		<category><![CDATA[ActionScript]]></category>

		<category><![CDATA[How to]]></category>

		<category><![CDATA[Tweening]]></category>

		<category><![CDATA[five3d]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=209</guid>
		<description><![CDATA[In a previous article I explained how to use FIVe3D with Flex and because fl.motion is not included into the Flex Framework we had to find out a workaround. I commented out the lines that referenced fl.motion but Kelvin Luck found another way: &#8220;copy the classes from Flash CS3 Actionscript framework into the project&#8221;. So [...]]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents<!-- for FIVe3D, Tweening and Flex --></h3><ol><li><a href='http://www.flexer.info/2008/06/17/how-to-use-five3d-in-flex/' title='How To Use FIVe3D In Flex'>How To Use FIVe3D In Flex</a></li><li>How To Use FIVe3D And Tweening in Flex</li></ol></div> <link rel='stylesheet' href='http://www.flexer.info/?wpv-css=wpv-display&post_id=209' title='wpv-display-css' type='text/css'><script type='text/javascript' src='http://www.flexer.info/?wpv-js=wpv-display&post_id=209'></script><div style='margin-bottom: 20px'><p>In a <a href="http://www.flexer.info/2008/06/17/how-to-use-five3d-in-flex" >previous article</a> I explained how to use FIVe3D with Flex and because <strong>fl.motion</strong> is not included into the Flex Framework we had to find out a workaround. I commented out the lines that referenced fl.motion but <a href="http://www.flexer.info/2008/06/17/how-to-use-five3d-in-flex/#comment-301" >Kelvin Luck</a> found another way: &#8220;copy the classes from Flash CS3 Actionscript framework into the project&#8221;. So this time the FIVe3D framework is untouched and fl.motion is included into the project.</p>
<p>Lets skip the intro and get into it&#8230; In this article I added some tweening to the example from the previous article. The framework I used are:</p>
<ul class="ul">
<li><strong>TweenLite</strong> - <a href="http://blog.greensock.com/tweenliteas3/" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.greensock.com');" target="_blank">http://blog.greensock.com/tweenliteas3/</a></li>
<li><strong>fl.transition</strong> - taken from Flash CS3 Actionscript 3 Framework</li>
<li><strong>Tweener</strong> - <a href="http://code.google.com/p/tweener/" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" target="_blank">http://code.google.com/p/tweener/</a></li>
</ul>
<p>These are the tree tweening frameworks we will add but from all of them <strong>TweenLite</strong> seems to be the easiest to use.<br />

<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2008/06/five3d_tween.swf"
			width="500"
			height="600">
	<param name="movie" value="/wp-content/uploads/2008/06/five3d_tween.swf" />
</object><br />
There is no visible difference between <strong>TweenLite</strong>, <strong>fl.transition</strong> and <strong>Tweener</strong> but in the future I may add some benchmarks.</p>
<p>Now take a look at the code and you can choose what tweenning library you&#8217;ll use.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
</pre></td><td class="code"><pre class="actionscript"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:Application xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> 
    backgroundGradientColors=<span style="color: #ff0000;">&quot;[#dddddd,#dddddd]&quot;</span>
    layout=<span style="color: #ff0000;">&quot;absolute&quot;</span> 
    <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span>
    <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;600&quot;</span>
    creationComplete=<span style="color: #ff0000;">&quot;start()&quot;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:UIComponent id=<span style="color: #ff0000;">&quot;mainUI&quot;</span> 
        <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;500&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
&nbsp;
            <span style="color: #0066CC;">import</span> five3D.<span style="color: #006600;">typography</span>.<span style="color: #006600;">HelveticaBold</span>;
            <span style="color: #0066CC;">import</span> five3D.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Drawing</span>;
            <span style="color: #0066CC;">import</span> five3D.<span style="color: #006600;">display</span>.<span style="color: #006600;">Scene3D</span>;
            <span style="color: #0066CC;">import</span> five3D.<span style="color: #006600;">display</span>.<span style="color: #006600;">DynamicText3D</span>;
            <span style="color: #0066CC;">import</span> five3D.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape3D</span>;
            <span style="color: #0066CC;">import</span> five3D.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite3D</span>;
&nbsp;
            <span style="color: #0066CC;">import</span> gs.<span style="color: #006600;">TweenLite</span>;
            <span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tweener</span>;
            <span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tween</span>;
            <span style="color: #808080; font-style: italic;">// we will use Exponential.easeOut </span>
            <span style="color: #808080; font-style: italic;">// function in tweening</span>
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">effects</span>.<span style="color: #006600;">easing</span>.<span style="color: #006600;">Exponential</span>;
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> scene3D:Scene3D;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> sprite3D:Sprite3D;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> star3d:Shape3D;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> flexerWord:DynamicText3D;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> hiWord:DynamicText3D;
&nbsp;
            <span style="color: #808080; font-style: italic;">// start drawing</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">start</span><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: #808080; font-style: italic;">// create the scene</span>
                scene3D = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                scene3D.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">250</span>;
                scene3D.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">250</span>;
                <span style="color: #808080; font-style: italic;">// create the round rectangle/square</span>
                sprite3D = <span style="color: #000000; font-weight: bold;">new</span> Sprite3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                sprite3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x000000<span style="color: #66cc66;">&#41;</span>;
                sprite3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #006600;">drawRoundRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">-150</span>,<span style="color: #cc66cc;">-150</span>,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">300</span>,<span style="color: #cc66cc;">40</span>,<span style="color: #cc66cc;">40</span><span style="color: #66cc66;">&#41;</span>;
                sprite3D.<span style="color: #006600;">graphics3D</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// rotate the round rectangle/square randomly</span>
                sprite3D.<span style="color: #006600;">rotationX</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>;
                sprite3D.<span style="color: #006600;">rotationY</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>;
                sprite3D.<span style="color: #006600;">rotationZ</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>;
                <span style="color: #808080; font-style: italic;">// create the star</span>
                star3d = <span style="color: #000000; font-weight: bold;">new</span> Shape3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                Drawing.<span style="color: #006600;">star</span><span style="color: #66cc66;">&#40;</span>star3d.<span style="color: #006600;">graphics3D</span>,<span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">60</span>,<span style="color: #cc66cc;">50</span>,<span style="color: #cc66cc;">0</span>,0x6699cc<span style="color: #66cc66;">&#41;</span>;
                star3d.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">120</span>;
                star3d.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">-80</span>;
                <span style="color: #808080; font-style: italic;">// rotate the start</span>
                star3d.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>,
                    <span style="color: #000000; font-weight: bold;">function</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: #808080; font-style: italic;">// rotate on Z axe </span>
                        event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">rotationZ</span>++; 
                    <span style="color: #66cc66;">&#125;</span>
                <span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// &quot;fxr&quot; word</span>
                flexerWord = <span style="color: #000000; font-weight: bold;">new</span> DynamicText3D<span style="color: #66cc66;">&#40;</span>HelveticaBold<span style="color: #66cc66;">&#41;</span>;
                flexerWord.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">45</span>;
                flexerWord.<span style="color: #0066CC;">color</span> = 0xFFFFFF;
                flexerWord.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Fxr&quot;</span>;
                flexerWord.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">88</span>;
                flexerWord.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">-110</span>;
                <span style="color: #808080; font-style: italic;">// &quot;hi&quot; word</span>
                hiWord = <span style="color: #000000; font-weight: bold;">new</span> DynamicText3D<span style="color: #66cc66;">&#40;</span>HelveticaBold<span style="color: #66cc66;">&#41;</span>;
                hiWord.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">100</span>;
                hiWord.<span style="color: #0066CC;">color</span> = 0x555555;
                hiWord.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Hi!&quot;</span>;
                hiWord.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">-112</span>;
                hiWord.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">-34</span>;
                <span style="color: #808080; font-style: italic;">// click event on the round rectangle/square</span>
                sprite3D.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,handleSquareClick<span style="color: #66cc66;">&#41;</span>;
                sprite3D.<span style="color: #006600;">mouseChildren</span> = <span style="color: #000000; font-weight: bold;">false</span>;
                sprite3D.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
                <span style="color: #808080; font-style: italic;">// adding scene to the main UI component</span>
                mainUI.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>scene3D<span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// adding round rectangle/square to the scene</span>
                scene3D.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>sprite3D<span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// adding the start to the round rectangle/square</span>
                sprite3D.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>star3d<span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// adding &quot;fxr&quot; word to the round rectangle/square</span>
                sprite3D.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>flexerWord<span style="color: #66cc66;">&#41;</span>;
                <span style="color: #808080; font-style: italic;">// adding &quot;hi&quot; word to the round rectangle/square</span>
                sprite3D.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>hiWord<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> handleSquareClick<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
                <span style="color: #808080; font-style: italic;">// rotate the round rectangle/square randomly</span>
                <span style="color: #808080; font-style: italic;">// all 3 axes</span>
                <span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span>whichTween.<span style="color: #006600;">selectedValue</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;notween&quot;</span>:
                    <span style="color: #66cc66;">&#123;</span>
                        <span style="color: #808080; font-style: italic;">// no tween</span>
                        event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">rotationX</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>;
                        event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">rotationY</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>;
                        event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">rotationZ</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>;
                        <span style="color: #b1b100;">break</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;tweenlite&quot;</span>:
                    <span style="color: #66cc66;">&#123;</span>
                        <span style="color: #808080; font-style: italic;">// using TweenLite</span>
                        TweenLite.<span style="color: #006600;">to</span><span style="color: #66cc66;">&#40;</span>
                            <span style="color: #808080; font-style: italic;">// target object</span>
                            event.<span style="color: #0066CC;">target</span>,
                            <span style="color: #808080; font-style: italic;">// duration</span>
                            <span style="color: #cc66cc;">1.5</span>,
                            <span style="color: #66cc66;">&#123;</span>
                                <span style="color: #808080; font-style: italic;">// target property: value</span>
                                rotationX:<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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>,
                                <span style="color: #808080; font-style: italic;">// target property: value</span>
                                rotationY:<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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>,
                                <span style="color: #808080; font-style: italic;">// target property: value</span>
                                rotationZ:<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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>,
                                <span style="color: #808080; font-style: italic;">// easing function</span>
                                ease:Exponential.<span style="color: #006600;">easeOut</span>
                            <span style="color: #66cc66;">&#125;</span>
                        <span style="color: #66cc66;">&#41;</span>;
                        <span style="color: #b1b100;">break</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;tweener&quot;</span>:
                    <span style="color: #66cc66;">&#123;</span>
                        <span style="color: #808080; font-style: italic;">// using Tweener</span>
                        Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>
                            <span style="color: #808080; font-style: italic;">// target object</span>
                            event.<span style="color: #0066CC;">target</span>,
                            <span style="color: #66cc66;">&#123;</span>
                                <span style="color: #808080; font-style: italic;">// target property: value</span>
                                rotationX:<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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>,
                                <span style="color: #808080; font-style: italic;">// target property: value</span>
                                rotationY:<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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>,
                                <span style="color: #808080; font-style: italic;">// target property: value</span>
                                rotationZ:<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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span>,
                                <span style="color: #808080; font-style: italic;">// duration</span>
                                <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1.5</span>,
                                <span style="color: #808080; font-style: italic;">// easing function</span>
                                transition:<span style="color: #ff0000;">&quot;easeoutexponential&quot;</span>
                            <span style="color: #66cc66;">&#125;</span>
                        <span style="color: #66cc66;">&#41;</span>;
                        <span style="color: #b1b100;">break</span>;
                    <span style="color: #66cc66;">&#125;</span>
                    <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;fltransition&quot;</span>:
                    <span style="color: #66cc66;">&#123;</span>
                        <span style="color: #808080; font-style: italic;">// using fl.transition from Flash </span>
                        <span style="color: #808080; font-style: italic;">// CS3 Actionscript 3 Framework</span>
                        <span style="color: #000000; font-weight: bold;">var</span> xTween:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>
                            event.<span style="color: #0066CC;">target</span> <span style="color: #808080; font-style: italic;">/* target object */</span>,
                            <span style="color: #ff0000;">&quot;rotationX&quot;</span> <span style="color: #808080; font-style: italic;">/* target property */</span>,
                            Exponential.<span style="color: #006600;">easeOut</span> <span style="color: #808080; font-style: italic;">/* easing function */</span>,
                            event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">rotationX</span> <span style="color: #808080; font-style: italic;">/* start point */</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span> <span style="color: #808080; font-style: italic;">/* end point */</span>,
                            <span style="color: #cc66cc;">1.5</span> <span style="color: #808080; font-style: italic;">/*duration in seconds */</span>,
                            <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #808080; font-style: italic;">/* use seconds */</span>
                        <span style="color: #66cc66;">&#41;</span>;
                        xTween.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                        <span style="color: #000000; font-weight: bold;">var</span> yTween:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>
                            event.<span style="color: #0066CC;">target</span> <span style="color: #808080; font-style: italic;">/* target object */</span>,
                            <span style="color: #ff0000;">&quot;rotationY&quot;</span> <span style="color: #808080; font-style: italic;">/* target property */</span>,
                            Exponential.<span style="color: #006600;">easeOut</span> <span style="color: #808080; font-style: italic;">/* easing function */</span>,
                            event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">rotationY</span> <span style="color: #808080; font-style: italic;">/* start point */</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span> <span style="color: #808080; font-style: italic;">/* end point */</span>,
                            <span style="color: #cc66cc;">1.5</span> <span style="color: #808080; font-style: italic;">/*duration in seconds */</span>,
                            <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #808080; font-style: italic;">/* use seconds */</span>
                        <span style="color: #66cc66;">&#41;</span>;
                        yTween.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                        <span style="color: #000000; font-weight: bold;">var</span> zTween:Tween = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span>
                            event.<span style="color: #0066CC;">target</span> <span style="color: #808080; font-style: italic;">/* target object */</span>,
                            <span style="color: #ff0000;">&quot;rotationZ&quot;</span> <span style="color: #808080; font-style: italic;">/* target property */</span>,
                            Exponential.<span style="color: #006600;">easeOut</span> <span style="color: #808080; font-style: italic;">/* easing function */</span>,
                            event.<span style="color: #0066CC;">target</span>.<span style="color: #006600;">rotationZ</span> <span style="color: #808080; font-style: italic;">/* start point */</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;">*</span><span style="color: #cc66cc;">100</span><span style="color: #cc66cc;">-50</span> <span style="color: #808080; font-style: italic;">/* end point */</span>,
                            <span style="color: #cc66cc;">1.5</span> <span style="color: #808080; font-style: italic;">/*duration in seconds */</span>,
                            <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #808080; font-style: italic;">/* use seconds */</span>
                        <span style="color: #66cc66;">&#41;</span>;
                        zTween.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</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>
&nbsp;
        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:RadioButtonGroup id=<span style="color: #ff0000;">&quot;whichTween&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:RadioButton x=<span style="color: #ff0000;">&quot;10.0&quot;</span> y=<span style="color: #ff0000;">&quot;572&quot;</span> label=<span style="color: #ff0000;">&quot;No Tween&quot;</span> groupName=<span style="color: #ff0000;">&quot;whichTween&quot;</span> 
        value=<span style="color: #ff0000;">&quot;notween&quot;</span> selected=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:RadioButton x=<span style="color: #ff0000;">&quot;105&quot;</span> y=<span style="color: #ff0000;">&quot;572&quot;</span> label=<span style="color: #ff0000;">&quot;TweenLite&quot;</span> groupName=<span style="color: #ff0000;">&quot;whichTween&quot;</span> 
        value=<span style="color: #ff0000;">&quot;tweenlite&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:RadioButton x=<span style="color: #ff0000;">&quot;202&quot;</span> y=<span style="color: #ff0000;">&quot;572&quot;</span> label=<span style="color: #ff0000;">&quot;fl.transition&quot;</span> groupName=<span style="color: #ff0000;">&quot;whichTween&quot;</span> 
        value=<span style="color: #ff0000;">&quot;fltransition&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:RadioButton x=<span style="color: #ff0000;">&quot;307&quot;</span> y=<span style="color: #ff0000;">&quot;572&quot;</span> label=<span style="color: #ff0000;">&quot;Tweener&quot;</span> groupName=<span style="color: #ff0000;">&quot;whichTween&quot;</span> 
        value=<span style="color: #ff0000;">&quot;tweener&quot;</span><span style="color: #66cc66;">/&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Application<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p>This is all for now&#8230; the source files are available to download.</p>
<p>Some additional resources regarding tweening: <a href="http://blog.greensock.com/tweenliteas3/" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.greensock.com');" target="blank">TweenLite</a>, <a href="http://code.google.com/p/tweener/" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');" target="blank">Tweener</a>, <a href="http://www.zedia.net/2008/actionscript-3-tweenlite-basic-tutorial/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.zedia.net');" target="blank">TweenLite Basic Tutorial</a>, <a href="http://www.zedia.net/actionscript-3-tweens-tutorial/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.zedia.net');" target="_blank">Tweens tutorial</a> and <a hred="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/transitions/Tween.html#includeExamplesSummary" target="_blank">fl.transition at LiveDocs</a></p>
</div><div id='wpv-wrapper-209'><table id='wpv-table-209'><tr><td class='display-cell' onmouseover='WpvFileHandler_209.mouseOverCell(this)' onmouseout='WpvFileHandler_209.mouseOutCell(this)' onclick='WpvFileHandler_209.doDefault("wpv_file_id=196&post_id=209&file_mode=Default&hash=2045d945dbcdbdb15b5eac4732a4d865")'><table style='width: 100%'><tr><td><img src='http://www.flexer.info/?wpv_file_id=196&post_id=209&file_mode=thumbnail&action_type=Default&hash=2045d945dbcdbdb15b5eac4732a4d865' title='five3d_tween_sources.zip' /></td><td style='width: 100%'><div class='wpv-file-name'>five3d_tween_sources</div></td></tr></table></td></tr><tr><td class='display-cell' onmouseover='WpvFileHandler_209.mouseOverCell(this)' onmouseout='WpvFileHandler_209.mouseOutCell(this)' onclick='WpvFileHandler_209.doDefault("wpv_file_id=195&post_id=209&file_mode=Default&hash=03ccb8f9c6704a2f8dd6914d7141b2f0")'><table style='width: 100%'><tr><td><img src='http://www.flexer.info/?wpv_file_id=195&post_id=209&file_mode=thumbnail&action_type=Default&hash=03ccb8f9c6704a2f8dd6914d7141b2f0' title='five3d_tween.swf' /></td><td style='width: 100%'><div class='wpv-file-name'>five3d_tween</div></td></tr></table></td></tr></table></div> <div class='series_links'><a href='http://www.flexer.info/2008/06/17/how-to-use-five3d-in-flex/' title='How To Use FIVe3D In Flex'>Previous in series</a> </div>]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/06/19/how-to-use-five3d-and-tweening-in-flex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How To Add New Rows To DataGrid And Scroll To Last Added Row</title>
		<link>http://www.flexer.info/2008/06/18/how-to-add-new-rows-to-datagrid-and-scroll-to-last-added-row/</link>
		<comments>http://www.flexer.info/2008/06/18/how-to-add-new-rows-to-datagrid-and-scroll-to-last-added-row/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 10:50:45 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
		
		<category><![CDATA[ActionScript]]></category>

		<category><![CDATA[Events]]></category>

		<category><![CDATA[How to]]></category>

		<category><![CDATA[MXML]]></category>

		<category><![CDATA[datagrid]]></category>

		<category><![CDATA[scroll]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=207</guid>
		<description><![CDATA[This will be a simple solution to be able to scroll to the last added row in a data grid. First of all I&#8217;ll explain what I mean and what I encountered when I needed to implement it. 
The expected behavior is after adding a new row into a data grid, it should scroll to [...]]]></description>
			<content:encoded><![CDATA[<p>This will be a simple solution to be able to scroll to the last added row in a data grid. First of all I&#8217;ll explain what I mean and what I encountered when I needed to implement it. </p>
<p>The expected behavior is after adding a new row into a data grid, it should scroll to that item if that row is not visible. First of all I tried to put <strong>scrollToIndex</strong> method right into the add method and unwanted behavior appeared. The data grid was just scrolling to the previous row of the last row leaving the last added row just under the bottom edge. </p>
<p>I started to look into the Flex Framework code and I found out the into the <strong>scrollToIndex</strong> method of <strong>ListBase</strong> class is a variable called <strong>maxVerticalScrollPosition</strong> which is calculated/updated into the <strong>ScrollControlBase</strong> class when the scroll bar is displayed. If the scroll bar is not visible <strong>maxVerticalScrollPosition</strong> variable will be 0. </p>
<p>Why is this happening to us? Because we try to scroll to the last added row before updating the data grid control visually. Finding that out I moved the <strong>scrollToIndex </strong>method into update complete event (<strong>FlexEvent.UPDATE_COMPLETE</strong>) and that fixed the problem because at that point the control is updated and the scroll bar is displayed.</p>
<p>So here is the application&#8230;<br />

<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2008/06/datagridscrollto.swf"
			width="379"
			height="163">
	<param name="movie" value="/wp-content/uploads/2008/06/datagridscrollto.swf" />
</object><br />
&#8230;and the code as usual.<br />
&nbsp;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre></td><td class="code"><pre class="actionscript"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:Application xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #ff0000;">&quot;absolute&quot;</span>
    <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;379&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;163&quot;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:DataGrid x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;10&quot;</span> id=<span style="color: #ff0000;">&quot;dg&quot;</span> dataProvider=<span style="color: #ff0000;">&quot;{dgdp}&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;112&quot;</span>
        updateComplete=<span style="color: #ff0000;">&quot;handleUpdateComplete(event)&quot;</span><span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>mx:columns<span style="color: #66cc66;">&gt;</span>
            <span style="color: #66cc66;">&lt;</span>mx:DataGridColumn headerText=<span style="color: #ff0000;">&quot;Column 1&quot;</span> dataField=<span style="color: #ff0000;">&quot;col1&quot;</span><span style="color: #66cc66;">/&gt;</span>
            <span style="color: #66cc66;">&lt;</span>mx:DataGridColumn headerText=<span style="color: #ff0000;">&quot;Column 2&quot;</span> dataField=<span style="color: #ff0000;">&quot;col2&quot;</span><span style="color: #66cc66;">/&gt;</span>
            <span style="color: #66cc66;">&lt;</span>mx:DataGridColumn headerText=<span style="color: #ff0000;">&quot;Column 3&quot;</span> dataField=<span style="color: #ff0000;">&quot;col3&quot;</span><span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;/</span>mx:columns<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx:DataGrid<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:<span style="color: #0066CC;">Button</span> x=<span style="color: #ff0000;">&quot;320&quot;</span> y=<span style="color: #ff0000;">&quot;9&quot;</span> label=<span style="color: #ff0000;">&quot;Add&quot;</span> click=<span style="color: #ff0000;">&quot;handleAddRow(event)&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:NumericStepper x=<span style="color: #ff0000;">&quot;75&quot;</span> y=<span style="color: #ff0000;">&quot;130&quot;</span> 
        minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;{dg.dataProvider.length-1}&quot;</span>
        change=<span style="color: #ff0000;">&quot;handleScrollToChange(event)&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:Label x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;132&quot;</span> <span style="color: #0066CC;">text</span>=<span style="color: #ff0000;">&quot;Scroll To:&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
            <span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">NumericStepperEvent</span>;
&nbsp;
            <span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span>
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> dgdp:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span>
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #ff0000;">&quot;col1&quot;</span>:<span style="color: #cc66cc;">0</span>,
                    <span style="color: #ff0000;">&quot;col2&quot;</span>:<span style="color: #ff0000;">&quot;a1&quot;</span>,
                    <span style="color: #ff0000;">&quot;col3&quot;</span>:<span style="color: #ff0000;">&quot;b1&quot;</span>
                <span style="color: #66cc66;">&#125;</span>,
                <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #ff0000;">&quot;col1&quot;</span>:<span style="color: #cc66cc;">1</span>,
                    <span style="color: #ff0000;">&quot;col2&quot;</span>:<span style="color: #ff0000;">&quot;a2&quot;</span>,
                    <span style="color: #ff0000;">&quot;col3&quot;</span>:<span style="color: #ff0000;">&quot;b2&quot;</span>
                <span style="color: #66cc66;">&#125;</span>
            <span style="color: #66cc66;">&#93;</span>;
&nbsp;
            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleScrollToChange<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:NumericStepperEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
                dg.<span style="color: #006600;">scrollToIndex</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #006600;">value</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> handleAddRow<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
            <span style="color: #66cc66;">&#123;</span>
                dg.<span style="color: #006600;">dataProvider</span>.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span>
                    <span style="color: #66cc66;">&#123;</span>
                        <span style="color: #ff0000;">&quot;col1&quot;</span>: dg.<span style="color: #006600;">dataProvider</span>.<span style="color: #0066CC;">length</span>,
                        <span style="color: #ff0000;">&quot;col2&quot;</span>: <span style="color: #ff0000;">&quot;__CUST__&quot;</span>,
                        <span style="color: #ff0000;">&quot;col3&quot;</span>: <span style="color: #ff0000;">&quot;__CUST__&quot;</span>
                    <span style="color: #66cc66;">&#125;</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> handleUpdateComplete<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<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> currLen:uint = dg.<span style="color: #006600;">dataProvider</span>.<span style="color: #0066CC;">length</span>;
                dg.<span style="color: #006600;">scrollToIndex</span><span style="color: #66cc66;">&#40;</span>currLen<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Application<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/06/18/how-to-add-new-rows-to-datagrid-and-scroll-to-last-added-row/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
