<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6403790658767936403</id><updated>2012-02-16T18:04:50.204-08:00</updated><category term='resize'/><category term='racetrack'/><category term='flash'/><category term='suite'/><category term='adjacent'/><category term='documentation'/><category term='initialize'/><category term='dd'/><category term='bug'/><category term='manually'/><category term='profiler'/><category term='unit'/><category term='as3'/><category term='adobe'/><category term='Zend_Test_PHPUnit_ControllerTestCase'/><category term='VideoDisplay'/><category term='sessions'/><category term='xampp'/><category term='timer'/><category term='Debugger'/><category term='1.0.0.5'/><category term='cakephp'/><category term='Flex'/><category term='mdadm'/><category term='performance'/><category term='group'/><category term='raid'/><category term='arraycollection'/><category term='rsl'/><category term='itemUpdated'/><category term='AMFPHP'/><category term='backup'/><category term='simpletest'/><category term='lifecycle'/><category term='centralized'/><category term='slow'/><category term='httpd'/><category term='Pipes'/><category term='leak'/><category term='models'/><category term='pixelation'/><category term='memory'/><category term='algorithm'/><category term='Zend'/><category term='Dreamweaver'/><category term='fios'/><category term='pagelinks'/><category term='on demand'/><category term='filter'/><category term='component'/><category term='vhost'/><category term='beta'/><category term='online'/><category term='Cairngorm'/><category term='trac'/><category term='controller'/><category term='integration'/><category term='dns'/><category term='2.0'/><category term='Multicore'/><category term='Eclipse'/><category term='session'/><category term='mod_python'/><category term='unit testing'/><category term='Actionscript'/><category term='certificate'/><category term='swf'/><category term='framework'/><category term='testing'/><category term='ont'/><category term='WAMP'/><category term='studio'/><category term='compiler'/><category term='modulebase'/><category term='debugging'/><category term='reboot'/><category term='percent'/><category term='uicomponent'/><category term='iso'/><category term='showHighlightTrack'/><category term='fedora'/><category term='collection'/><category term='speed up'/><category term='IDE'/><category term='osx'/><category term='Junction'/><category term='PureMVC'/><category term='plesk'/><category term='entity'/><category term='memcache'/><category term='conditional'/><category term='Module'/><category term='Garbage'/><category term='sdk'/><category term='leopard'/><category term='comparison'/><category term='session.use_trans_sid'/><category term='spark'/><category term='internet'/><category term='pipeworks'/><category term='image'/><category term='teesplit'/><category term='scrubber'/><category term='linked'/><category term='embed'/><category term='PDT'/><category term='whos'/><category term='database'/><category term='apache'/><category term='2'/><category term='1.19'/><category term='router'/><category term='speed'/><category term='children'/><category term='deepa'/><category term='dispatching'/><category term='air'/><category term='php'/><category term='optimize'/><category term='tutorial'/><category term='connecting'/><category term='teemerge'/><category term='remote'/><category term='migration'/><category term='name'/><category term='modules'/><category term='Zend_Session_SaveHandler_DbTable'/><category term='font'/><category term='cookieless'/><category term='button'/><category term='collectionevent'/><category term='tlf'/><category term='null'/><category term='appmodel'/><category term='1.1'/><category term='containers'/><category term='pagination'/><category term='cakeamfphp'/><category term='virtual host'/><category term='flash builder'/><category term='disconnecting'/><category term='downloaded'/><category term='HSlider'/><category term='rescue'/><category term='model'/><category term='progress'/><category term='fat'/><category term='binding'/><title type='text'>My Flex and Actionscript 3.0 notes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>36</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-5419503878297680006</id><published>2010-10-29T10:29:00.000-07:00</published><updated>2010-10-29T10:41:04.832-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dns'/><category scheme='http://www.blogger.com/atom/ns#' term='vhost'/><category scheme='http://www.blogger.com/atom/ns#' term='virtual host'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='httpd'/><title type='text'>Remote virtual host testing without a DNS server</title><content type='html'>Assume 184.1.1.1 is the IP of your server.&lt;br /&gt;Assume mywebsite.com is one of the domains your hosting on your server.&lt;br /&gt;&lt;br /&gt;----------------------&lt;br /&gt;- On Local Machine&lt;br /&gt;----------------------&lt;br /&gt;#sudo vi /etc/hosts&lt;br /&gt;Add this to the bottom&lt;br /&gt;&lt;code&gt;&lt;br /&gt;184.1.1.1 mywebsite.testing&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;----------------------&lt;br /&gt;- On Server          &lt;br /&gt;----------------------&lt;br /&gt;#vi /etc/hosts&lt;br /&gt;Add this to the bottom&lt;br /&gt;&lt;code&gt;&lt;br /&gt;184.1.1.1 mywebsite.com mywebsite.testing&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;#vi /etc/httpd/conf.d/vhosts.conf&lt;br /&gt;Add this virtual host entry&lt;br /&gt;&lt;code&gt;&lt;br /&gt;NameVirtualHost *:80&lt;br /&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;        DocumentRoot /var/www/vhosts/mywebsite.com/httpdocs&lt;br /&gt;        ServerName mywebsite.com&lt;br /&gt;        ServerAlias www.mywebsite.com mywebsite.testing&lt;br /&gt;        &lt;br /&gt;       &amp;lt;Directory "/var/www/vhosts/mywebsite.com/httpdocs"&amp;gt;&lt;br /&gt;            Options Indexes FollowSymLinks&lt;br /&gt;            AllowOverride All&lt;br /&gt;            Order allow,deny&lt;br /&gt;            Allow from all&lt;br /&gt;        &amp;lt;/Directory&amp;gt;&lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;#service httpd restart&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You should now be able to put mywebsite.testing in your browser and be&lt;br /&gt;directed to the appropriate vhost.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-5419503878297680006?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/5419503878297680006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=5419503878297680006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/5419503878297680006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/5419503878297680006'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2010/10/remote-virtual-host-testing-without-dns.html' title='Remote virtual host testing without a DNS server'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-6767155102788842725</id><published>2010-08-13T15:04:00.000-07:00</published><updated>2010-08-13T15:12:35.582-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='migration'/><category scheme='http://www.blogger.com/atom/ns#' term='certificate'/><category scheme='http://www.blogger.com/atom/ns#' term='air'/><title type='text'>How to migrate your AIR certificate (Air 2.0)</title><content type='html'>1] Determine your application's current publisher ID. In an installed application, this is found in the package's META-INF/AIR/publisherid file.&lt;br /&gt;&lt;br /&gt;2] Open your application's descriptor file, e.g. My-App.xml and add in:&lt;br /&gt;&amp;lt;publisherID&amp;gt;mypublisheridstringfoundinabovefile&amp;lt;/publisherID&amp;gt;&lt;br /&gt;&lt;br /&gt;3] Export a release build with your new certificate&lt;br /&gt;&lt;br /&gt;4] Run this command to tell adt you are migrating from a old certificate: &lt;br /&gt;#/Applications/Adobe\ Flash\ Builder\ 4/sdks/4.1.0/bin/adt -migrate -storetype pkcs12 -keystore ./src/MYOLDCERT.p12 -storepass MYCERTPASS -keypass MYCERTPASS my-app-v2.air my-app-v2-migrated.air&lt;br /&gt;&lt;br /&gt;Point your application's updater to my-app-v2-migrated.air and it should update fine&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-6767155102788842725?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/6767155102788842725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=6767155102788842725' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/6767155102788842725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/6767155102788842725'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2010/08/how-to-migrate-your-air-certificate-air.html' title='How to migrate your AIR certificate (Air 2.0)'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-1047817224711864797</id><published>2010-08-03T12:18:00.001-07:00</published><updated>2010-08-03T12:22:25.510-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='swf'/><category scheme='http://www.blogger.com/atom/ns#' term='linked'/><category scheme='http://www.blogger.com/atom/ns#' term='containers'/><category scheme='http://www.blogger.com/atom/ns#' term='font'/><category scheme='http://www.blogger.com/atom/ns#' term='spark'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='embed'/><category scheme='http://www.blogger.com/atom/ns#' term='tlf'/><title type='text'>TLF Bugs</title><content type='html'>I recently ran into a couple hard to diagnose TLF bugs, this might help save someone else a couple days of debugging time..&lt;br /&gt;&lt;br /&gt;1] Redraw bug when using Linked Containers&lt;br /&gt;&lt;a href="http://forums.adobe.com/message/2782649#2782649"&gt;http://forums.adobe.com/message/2782649#2782649&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2] Embedded fonts break if your program uses spark text containers&lt;br /&gt;&lt;a href="http://marcel-panse.blogspot.com/2010/03/embedded-fonts-in-tlf-and-swfcontexts.html"&gt;http://marcel-panse.blogspot.com/2010/03/embedded-fonts-in-tlf-and-swfcontexts.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-1047817224711864797?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/1047817224711864797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=1047817224711864797' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/1047817224711864797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/1047817224711864797'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2010/08/tlf-bugs.html' title='TLF Bugs'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-8373784650856997308</id><published>2010-07-29T10:52:00.000-07:00</published><updated>2010-07-29T10:56:00.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flash builder'/><category scheme='http://www.blogger.com/atom/ns#' term='speed up'/><category scheme='http://www.blogger.com/atom/ns#' term='slow'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='optimize'/><title type='text'>Speed up Flash Builder 4 compile times</title><content type='html'>1] If your project has multiple application targets, everytime the project rebuilds it rebuilds every application in your project.  So if you have 4 targets, things can get slow fast.  To remedy this, right click your project, click Properties, goto Flex Applications, and remove the applications your not currently running.  Set the remaining application as default.&lt;br /&gt;&lt;br /&gt;2] If your project has many files, when the project rebuilds it will copy them into the bin-debug folder which could take a long time, Right click your project, click Properties, click Flex Compiler, uncheck Copy non-embedded files to output folder.  You will have to copy files to the bin-debug folder manually if any assets are required.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-8373784650856997308?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/8373784650856997308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=8373784650856997308' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8373784650856997308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8373784650856997308'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2010/07/speed-up-flash-builder-4-compile-times.html' title='Speed up Flash Builder 4 compile times'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-4412394008236115392</id><published>2009-10-24T20:26:00.001-07:00</published><updated>2009-10-24T22:44:14.082-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pagelinks'/><category scheme='http://www.blogger.com/atom/ns#' term='adjacent'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithm'/><category scheme='http://www.blogger.com/atom/ns#' term='pagination'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Pagination pagelinks PHP algorithm</title><content type='html'>If you are making a pagination with adjacent links and are trying to figure out how to find out which number the links should start at, the algorithm below should help.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Case 1&lt;/b&gt;&lt;br /&gt;Not enough pages, just show them all..&lt;br /&gt;if (totalPages &lt; adjacent*2)&lt;br /&gt;[1]-2-3-4&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Case 2&lt;/b&gt;&lt;br /&gt;Almost at start, just start showing from beginning&lt;br /&gt;true when currentPage - adjacent &lt; 1 &lt;br /&gt;1-[2]-3-4-5-6 ..&lt;br /&gt;starti = 1&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Case 3&lt;/b&gt;&lt;br /&gt;Almost reached the end, start showing till reached end&lt;br /&gt;true when currentPage + adjacent &gt; totalPages-1&lt;br /&gt;.. 6-7-8-9-[10]-11&lt;br /&gt;starti = currentPage-adjacent*2+(totalPages-currentPage)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Case 4&lt;/b&gt;&lt;br /&gt;Not close to end or start, show even number of adjacent links on each side&lt;br /&gt;true when none of above cases match&lt;br /&gt;.. 2-3-[4]-5-6 ..&lt;br /&gt;starti = currentPage-adjacent;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;   if ($this-&gt;totalPages &lt;= $this-&gt;adjacent*2) {&lt;br /&gt;    $starti = 1;&lt;br /&gt;    $endi = $this-&gt;totalPages;&lt;br /&gt;   }&lt;br /&gt;   else if ($this-&gt;currentPage - $this-&gt;adjacent &lt; 1) {&lt;br /&gt;    $starti = 1;&lt;br /&gt;    $endi   = $this-&gt;adjacent*2;&lt;br /&gt;   }&lt;br /&gt;   else if ($this-&gt;currentPage + $this-&gt;adjacent &gt; $this-&gt;totalPages-1) {&lt;br /&gt;    $starti = $this-&gt;currentPage - $this-&gt;adjacent*2 + ($this-&gt;totalPages-$this-&gt;currentPage);&lt;br /&gt;    $endi = $this-&gt;totalPages;&lt;br /&gt;   }&lt;br /&gt;   else {&lt;br /&gt;    $starti = $this-&gt;currentPage - $this-&gt;adjacent;&lt;br /&gt;    $endi   = $this-&gt;currentPage + $this-&gt;adjacent;&lt;br /&gt;   }&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-4412394008236115392?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/4412394008236115392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=4412394008236115392' title='25 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4412394008236115392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4412394008236115392'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/10/pagination-pagelinks-php-algorithm.html' title='Pagination pagelinks PHP algorithm'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-61202712775134741</id><published>2009-10-21T12:11:00.000-07:00</published><updated>2009-10-21T13:29:00.265-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rsl'/><category scheme='http://www.blogger.com/atom/ns#' term='modulebase'/><category scheme='http://www.blogger.com/atom/ns#' term='sdk'/><category scheme='http://www.blogger.com/atom/ns#' term='beta'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='2'/><title type='text'>Flash Builder Beta 2</title><content type='html'>Adobe... who's &lt;u&gt;stupid&lt;/u&gt; idea was it to force users to "upgrade" to Beta 2?&lt;br /&gt;&lt;br /&gt;If you've been getting this error trying to load a style SWF:&lt;br /&gt;VerifyError: Error #1014: Class mx.modules::ModuleBase could not be found.&lt;br /&gt;&lt;br /&gt; at flash.display::MovieClip/nextFrame()&lt;br /&gt; at mx.core::FlexModuleFactory/deferredNextFrame()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:574]&lt;br /&gt; at mx.core::FlexModuleFactory/update()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:402]&lt;br /&gt; at mx.core::FlexModuleFactory/moduleCompleteHandler()[E:\dev\gumbo_beta2\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:652]&lt;br /&gt;&lt;br /&gt;1] right click the project that contains the CSS file your compiling&lt;br /&gt;2] goto Flex Build Path&lt;br /&gt;3] Change framework linkage to merged&lt;br /&gt;4] Click on the Flex 4.0.0 build path and Remove it&lt;br /&gt;5] Click Add Flex SDK to readd it&lt;br /&gt;6] Click ok to exit and re-clean your project&lt;br /&gt;&lt;br /&gt;Hopefully this will fix your compiler bug.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-61202712775134741?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/61202712775134741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=61202712775134741' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/61202712775134741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/61202712775134741'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/10/flash-builder-beta-2.html' title='Flash Builder Beta 2'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-6938530973389652537</id><published>2009-10-14T12:59:00.000-07:00</published><updated>2009-10-14T13:03:45.927-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='whos'/><category scheme='http://www.blogger.com/atom/ns#' term='online'/><category scheme='http://www.blogger.com/atom/ns#' term='Zend_Session_SaveHandler_DbTable'/><category scheme='http://www.blogger.com/atom/ns#' term='Zend'/><category scheme='http://www.blogger.com/atom/ns#' term='session'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Making a whos online script with Zend_Session_SaveHandler_DbTable</title><content type='html'>&lt;b&gt;1]&lt;/b&gt; fetch rows from zend_session table where modifiedtime &gt; time()-900&lt;br /&gt;&lt;b&gt;2]&lt;/b&gt; unserialize the data column using this function&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function DecodeSession($sess_string)&lt;br /&gt;{&lt;br /&gt;    // save current session data&lt;br /&gt;    //   and flush $_SESSION array&lt;br /&gt;    $old = $_SESSION;&lt;br /&gt;    $_SESSION = array();&lt;br /&gt;&lt;br /&gt;    // try to decode passed string&lt;br /&gt;    $ret = session_decode($sess_string);&lt;br /&gt;    if (!$ret) {&lt;br /&gt;        // if passed string is not session data,&lt;br /&gt;        //   retrieve saved (old) session data&lt;br /&gt;        //   and return false&lt;br /&gt;        $_SESSION = array();&lt;br /&gt;        $_SESSION = $old;&lt;br /&gt;&lt;br /&gt;        return false;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // save decoded session data to sess_array&lt;br /&gt;    //   and flush $_SESSION array&lt;br /&gt;    $sess_array = $_SESSION;&lt;br /&gt;    $_SESSION = array();&lt;br /&gt;&lt;br /&gt;    // restore old session data&lt;br /&gt;    $_SESSION = $old;&lt;br /&gt;&lt;br /&gt;    // return decoded session data&lt;br /&gt;    return $sess_array;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;b&gt;3]&lt;/b&gt; print out the username which should be stored in the session data, it'll look&lt;br /&gt;something like&lt;br /&gt;echo $session['data']['Namespace']['user']['username'];&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-6938530973389652537?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/6938530973389652537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=6938530973389652537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/6938530973389652537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/6938530973389652537'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/10/making-whos-online-script-with.html' title='Making a whos online script with Zend_Session_SaveHandler_DbTable'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-8689035873046670856</id><published>2009-10-03T20:19:00.000-07:00</published><updated>2009-10-03T23:19:53.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memcache'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>osx leopard install apache mysql memcache php memcache</title><content type='html'>1] install ports (similar to fedora's yum)&lt;br /&gt;http://www.macports.org/&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Memcached&lt;/h4&gt;&lt;br /&gt;2] #sudo port install memcached libmemcached&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;PHP&lt;/h4&gt;&lt;br /&gt;3] #sudo port install php5-memcache&lt;br /&gt;4] #sudo port install php5-mysql&lt;br /&gt;5] #vi /opt/local/etc/php5/php.ini &lt;br /&gt;make sure socket location is /tmp/mysql.sock&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Apache&lt;/h4&gt;&lt;br /&gt;6] #cd /opt/local/apache2/modules&lt;br /&gt;   #sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so&lt;br /&gt;   [activating module 'php5' in /opt/local/apache2/conf/httpd.conf] &lt;br /&gt;7] #vi /opt/local/apache2/conf/httpd.conf&lt;br /&gt;add these lines:&lt;br /&gt;AddType application/x-httpd-php .php&lt;br /&gt;AddType application/x-httpd-php-source .phps&lt;br /&gt;&lt;br /&gt;find line: DirectoryIndex and append index.php to line&lt;br /&gt;&lt;br /&gt;8] #vi ~/.profile&lt;br /&gt;Add this line:&lt;br /&gt;alias httpdstart='sudo /opt/local/apache2/bin/apachectl start'&lt;br /&gt;alias httpdstop='sudo /opt/local/apache2/bin/apachectl stop'&lt;br /&gt;&lt;br /&gt;8b] autostart&lt;br /&gt;#sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist&lt;br /&gt;&lt;br /&gt;9] #source ~/.profile&lt;br /&gt;10] apachectl start&lt;br /&gt;&lt;br /&gt;11] check your http://localhost&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;MYSQL&lt;/h4&gt;&lt;br /&gt;12] #sudo port install mysql5-server&lt;br /&gt;&lt;br /&gt;follow directions to setup new database&lt;br /&gt;if server is not starting move /etc/my.cnf to /etc/my.cnf.old&lt;br /&gt;13] autostart mysql&lt;br /&gt;#sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist&lt;br /&gt;14] edit /etc/my.cnf change socket location to /tmp/mysql.sock&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;PHPMyadmin&lt;/h4&gt;&lt;br /&gt;15] #sudo port install phpmyadmin&lt;br /&gt;Update Apache’s httpd.conf file to find phpmyadmin. First add the following lines to the end of the file:&lt;br /&gt;&lt;br /&gt;# Local access to phpmyadmin installation&lt;br /&gt;Include conf/extra/httpd-phpmyadmin.conf&lt;br /&gt;&lt;br /&gt;and then create a file /opt/local/apache2/conf/extra/httpd-phpmyadmin.conf containing this text:&lt;br /&gt;&lt;br /&gt;AliasMatch ^/phpmyadmin(?:/)?(/.*)?$ "/opt/local/www/phpmyadmin$1"&lt;br /&gt;&lt;br /&gt;&lt;Directory "/opt/local/www/phpmyadmin"&gt;&lt;br /&gt;  Options -Indexes&lt;br /&gt;  AllowOverride None&lt;br /&gt;  Order allow,deny&lt;br /&gt;  Allow from all&lt;br /&gt;  &lt;br /&gt;  LanguagePriority en de es fr ja ko pt-br ru &lt;br /&gt;  ForceLanguagePriority Prefer Fallback&lt;br /&gt;&lt;/Directory&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;other:&lt;br /&gt;http://trac.macports.org/wiki/howto/MAMP&lt;br /&gt;http://2tbsp.com/content/install_apache_2_and_php_5_macports&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-8689035873046670856?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/8689035873046670856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=8689035873046670856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8689035873046670856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8689035873046670856'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/10/osx-leopard-install-apache-memcache-php.html' title='osx leopard install apache mysql memcache php memcache'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-8087209995531721104</id><published>2009-10-02T15:04:00.000-07:00</published><updated>2009-10-02T15:05:20.122-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='iso'/><title type='text'>OSX make iso shell script</title><content type='html'>Makes a ISO file while removing .DS_Store files&lt;br /&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;#echo $1 $2&lt;br /&gt;find "$2" -name .DS_Store -exec rm -rf {} \;&lt;br /&gt;hdiutil makehybrid -o "$1" "$2"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-8087209995531721104?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/8087209995531721104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=8087209995531721104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8087209995531721104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8087209995531721104'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/10/osx-make-iso-shell-script.html' title='OSX make iso shell script'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-4725867934471506084</id><published>2009-09-28T21:30:00.000-07:00</published><updated>2009-09-28T21:45:47.537-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='router'/><category scheme='http://www.blogger.com/atom/ns#' term='fios'/><category scheme='http://www.blogger.com/atom/ns#' term='reboot'/><category scheme='http://www.blogger.com/atom/ns#' term='pixelation'/><category scheme='http://www.blogger.com/atom/ns#' term='on demand'/><category scheme='http://www.blogger.com/atom/ns#' term='internet'/><category scheme='http://www.blogger.com/atom/ns#' term='ont'/><title type='text'>FIOS reboot ONT</title><content type='html'>I was having trouble with my FIOS ON DEMAND being choppy pixelated and my FIOS internet dropping the connection frequently.  Several calls to Verizon support yielded absolutely nothing (TERRIBLE).  &lt;br /&gt;&lt;br /&gt;I hard reloaded the router, changed the cables, and splitters. NOTHING.&lt;br /&gt;&lt;br /&gt;After looking around on the internet to see what else could cause this, I found out it could be the ONT which tech support never even mentions, not to mention the fact that they wouldn't even send a technician out to come check it.  Turns out a cold reboot (removing power to the ONT while temporarily disabling battery power) was the cure to both problems.&lt;br /&gt;&lt;br /&gt;Follow this guide if you want to give it a try:&lt;br /&gt;      •Disconnect the AC from the Power Supply Unit (PSU).&lt;br /&gt;      •Remove one lead from the battery in the Battery Backup Unit (BBU).&lt;br /&gt;      •Wait one minute.&lt;br /&gt;      •Reconnect the battery lead.&lt;br /&gt;      •Reconnect AC to the PSU.&lt;br /&gt;taken from: http://www.dslreports.com/faq/16357&lt;br /&gt;&lt;br /&gt;The top cover can be opened on the left side.  The battery lead looks similar to a PSU's 4 pin connectors, it's on the left of the battery connected to the red wire.&lt;br /&gt;&lt;br /&gt;Hope this information helps you, but do anything at your own risk, I take no responsibility for this information.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-4725867934471506084?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/4725867934471506084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=4725867934471506084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4725867934471506084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4725867934471506084'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/09/fios-reboot-ont.html' title='FIOS reboot ONT'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-4048236271011634542</id><published>2009-06-25T21:22:00.001-07:00</published><updated>2009-06-25T21:28:55.735-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mdadm'/><category scheme='http://www.blogger.com/atom/ns#' term='image'/><category scheme='http://www.blogger.com/atom/ns#' term='dd'/><category scheme='http://www.blogger.com/atom/ns#' term='raid'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='rescue'/><title type='text'>Backing up your boot drive on Fedora with dd</title><content type='html'>This is especially useful for people whose installation have a boot partition and software raid partition on the same drive.&lt;br /&gt;Example Installation:&lt;br /&gt;/dev/sda1 /boot&lt;br /&gt;/dev/sda2 swap&lt;br /&gt;/dev/sda3 raid member &lt;br /&gt;&lt;br /&gt;/dev/sdb1 raid member&lt;br /&gt;&lt;br /&gt;/dev/md0 / devices=/dev/sda3,/dev/sdb1&lt;br /&gt;&lt;br /&gt;If your boot drive fails, your computer will be unable to boot.  Here, I will explain&lt;br /&gt;how to backup the boot drive so you can get it up and running very quickly again.&lt;br /&gt;&lt;br /&gt;--------------------------&lt;br /&gt;  BACKUP PROCEDURE&lt;br /&gt;--------------------------&lt;br /&gt;1] Use dd to save the first 512 bytes of data which contain the drive's MBR (master boot record) and partition info. &lt;br /&gt;# dd if=/dev/sda of=/backup/dd/sda-mbr.img bs=512 count=1&lt;br /&gt;&lt;br /&gt;2] Use dd to image the partition containing the boot files(#fdisk says /dev/sda1 contains /boot in my case) as well.&lt;br /&gt;# dd if=/dev/sda1 of=/backup/dd/sda1.img bs=64K&lt;br /&gt;&lt;br /&gt;--------------------------&lt;br /&gt;  RESTORE PROCEDURE&lt;br /&gt;--------------------------&lt;br /&gt;1] Boot with fedora rescue CD&lt;br /&gt;&lt;br /&gt;2] First we have to restore our RAID device.&lt;br /&gt;#echo DEVICE partitions &gt; /etc/mdadm.conf&lt;br /&gt;#mdadm --examine --scan &gt;&gt; /etc/mdadm.conf&lt;br /&gt;#mdadm --assemble --scan /dev/md0&lt;br /&gt;&lt;br /&gt;3] Now we have to mount it somewhere&lt;br /&gt;#mkdir /mnt/sysimage&lt;br /&gt;#mount /dev/md0 /mnt/sysimage&lt;br /&gt;&lt;br /&gt;4] Restore the MBR and partition info to /dev/sda first.&lt;br /&gt;# dd if=/mnt/sysimage/backup/dd/sda-mbr.img of=/dev/sda&lt;br /&gt;Confirm partitions were restored&lt;br /&gt;# fdisk -l&lt;br /&gt;&lt;br /&gt;5] Restore the partition containing the boot files.&lt;br /&gt;# dd if=/mnt/sysimage/backup/dd/sda1.img of=/dev/sda1&lt;br /&gt;Confirm boot files were restored&lt;br /&gt;#mkdir /boot&lt;br /&gt;#mount /dev/sda1 /boot&lt;br /&gt;#ls /boot&lt;br /&gt;&lt;br /&gt;6] The boot drive should be good now, it's time to see if it works.&lt;br /&gt;#reboot&lt;br /&gt;&lt;br /&gt;7] If your OS boots, it's time to re-add the raid member to the array.&lt;br /&gt;#mdadm --manage /dev/md0 --add /dev/sda3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-4048236271011634542?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/4048236271011634542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=4048236271011634542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4048236271011634542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4048236271011634542'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/06/backing-up-your-boot-drive-on-fedora.html' title='Backing up your boot drive on Fedora with dd'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-6761804982648411948</id><published>2009-05-11T08:08:00.001-07:00</published><updated>2009-05-11T08:40:25.871-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='comparison'/><category scheme='http://www.blogger.com/atom/ns#' term='Cairngorm'/><category scheme='http://www.blogger.com/atom/ns#' term='Actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='framework'/><category scheme='http://www.blogger.com/atom/ns#' term='PureMVC'/><title type='text'>PureMVC vs Cairngorm framework comparison</title><content type='html'>Reasons to use PureMVC over Cairngorm.&lt;br /&gt;&lt;br /&gt;#1 IMO if your gonna use Cairngorm your better off just going ahead and skipping every framework concept and just making classes with static (global) variables.  That's what it feels like to me anyway lol. &lt;br /&gt;&lt;br /&gt;#2 &lt;b&gt;Makes it too easy for you to be sloppy&lt;/b&gt;.  Accessing your model locator everywhere in your app can get ugly fast.  PureMVC has a very structured but flexible way to code.  Once you get comfortable with PureMVC, you will be able to get up to speed in other projects coded with PureMVC much quicker than Cairngorm coded projects.&lt;br /&gt;&lt;br /&gt;#3 If your just starting to try to learn Cairngorm and find it confusing, it's cause &lt;b&gt;you can't make sense of something that doesn't make sense!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;#4 It's difficult to make a modular program in Cairngorm.  Since the controller/models are singletons only one instance can exist (thus only one instance of the application).  There are ways to get it to work, but you're gonna have to think outside the box for that.. &lt;br /&gt;&lt;b&gt;PureMVC Multicore provides a framework for creating modular applications right out of the box.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;#5 PureMVC utilities.  &lt;b&gt;The PureMVC community has added more capabilities on top of the PureMVC framework such as Undo/Redo (works great BTW), Pipes, etc.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;#6 Scalability.  It just gets way too messy trying to make a complex Cairngorm application.  It can especially happen if you're just beginning at it or have been coding lazily.  &lt;b&gt;Because coding in PureMVC is much more structured, you won't be held back in the late game.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;#7 PureMVC is fun to program in.  Cairngorm is a nightmare :P&lt;br /&gt;&lt;br /&gt;#8 &lt;b&gt;Views can actually be reused in PureMVC.&lt;/b&gt;  It's hard to do this in Cairngorm with all the views accessing directly to the global variables in the models.  The reason PureMVC can decouple the view from the model is it has something called Mediators which take care of displaying and interaction in the views.&lt;br /&gt;&lt;br /&gt;#9 Cairngorm is Adobe's official framework, and Adobe has been pissing me off lately with all the bugs I keep running into :P&lt;br /&gt;&lt;br /&gt;p.s. Sorry for the long rant :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-6761804982648411948?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/6761804982648411948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=6761804982648411948' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/6761804982648411948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/6761804982648411948'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/05/puremvc-vs-cairngorm.html' title='PureMVC vs Cairngorm framework comparison'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-9008857819742260634</id><published>2009-05-01T15:15:00.000-07:00</published><updated>2009-05-01T15:22:15.639-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scrubber'/><category scheme='http://www.blogger.com/atom/ns#' term='percent'/><category scheme='http://www.blogger.com/atom/ns#' term='progress'/><category scheme='http://www.blogger.com/atom/ns#' term='downloaded'/><category scheme='http://www.blogger.com/atom/ns#' term='HSlider'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='VideoDisplay'/><category scheme='http://www.blogger.com/atom/ns#' term='showHighlightTrack'/><title type='text'>HSlider as scrubber bar showing percent downloaded</title><content type='html'>If you are making a simple video component with VideoDisplay and want&lt;br /&gt;to use the HSlider as the scrubber bar, you might run into the problem&lt;br /&gt;of trying to display the % of the video that has been downloaded.&lt;br /&gt;&lt;br /&gt;We can use HSlider's showHighlightTrack property for that.  But &lt;br /&gt;first we have to figure out how we can set it programmatically.&lt;br /&gt;&lt;br /&gt;Heres how:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;package com.flexas3.components&lt;br /&gt;{&lt;br /&gt; import mx.controls.HSlider;&lt;br /&gt; import mx.core.Container;&lt;br /&gt; import mx.core.IFlexDisplayObject;&lt;br /&gt; import mx.core.mx_internal;&lt;br /&gt; import mx.styles.ISimpleStyleClient;&lt;br /&gt; &lt;br /&gt; use namespace mx_internal;&lt;br /&gt; public class HSliderProgress extends HSlider&lt;br /&gt; {&lt;br /&gt;  [Bindable]&lt;br /&gt;  private var _progress:Number = 0;&lt;br /&gt;  public function get progress():Number {&lt;br /&gt;   return _progress;&lt;br /&gt;  }&lt;br /&gt;  // 0-1&lt;br /&gt;  public function set progress(o:Number):void {&lt;br /&gt;   if (o &lt; 0) o = 0;&lt;br /&gt;   if (o &gt; 1) o = 1;&lt;br /&gt;   _progress = o;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;   &lt;br /&gt;     /**&lt;br /&gt;      *  @private&lt;br /&gt;      */&lt;br /&gt;     override mx_internal function drawTrackHighlight():void&lt;br /&gt;     {&lt;br /&gt;      var track:IFlexDisplayObject = innerSlider.getChildAt(0) as IFlexDisplayObject;&lt;br /&gt;      var highlightTrack:IFlexDisplayObject = innerSlider.getChildAt(1) as IFlexDisplayObject;&lt;br /&gt;      &lt;br /&gt;         if (track &amp;&amp; highlightTrack)&lt;br /&gt;         {&lt;br /&gt;             var xPos:Number;&lt;br /&gt;             var tWidth:Number;&lt;br /&gt; &lt;br /&gt;                xPos = track.x;&lt;br /&gt;                // minus xPos is the right side offset&lt;br /&gt;                tWidth = track.width*progress;&lt;br /&gt;            //trace('track.width', track.width, 'tWidth', tWidth);&lt;br /&gt;             highlightTrack.move(xPos, track.y + 1);&lt;br /&gt;             highlightTrack.setActualSize(tWidth &gt; 0 ? tWidth : 0, highlightTrack.height);&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;When you instantiate the HSliderProgress make sure to set&lt;br /&gt;showHighlightTrack="true".  &lt;br /&gt;&lt;br /&gt;Also, as you get your video net_status updated just bind the&lt;br /&gt;bytesLoaded/bytesTotal to the progress property.  &lt;br /&gt;&lt;br /&gt;Also one nice thing is that you can style it the way you'd normally style HSlider with Flex skinning.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-9008857819742260634?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/9008857819742260634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=9008857819742260634' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/9008857819742260634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/9008857819742260634'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/05/hslider-as-scrubber-bar-showing-percent.html' title='HSlider as scrubber bar showing percent downloaded'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-8093435232958774376</id><published>2009-01-19T11:57:00.000-08:00</published><updated>2009-01-19T21:01:48.563-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zend'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugger'/><category scheme='http://www.blogger.com/atom/ns#' term='studio'/><category scheme='http://www.blogger.com/atom/ns#' term='xampp'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Getting Zend Debugger to work with XAMPP Leopard with Zend Studio</title><content type='html'>1] Copy the Zend Debugger PHP Extension from Zend Studio to your webserver's PHP extension dir.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#cp '/Applications/Zend/Zend Studio for Eclipse - 6.1.0/plugins/org.zend.php.debug.debugger.macosx_5.2.14.v20080602/resources/php5/ZendDebugger.so' /Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613/ZendDebugger.so&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2]  edit XAMPP's php.ini to include the extension (#sudo mate /Applications/xampp/etc/php.ini)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;;extension=ZendDebugger.so&lt;br /&gt;zend_extension=/Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613/ZendDebugger.so&lt;br /&gt;zend_debugger.allow_hosts=127.0.0.1&lt;br /&gt;zend_debugger.expose_remotely=always&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-8093435232958774376?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/8093435232958774376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=8093435232958774376' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8093435232958774376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8093435232958774376'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/01/getting-zend-debugger-to-work-with.html' title='Getting Zend Debugger to work with XAMPP Leopard with Zend Studio'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-5364078094548491633</id><published>2009-01-18T14:11:00.000-08:00</published><updated>2009-01-19T00:55:23.226-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zend_Test_PHPUnit_ControllerTestCase'/><category scheme='http://www.blogger.com/atom/ns#' term='Zend'/><category scheme='http://www.blogger.com/atom/ns#' term='framework'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='leopard'/><category scheme='http://www.blogger.com/atom/ns#' term='unit'/><title type='text'>Getting started with Unit Testing in your Zend Framework application Leopard</title><content type='html'>Hello, this guide is for someone who has no idea how to get started writing unit tests inside the Zend Framework application.  I don't claim this to be the right way to do it, but its a step in the right direction for me.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step 1] Install &lt;a href="http://pear.php.net/"&gt;pear&lt;/a&gt; and &lt;a href="http://www.phpunit.de/manual/current/en/installation.html"&gt;PHPUnit&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Here are the steps I used in Leopard.&lt;br /&gt;&lt;br /&gt;First install PEAR:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#cd /tmp&lt;br /&gt;#curl http://pear.php.net/go-pear &gt; go-pear.php&lt;br /&gt;&lt;br /&gt;#sudo php -q go-pear.php&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;press enter, choose option 1 the prefix directory as "/usr/local"  this will install the pear executable to /usr/local/bin/ and the PEAR files to /usr/local/PEAR&lt;br /&gt;&lt;br /&gt;After the install finishes try typing:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#pear&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If it doesn't work, the install failed or the $PATH variable doesn't include the /usr/local/bin dir.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next, install PHPUnit using pear:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#sudo pear channel-discover pear.phpunit.de&lt;br /&gt;#sudo pear install phpunit/PHPUnit&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;If it gives you any warnings about folder permissions you might have to do something like #sudo chmod 777 the temp dir or wherever its complaining about.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once pear installs PHPUnit try running it in the commandline&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#phpunit&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It should run ok. If you get any warnings you will have to look at your php config file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If your php.ini isnt located in /etc/php.ini you'll have to create a symbolic link as such.  For example, I develop using XAMPP so my php config is in /Applications/xampp/etc/php.ini.&lt;br /&gt;  &lt;br /&gt;&lt;code&gt;&lt;br /&gt;#ln -s /Applications/xampp/etc/php.ini /etc/php.ini&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Next edit /etc/php.ini to make sure the include_path to PHPUnit is correct&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#sudo mate /etc/php.ini&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Mine looks something like this.&lt;br /&gt;include_path = ".:/php/includes:/usr/local/PEAR:/usr/local/PEAR/PHPUnit"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Try running PHPUnit again in the command line.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#phpunit&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If it doesn't give any warnings, move on to step 2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step 2] Create the /tests and /tests/myapp folders.&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Your Zend project structure should look something like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/myapp/&lt;br /&gt;/myapp/application/&lt;br /&gt;/myapp/application/controllers/&lt;br /&gt;/myapp/application/models/&lt;br /&gt;/myapp/application/views/&lt;br /&gt;/myapp/application/views/scripts/&lt;br /&gt;/myapp/library/&lt;br /&gt;/myapp/library/Zend/&lt;br /&gt;/myapp/tests/&lt;br /&gt;/myapp/tests/myapp/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step 3] Create the /myapp/application/controllers/IndexControllerTest.php file&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;This file is to test the IndexController.  &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;class MyApp_public_IndexControllerTest extends Zend_Test_PHPUnit_ControllerTestCase&lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;    public function setUp()&lt;br /&gt;    {&lt;br /&gt;        $this-&gt;bootstrap = APPLICATION_PATH . '/bootstrap.php';&lt;br /&gt;        parent::setUp();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * Tests FooController-&gt;barAction()&lt;br /&gt;  */&lt;br /&gt; public function testIndexAction() &lt;br /&gt; {&lt;br /&gt;  // TODO Auto-generated FooControllerTest-&gt;testBarAction()&lt;br /&gt;  &lt;br /&gt;  $this-&gt;dispatch ( '/index/index' );&lt;br /&gt;  $this-&gt;assertController ( 'index' );&lt;br /&gt;  $this-&gt;assertAction ( 'index' );&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step 4] Create the /myapp/tests/myapp/AllTests.php file&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application/'));&lt;br /&gt;&lt;br /&gt;set_include_path(&lt;br /&gt;    APPLICATION_PATH.'/../library' &lt;br /&gt;    . PATH_SEPARATOR . get_include_path()&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if (!defined('PHPUnit_MAIN_METHOD')) {&lt;br /&gt;    define('PHPUnit_MAIN_METHOD', 'MyApp_AllTests::main');&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;require_once('Zend/Test/PHPUnit/ControllerTestCase.php');&lt;br /&gt;&lt;br /&gt;require_once APPLICATION_PATH . 'controllers/IndexControllerTest.php';&lt;br /&gt;&lt;br /&gt;class MyApp_AllTests&lt;br /&gt;{&lt;br /&gt;    public static function main()&lt;br /&gt;    {&lt;br /&gt;        PHPUnit_TextUI_TestRunner::run(self::suite());&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static function suite()&lt;br /&gt;    {&lt;br /&gt;        $suite = new PHPUnit_Framework_TestSuite('All Tests - MyApp');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        $suite-&gt;addTestSuite('MyApp_public_IndexControllerTest');&lt;br /&gt;&lt;br /&gt;        return $suite;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (PHPUnit_MAIN_METHOD == 'MyApp_AllTests::main') &lt;br /&gt;{&lt;br /&gt;    MyApp_AllTests::main();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step 5] Run AllTests.php&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Open the terminal and navigate to the folder where you created AllTests.php&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;#cd XYZ/myapp/tests/myapp/&lt;br /&gt;#phpunit AllTests.php&lt;br /&gt;&lt;br /&gt;PHPUnit 3.3.10 by Sebastian Bergmann.&lt;br /&gt;&lt;br /&gt;.&lt;br /&gt;&lt;br /&gt;Time: 0 seconds&lt;br /&gt;&lt;br /&gt;OK (1 test, 2 assertions)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope this started you off okay.  Goodluck!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;P.S.&lt;br /&gt;&lt;br /&gt;Leopard's included PHP does not have PDO_Mysql included by default.&lt;br /&gt;In your Zend_Config_Ini you can use mysqli instead.&lt;br /&gt;&lt;br /&gt;Example /application/config/app.ini&lt;br /&gt;&lt;code&gt;&lt;br /&gt;[production]&lt;br /&gt;webhost                  = www.awebsite.com&lt;br /&gt;database.adapter         = pdo_mysql&lt;br /&gt;database.params.host     = localhost&lt;br /&gt;database.params.username = auser&lt;br /&gt;database.params.password = apassword&lt;br /&gt;database.params.dbname   = adatabase&lt;br /&gt;&lt;br /&gt;[development : production]&lt;br /&gt;&lt;br /&gt;[testing : production]&lt;br /&gt;database.params.dbname   = adatabase&lt;br /&gt;#leopard's compiled php doesn't have PDO_MYSQL&lt;br /&gt;database.adapter         = mysqli&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-5364078094548491633?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/5364078094548491633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=5364078094548491633' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/5364078094548491633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/5364078094548491633'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/01/getting-started-with-unit-testing-in.html' title='Getting started with Unit Testing in your Zend Framework application Leopard'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-368559451858714256</id><published>2009-01-15T14:17:00.000-08:00</published><updated>2009-01-15T14:34:53.014-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trac'/><category scheme='http://www.blogger.com/atom/ns#' term='plesk'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_python'/><title type='text'>Setting up Trac with Plesk</title><content type='html'>If your running a Plesk server and want to get trac running with mod_python, heres what I did to get them running nicely.&lt;br /&gt;&lt;br /&gt;This tutorial assumes you have already installed Subversion, Trac, and that running your Trac daemon was successful.&lt;br /&gt;&lt;pre&gt;&lt;b&gt;&lt;br /&gt;Setup the trac subdomain in plesk:&lt;/b&gt;&lt;br /&gt;1] Create a subdomain 'trac'&lt;br /&gt;2] &lt;b&gt;important: &lt;/b&gt;make sure python is unchecked-&gt;DISABLED (wierd i know!)&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;&lt;br /&gt;Creating a new project:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#trac-admin /disk1/trac/mynewproject initenv&lt;br /&gt;#mkdir /disk1/trac/mynewproject/.egg-cache&lt;br /&gt;#chmod 777 /disk1/trac/mynewproject/.egg-cache&lt;br /&gt;#chmod -R 777 /disk1/trac/mynewproject/db&lt;br /&gt;#chmod -R 777 /disk1/trac/mynewproject/attachments&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Adding a new user:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#htpasswd /disk1/trac/.htpasswd mynewusername&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Editing user permissions:&lt;br /&gt;http://trac.edgewall.org/wiki/TracPermissions&lt;br /&gt;&lt;/b&gt;If there are no trac admins yet, you must create one in the shell&lt;br /&gt;an example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#trac-admin /disk1/trac/myproject permission remove anonymous BROWSER_VIEW&lt;br /&gt;#trac-admin /disk1/trac/myproject permission add auser TRAC_ADMIN&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Editing trac vhost file:&lt;/b&gt;&lt;br /&gt;Please note the PythonPath, your may be different. try typing #find -name trac to find the folder thats similar to mine.&lt;br /&gt;&lt;br /&gt;#emacs /var/www/vhosts/yourdomain.com/subdomains/trac/conf/vhost.conf for the new location&lt;br /&gt;example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;location "/mynewproject"&amp;gt;&lt;br /&gt;#        SetHandler mod_python&lt;br /&gt;   SetHandler python-program&lt;br /&gt;#        PythonDebug on&lt;br /&gt;   PythonPath "['/usr/lib/python2.4/site-packages/'] + sys.path"&lt;br /&gt;   PythonInterpreter main_interpreter&lt;br /&gt;   PythonHandler trac.web.modpython_frontend&lt;br /&gt;   PythonOption TracEnv /disk1/trac/mynewproject&lt;br /&gt;   PythonOption TracUriRoot /mynewproject&lt;br /&gt;&amp;lt;/location&amp;gt;&lt;br /&gt;&amp;lt;location "/mynewproject/login"&amp;gt;&lt;br /&gt;   AuthType Basic&lt;br /&gt;   AuthName "WillInteractive Trac Server"&lt;br /&gt;   AuthUserFile /disk1/trac/.htpasswd&lt;br /&gt;   Require valid-user&lt;br /&gt;&amp;lt;/location&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Restart your apache server&lt;/b&gt;&lt;br /&gt;&lt;code&gt;#service httpd restart&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Next try to access it in your browser at:&lt;br /&gt;http://yourdomain.com/mynewproject&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-368559451858714256?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/368559451858714256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=368559451858714256' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/368559451858714256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/368559451858714256'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/01/setting-up-trac-with-plesk.html' title='Setting up Trac with Plesk'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-5732238192864162156</id><published>2009-01-12T16:38:00.000-08:00</published><updated>2009-01-12T16:53:43.263-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='deepa'/><category scheme='http://www.blogger.com/atom/ns#' term='speed'/><category scheme='http://www.blogger.com/atom/ns#' term='racetrack'/><category scheme='http://www.blogger.com/atom/ns#' term='lifecycle'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='adobe'/><category scheme='http://www.blogger.com/atom/ns#' term='component'/><title type='text'>Improving performance in your Flex Applications</title><content type='html'>Do you understand a day in the life of a Flex component (creation, initialization, invalidation/validation)?  Have you heard of how Flex components have to run around this "&lt;a href="http://www.onflex.org/ted/2005/07/flash-player-mental-model-elastic.php"&gt;elastic racetrack&lt;/a&gt;" (code execute/render) and how Flex components are structured to run optimally around this racetrack?&lt;br /&gt;&lt;br /&gt;When extending a Flex component you need to know these things in order for your component to achieve the best performance possible.&lt;br /&gt;&lt;br /&gt;Check out this Adobe Max presentation titled "Creating New Components in Flex 3" by Deepa Subramaniam (you wont be disappointed :P):&lt;br /&gt;&lt;a href="http://tv.adobe.com/#vi+f15384v1002"&gt;http://tv.adobe.com/#vi+f15384v1002&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-5732238192864162156?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/5732238192864162156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=5732238192864162156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/5732238192864162156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/5732238192864162156'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2009/01/improving-performance-in-flex.html' title='Improving performance in your Flex Applications'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-2109799426732847869</id><published>2008-09-17T11:33:00.000-07:00</published><updated>2008-09-17T12:45:54.734-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WAMP'/><category scheme='http://www.blogger.com/atom/ns#' term='IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='Zend'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugger'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='PDT'/><category scheme='http://www.blogger.com/atom/ns#' term='Dreamweaver'/><title type='text'>Setup Eclipse PDT a PHP IDE with Zend Debugger easily!</title><content type='html'>So, Dreamweaver was a good editor, but if you have a big PHP project, you will need some more firepower.  I decided to install Eclipse PDT a PHP IDE with the Zend Debugger. I used WAMP as my webserver and firefox as my external browser.&lt;br /&gt;&lt;br /&gt;I haven't used it yet but I have a feeling it will help speed up development :)&lt;br /&gt;&lt;br /&gt;Here are the steps:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1]&lt;/b&gt; Download and install Eclipse PDT 1.0.3 (Release) (example: C:\Program Files\PDT\)&lt;br /&gt;http://download.eclipse.org/tools/pdt/downloads/release.php?release=R20080603&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2]&lt;/b&gt; Download and install WAMP or any server with PHP.&lt;br /&gt;http://www.wampserver.com/en/download.php&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3]&lt;/b&gt; Download and install Zend Debugger (put the ZendDebugger.dll in your C:\wamp\php\ folder)&lt;br /&gt;http://downloads.zend.com/pdt/server-debugger/&lt;br /&gt;Put the dummy.php in your PHP project's webroot.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4]&lt;/b&gt; open up C:\wamp\php\php.ini&lt;br /&gt;change: implicit_flush = Off to implicit_flush = On&lt;br /&gt;change: output_buffering=4096 to output_buffering = Off&lt;br /&gt;at the bottom append:&lt;br /&gt;[Zend]&lt;br /&gt;zend_extension_ts = "C:\wamp\php\ZendDebugger.dll"&lt;br /&gt;zend_debugger.allow_hosts=127.0.0.1/32, 192.168.0.0/255.255.0.0&lt;br /&gt;zend_debugger.expose_remotely=always&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 5]&lt;/b&gt; Install Subclipse by opening PDT goto Help-&gt;Find and Install Updates(optional)&lt;br /&gt;Add remote server with URL: http://subclipse.tigris.org/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------- Extra steps to start debugging with firefox (optional, sorry its a little rough, but these are just general steps) ------------&lt;br /&gt;&lt;b&gt;Step 1]&lt;/b&gt; Start PDT, goto Window-&gt;Preferences-&gt;General-&gt;Web Browser, select use external web browser, select firefox&lt;br /&gt;&lt;b&gt;Step 2]&lt;/b&gt; Make a new project, make a new file called index.php, right click on the file, goto run as, open run as dialog.&lt;br /&gt;&lt;b&gt;Step 3]&lt;/b&gt; Point WAMP to the new project (ex: http://helloworld)&lt;br /&gt;&lt;b&gt;Step 4]&lt;/b&gt; Go back to PDT, under PHP Web Page, create new.  Under Name: write in Test index.php.  Under Server Bugger use: Zend Debugger. On PHP server, make a new one pointing to http://helloworld Under file, manually type in index.php.  URL should be left at auto generate.&lt;br /&gt;&lt;b&gt;Step 5]&lt;/b&gt; Goto the common tab, check Debug and Run under 'display in favorites menu'. Click apply settings.&lt;br /&gt;&lt;b&gt;Step 6]&lt;/b&gt; Edit index.php to do something like echo 'hello world';&lt;br /&gt;&lt;b&gt;Step 7]&lt;/b&gt; At the top toolbar if you click the debug arrow you should see test index.php in your favorites, click it.  Firefox should popup while PDT is connected to the zend debugger.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-2109799426732847869?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/2109799426732847869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=2109799426732847869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/2109799426732847869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/2109799426732847869'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/09/setup-eclipse-pdt-php-ide-with-zend.html' title='Setup Eclipse PDT a PHP IDE with Zend Debugger easily!'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-4813180667090814112</id><published>2008-09-10T16:06:00.000-07:00</published><updated>2008-09-10T16:10:01.248-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='integration'/><category scheme='http://www.blogger.com/atom/ns#' term='controller'/><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><category scheme='http://www.blogger.com/atom/ns#' term='suite'/><category scheme='http://www.blogger.com/atom/ns#' term='model'/><category scheme='http://www.blogger.com/atom/ns#' term='session'/><category scheme='http://www.blogger.com/atom/ns#' term='component'/><title type='text'>CakePHP 1.19 Test Suite testing with Session Component</title><content type='html'>Hello, you might be having a tough time doing some integration testing on your controllers which use the Session component.  Here are is an example to help you get started:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;class Foo_ControllerTest extends UnitTestCase &lt;br /&gt;{&lt;br /&gt; function test1()&lt;br /&gt; {&lt;br /&gt;  &lt;br /&gt;  $usersController = &amp;new UsersController();&lt;br /&gt;  $usersController-&gt;_initComponents();&lt;br /&gt;  $usersController-&gt;constructClasses();&lt;br /&gt;  $this-&gt;assertNotNull($usersController-&gt;Session);&lt;br /&gt;  $usersController-&gt;Session-&gt;_checkValid();&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This creates the model + components in your controller.  The sessions should be working normally now.&lt;br /&gt;&lt;br /&gt;Take at look at this to see how they did unit testing on the Session component itself for more ideas (https://trac.cakephp.org/browser/branches/1.2.x.x/cake/tests/cases/libs/session.test.php?rev=7246).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-4813180667090814112?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/4813180667090814112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=4813180667090814112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4813180667090814112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4813180667090814112'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/09/cakephp-119-test-suite-testing-with.html' title='CakePHP 1.19 Test Suite testing with Session Component'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-4235407637876852094</id><published>2008-09-09T14:15:00.000-07:00</published><updated>2008-09-09T14:19:06.058-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='1.19'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='appmodel'/><title type='text'>cakephp 1.19 AppModel bug?</title><content type='html'>I've been using the $hasMany, $uses, etc properties in the AppModel to simply some of the querying operations.  But it seems like sometimes it randomly deletes rows from some of the tables I've specified in the tables.  Also, I don't always need to use those associations. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've found that loading the model and using it as needed seemed like a better approach and it wasn't deleting data from tables mysteriously anymore..&lt;br /&gt;&lt;br /&gt;To use another model only when you need it do something like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;function amodelmethod()&lt;br /&gt;{&lt;br /&gt;   loadModel('FooModel');&lt;br /&gt;   $fooModel = &amp;new FooModel();&lt;br /&gt;   $fooModel-&gt;fooMethod();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-4235407637876852094?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/4235407637876852094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=4235407637876852094' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4235407637876852094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4235407637876852094'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/09/cakephp-119-appmodel-bug.html' title='cakephp 1.19 AppModel bug?'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-4678705277195802550</id><published>2008-08-25T13:39:00.001-07:00</published><updated>2008-08-25T13:46:15.386-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='remote'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Remote Debugging Flash or Flex Apps using Flex IDE</title><content type='html'>Theres a lot of information about this already, just mentioning it one more time won't hurt:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1]&lt;/strong&gt; Make sure your Flash app is compiled permitting debugging.  If using Flex make sure its not the release compilation.  Lets pretend the compiled program is uploaded to http://blah.com/flashapp/flashapp.html.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2]&lt;/strong&gt; Create a new Flex project, you can name it anything.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3]&lt;/strong&gt; Right click on the new project, goto Properties then Run/Debug Settings.  Make a new configuration with the Debug/Profile/Run path pointing to the application you want to debug, in our case: http://blah.com/flashapp/flashapp.html.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4]&lt;/strong&gt; Click Debug project.  It will pop up the application you want to debug.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5]&lt;/strong&gt; When the window pops up, right click the program.  If you have Flash Debug Player installed, there will be a context menu item called Debugger.  Click this.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;6]&lt;/strong&gt; Tell it you want to connect the debugger to localhost (which your Flex IDE started).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;7]&lt;/strong&gt; Done, you should be able to see trace statements :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-4678705277195802550?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/4678705277195802550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=4678705277195802550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4678705277195802550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4678705277195802550'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/08/remote-debugging-flash-or-flex-apps.html' title='Remote Debugging Flash or Flex Apps using Flex IDE'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-1265135804931398027</id><published>2008-08-13T10:09:00.000-07:00</published><updated>2008-08-13T11:52:43.537-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='1.1'/><category scheme='http://www.blogger.com/atom/ns#' term='1.0.0.5'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='suite'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='group'/><category scheme='http://www.blogger.com/atom/ns#' term='simpletest'/><category scheme='http://www.blogger.com/atom/ns#' term='unit'/><title type='text'>CakePHP 1.1 Unit Testing Test Suite v 1.0.0.5 tutorial</title><content type='html'>So your stuck with CakePHP 1.1, but you need to add Unit Testing, what do you do?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can grab Cake Test Suite v1.0.0.5 (using SimpleTest) &lt;a href="http://cakeforge.org/projects/testsuite/"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The thing with this Test Suite is that I couldn't find documentation anywhere so I decided to write this little tutorial on how to get started.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1: Setup&lt;/strong&gt;&lt;br /&gt;First make sure your CakePHP Project's debug level is set to at least 1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next, after unzipping the app folder into your project and trying to run the test controller(http://yourproject/test/) you might see that you will get this error:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Notice: Use of undefined constant CORE_PATH - assumed 'CORE_PATH' in D:\Flex Workspaces\cakeamfphp\cake\config\paths.php on line 44&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To fix this open up /app/webroot/test/index.php and insert this on line 82:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if (!defined('CORE_PATH')) {&lt;br /&gt; if (function_exists('ini_set')) {&lt;br /&gt;  ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'));&lt;br /&gt;  define('APP_PATH', null);&lt;br /&gt;  define('CORE_PATH', null);&lt;br /&gt; } else {&lt;br /&gt;  define('APP_PATH', ROOT . DS . APP_DIR . DS);&lt;br /&gt;  define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;require CORE_PATH.'cake'.DS.'bootstrap.php';&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2: Writing the Tests&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Lets say for example, I have a model user.php that I want to test, I have to create this file as /app/tests/app/cases/models/User.test.php&lt;br /&gt;&lt;br /&gt;It will look something like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;class UserTest extends UnitTestCase {&lt;br /&gt;&lt;br /&gt; function testSomething() {&lt;br /&gt;  loadModel('User');&lt;br /&gt;  $user = &amp;new User();&lt;br /&gt;  $this-&gt;assertEqual($user-&gt;name, 'User');    &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If testing a controller, you would want to use the loadController method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If I wanted to make a group test of my models I would for example make a file&lt;br /&gt;in app/tests/app/groups/Model.group.php:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;    require_once(TESTS.'/app/cases/models/User.test.php');&lt;br /&gt;    require_once(TESTS.'/app/cases/models/User_Builder.test.php');&lt;br /&gt; &lt;br /&gt;    class ModelTest extends GroupTest {&lt;br /&gt; &lt;br /&gt;  function ModelTest(){&lt;br /&gt;   $this-&gt;addTestCase(new UserTest());&lt;br /&gt;   $this-&gt;addTestCase(new User_BuilderTest());&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps get you on the right track.  Take a look at the &lt;a href="http://www.simpletest.org/en/unit_test_documentation.html"&gt;simpletest docs&lt;/a&gt; for more information on how to unit test your project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-1265135804931398027?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/1265135804931398027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=1265135804931398027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/1265135804931398027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/1265135804931398027'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/08/cakephp-11-unit-testing-test-suite-v.html' title='CakePHP 1.1 Unit Testing Test Suite v 1.0.0.5 tutorial'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-1420956549329109977</id><published>2008-08-11T10:27:00.000-07:00</published><updated>2008-08-11T10:34:35.640-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dispatching'/><category scheme='http://www.blogger.com/atom/ns#' term='itemUpdated'/><category scheme='http://www.blogger.com/atom/ns#' term='arraycollection'/><category scheme='http://www.blogger.com/atom/ns#' term='manually'/><category scheme='http://www.blogger.com/atom/ns#' term='collectionevent'/><title type='text'>Flex ArrayCollection CollectionEvent dispatching class changes</title><content type='html'>Lets say you have a class:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[ArrayElementType("com.my.AwesomeClass")]&lt;br /&gt;private var myAC:ArrayCollection = new ArrayCollection();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;your class is such that sometimes changing a property in AwesomeClass doesn't&lt;br /&gt;make myAC dispatch CollectionEvent.COLLECTION_CHANGE.  An example changing the&lt;br /&gt;property awesomeClass.foo.x.&lt;br /&gt;&lt;br /&gt;To tell myAC that an item is changed use ArrayCollection's itemUpdated method after changing an element in the ArrayCollection.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;myAC.itemUpdated(awesomeClass);&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-1420956549329109977?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/1420956549329109977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=1420956549329109977' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/1420956549329109977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/1420956549329109977'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/08/flex-arraycollection-collectionevent.html' title='Flex ArrayCollection CollectionEvent dispatching class changes'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-842930673034241869</id><published>2008-08-04T13:12:00.000-07:00</published><updated>2008-08-05T08:38:02.932-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='1.1'/><category scheme='http://www.blogger.com/atom/ns#' term='session.use_trans_sid'/><category scheme='http://www.blogger.com/atom/ns#' term='centralized'/><category scheme='http://www.blogger.com/atom/ns#' term='cakeamfphp'/><category scheme='http://www.blogger.com/atom/ns#' term='cookieless'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><category scheme='http://www.blogger.com/atom/ns#' term='sessions'/><title type='text'>Getting CakeAMFPHP w/ CakePHP 1.1 centralized database sessions working</title><content type='html'>CakePHP makes it a snap to create centralized database sessions.&lt;br /&gt;&lt;br /&gt;However, If you wanted to use Flash and CakeAMFPHP with CakePHP's sessions, you'll find that it might not be working.  Here are some fixes+workarounds to get it running.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1]&lt;/b&gt; open /app/vendors/vendors/cakeamfphp/amf-core/app/Gateway.php&lt;br /&gt;comment out line 93&lt;br /&gt;&lt;code&gt;&lt;br /&gt;//$this-&gt;filters['auth'] = 'authenticationFilter';&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The auth filter was breaking the sessions for some reason.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2]&lt;/b&gt; Open /app/config/core.php &lt;br /&gt;change the CAKE_SESSION_SAVE to:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;define('CAKE_SESSION_SAVE', 'database');&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;change CAKE_SESSION_COOKIE to your php cookie sessions name(look in phpinfo()):&lt;br /&gt;for example mine is:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;define('CAKE_SESSION_COOKIE', 'PHPSESSID');&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;change CAKE_SECURITY to low:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;define('CAKE_SECURITY', 'low');&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3]&lt;/b&gt; create the sessions table in your $default(in database.php) database by importing the file at: /app/config/sql/sessions.sql&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4]&lt;/b&gt; open /cake/libs/session.php and comment out:&lt;br /&gt;on line 132:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  /*if (Configure::read('Session.checkAgent') === true) {&lt;br /&gt;   if (env('HTTP_USER_AGENT') != null) {&lt;br /&gt;    $this-&gt;_userAgent = md5(env('HTTP_USER_AGENT') . CAKE_SESSION_STRING);&lt;br /&gt;   }&lt;br /&gt;  }*/&lt;br /&gt;&lt;/code&gt;  &lt;br /&gt;&lt;br /&gt;on line 311:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if (/*Configure::read('Session.checkAgent') === false || $this-&gt;_userAgent == $this-&gt;read("Config.userAgent") &amp;&amp; */$this-&gt;time &lt;= $this-&gt;read("Config.time")) {&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;on line 541:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if (/*Configure::read('Session.checkAgent') === false || $this-&gt;_userAgent == $this-&gt;read("Config.userAgent") &amp;&amp; */$this-&gt;time &lt;= $this-&gt;read("Config.time")) {&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;the useragent works with the browser but we are connecting using flash to amf to for some reason this was breaking.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You are done, try playing around with the Session methods to see if your&lt;br /&gt;sessions are being stored and retrieved from the database.  For a tutorial on CakePHP sessions &lt;a href="http://www.justkez.com/understanding-cakephp-sessions/"&gt;take a look here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;---edit----&lt;br /&gt;still having problems? Try turning off cookies in your cake gateway.&lt;br /&gt;&lt;br /&gt;Open /app/webroot/cake_gateway.php:&lt;br /&gt;&lt;br /&gt;insert this at the top:&lt;br /&gt;&lt;code&gt;&lt;br /&gt; ini_set('session.use_trans_sid', 1);  //make it so we can use cookie-less sessions&lt;br /&gt; ini_set('session.use_cookies', 0);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;open /cake/libs/session.php:&lt;br /&gt;&lt;br /&gt;find all occurences of ini_set('session.use_trans_sid', 0);&lt;br /&gt;and change them to&lt;br /&gt;&lt;code&gt;&lt;br /&gt; ini_set('session.use_trans_sid', 1);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in your delegate when you call the gateway it must pass in a PHPSESSID example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; //cookieless sessions&lt;br /&gt; if (session_id != null) {&lt;br /&gt;  appendurl = '?PHPSESSID='+session_id;&lt;br /&gt; }&lt;br /&gt;   &lt;br /&gt; var gateway:String="http://cakeamfphp/cake_gateway.php"+appendurl;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-842930673034241869?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/842930673034241869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=842930673034241869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/842930673034241869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/842930673034241869'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/08/getting-cakeamfphp-w-cakephp-11.html' title='Getting CakeAMFPHP w/ CakePHP 1.1 centralized database sessions working'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-3276142073385938581</id><published>2008-07-29T12:51:00.000-07:00</published><updated>2008-08-04T13:36:44.055-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='1.1'/><category scheme='http://www.blogger.com/atom/ns#' term='models'/><category scheme='http://www.blogger.com/atom/ns#' term='fat'/><title type='text'>Fat Models</title><content type='html'>no not those models :P CakePHP models :)&lt;br /&gt;&lt;br /&gt;If you find your self doing something like this in the controller:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$this-&gt;A_Model-&gt;query("update somedatabase set idstatus = '".$idstatus."', statuslastmodified = '".time()."' where idproject = '".$idproject."' and UID= '".$UID."'"); &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;consider putting this type of logic as a function in the model and then calling the function.&lt;br /&gt;&lt;br /&gt;Better yet try not to use custom queries if you can and use the model's built in functions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-3276142073385938581?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/3276142073385938581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=3276142073385938581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/3276142073385938581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/3276142073385938581'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/fat-models.html' title='Fat Models'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-3199197988931704108</id><published>2008-07-22T13:34:00.000-07:00</published><updated>2008-08-04T13:32:43.549-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='binding'/><category scheme='http://www.blogger.com/atom/ns#' term='entity'/><category scheme='http://www.blogger.com/atom/ns#' term='conditional'/><category scheme='http://www.blogger.com/atom/ns#' term='name'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>Flex MXML binding The entity name must immediately follow the '&amp;' in the entity reference</title><content type='html'>So your trying to do some mxml binding with conditional logic like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;mx:Button label="Sign In" enabled="{emailTextInput.text != '' &amp;amp;&amp;amp; passwordTextInput.text != '' }" /&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;when you compile you get this error, "The entity name must immediately follow the '&amp;amp;' in the entity reference"&lt;br /&gt;&lt;br /&gt;THe parser looks at the &amp;amp; and expects an entity reference because the &amp;amp;&lt;br /&gt;signifies the start of an entity reference within XML. So how do we tell it that it's actually a condition-AND operator?&lt;br /&gt;&lt;br /&gt;Replace each of the &amp;   '&amp; a m p ;'  &lt;-- no spaces&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Compile, and viola it works!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-3199197988931704108?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/3199197988931704108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=3199197988931704108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/3199197988931704108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/3199197988931704108'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/flex-mxml-binding-entity-name-must.html' title='Flex MXML binding The entity name must immediately follow the &apos;&amp;&apos; in the entity reference'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-1943849092275307886</id><published>2008-07-16T14:20:00.000-07:00</published><updated>2008-08-04T13:33:06.000-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='collection'/><category scheme='http://www.blogger.com/atom/ns#' term='profiler'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='leak'/><category scheme='http://www.blogger.com/atom/ns#' term='Garbage'/><title type='text'>Flex: Is it a memory leak?</title><content type='html'>tutorial how flash garbage collection works: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.adobe.com/aharui/GarbageCollection/GCAtomic.ppt"&gt;http://blogs.adobe.com/aharui/GarbageCollection/GCAtomic.ppt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;heres a couple good quotes from the presentation: &lt;br/&gt;&lt;br /&gt;-The collector is not guaranteed to find all collectible blocks in one pass&lt;br /&gt;Don’t want to interfere with rendering and interaction, Thus memory may never return to the initial point&lt;br/&gt;&lt;br /&gt;-You are generally only concerned about repeatable sequences: Popup dialogs coming and going Modules loading and unloading. If you repeat these sequences often over a long period of time, the amount of totalMemory will hit some maximum value and stay at or below it if you are not leaking memory.&lt;br/&gt;&lt;br /&gt;-Garbage Collection is not predictable  &lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;good tutorial on using the flex profiler:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.peachpit.com/articles/article.aspx?p=1182473&amp;seqNum=2"&gt;http://www.peachpit.com/articles/article.aspx?p=1182473&amp;seqNum=2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-1943849092275307886?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/1943849092275307886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=1943849092275307886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/1943849092275307886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/1943849092275307886'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/flex-is-it-memory-leak.html' title='Flex: Is it a memory leak?'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-6943480647621469816</id><published>2008-07-15T14:46:00.000-07:00</published><updated>2008-08-04T13:33:21.779-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='as3'/><category scheme='http://www.blogger.com/atom/ns#' term='null'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='children'/><category scheme='http://www.blogger.com/atom/ns#' term='initialize'/><category scheme='http://www.blogger.com/atom/ns#' term='uicomponent'/><title type='text'>Flex Actionscript 3.0 Missing DisplayObject Children</title><content type='html'>So you have a component like&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Awesome.mxml&lt;br /&gt;&lt;br /&gt;&amp;lt;mx:Canvas ....&amp;gt;&lt;br /&gt;   &amp;lt;mx:Vbox id="avbox" /&amp;gt;&lt;br /&gt;&amp;lt;/mx:Canvas&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;if you try to create your object with as3 like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;var awesome:Awesome = new Awesome();&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;you'll see that&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;trace(awesome.avbox);  //NULL&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;gives you null.  Thats because your component's children are created using deferred instantiation.  If you want to force the component to create its children do:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;awesome.initialize();&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;now when you try:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;trace(awesome.avbox);  //NOT NULL&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;there will actually be something there :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-6943480647621469816?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/6943480647621469816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=6943480647621469816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/6943480647621469816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/6943480647621469816'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/flex-actionscript-30-missing.html' title='Flex Actionscript 3.0 Missing DisplayObject Children'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-3458290570560099245</id><published>2008-07-15T14:41:00.000-07:00</published><updated>2008-08-04T13:33:35.402-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='as3'/><category scheme='http://www.blogger.com/atom/ns#' term='modules'/><category scheme='http://www.blogger.com/atom/ns#' term='timer'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='leak'/><title type='text'>Actionscript 3.0 Flex Modules Tricky Timer Memory Leak</title><content type='html'>Becareful when unloading modules to stop and remove Timers, these can cause you memory leaks (and headaches)!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-3458290570560099245?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/3458290570560099245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=3458290570560099245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/3458290570560099245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/3458290570560099245'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/actionscript-30-flex-tricky-timer.html' title='Actionscript 3.0 Flex Modules Tricky Timer Memory Leak'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-7624182227860267085</id><published>2008-07-11T15:30:00.000-07:00</published><updated>2008-08-04T13:33:58.298-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pipes'/><category scheme='http://www.blogger.com/atom/ns#' term='teesplit'/><category scheme='http://www.blogger.com/atom/ns#' term='PureMVC'/><category scheme='http://www.blogger.com/atom/ns#' term='disconnecting'/><title type='text'>PureMVC Pipes disconnecting the pipes after a module is unloaded TeeSplit</title><content type='html'>because TeeSplit can't remove a pipefitting of our choosing I extended it&lt;br /&gt;and added in this method:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;        public function removePipeFitting(inpipe:IPipeFitting):IPipeFitting {&lt;br /&gt;         var outputsac:ArrayCollection = new ArrayCollection(outputs);&lt;br /&gt;         &lt;br /&gt;         if (outputsac.getItemIndex(inpipe) &gt;= 0) {&lt;br /&gt;          return outputsac.removeItemAt(outputsac.getItemIndex(inpipe)) as IPipeFitting;         &lt;br /&gt;         }&lt;br /&gt;         return null;&lt;br /&gt;         &lt;br /&gt;        }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in a PipeAwareModule you can add a reference to the pipes connecting to it.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; &lt;br /&gt;  private var _cachedPipes:ArrayCollection = new ArrayCollection([]);&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  /**&lt;br /&gt;   * used to remove pipes at the shell's side of the junction&lt;br /&gt;   *  &lt;br /&gt;   * @param pipefitting we are going to call disconnect on this pipefitting&lt;br /&gt;   * @param output&lt;br /&gt;   * &lt;br /&gt;   */  &lt;br /&gt;  public function cacheFitting(pipefitting:IPipeFitting, output:IPipeFitting):void {&lt;br /&gt;   _cachedPipes.addItem({pipefitting:pipefitting, output:output});&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * goes through the arraycollection disconnecting the pipefitting from output &lt;br /&gt;   * &lt;br /&gt;   */  &lt;br /&gt;  public function removepipes():void {&lt;br /&gt;   for each (var pipefittings:Object in _cachedPipes) {&lt;br /&gt;    if (pipefittings.pipefitting is TeeSplitImproved) {&lt;br /&gt;     (pipefittings.pipefitting as TeeSplitImproved).removePipeFitting(pipefittings.output);&lt;br /&gt;    }&lt;br /&gt;    else {&lt;br /&gt;     (pipefittings.pipefitting as IPipeFitting).disconnect();&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;   _cachedPipes.removeAll();&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;if your module has a unload method you'd want to:&lt;br /&gt;&lt;br /&gt;1] call facade.removeMediator on every mediator (in the junction mediator's onRemove method do junction.removePipe on all pipefittings attached to that junction), facade.removeProxy, ..etc &lt;br /&gt;2] call the removepipes() to remove incoming pipes, then&lt;br /&gt;3] call facade.removeCore to get rid of all the core actors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-7624182227860267085?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/7624182227860267085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=7624182227860267085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/7624182227860267085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/7624182227860267085'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/puremvc-pipes-disconnecting-pipes-after.html' title='PureMVC Pipes disconnecting the pipes after a module is unloaded TeeSplit'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-4250946732852616545</id><published>2008-07-11T14:07:00.000-07:00</published><updated>2008-08-04T13:36:32.812-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pipes'/><category scheme='http://www.blogger.com/atom/ns#' term='teemerge'/><category scheme='http://www.blogger.com/atom/ns#' term='connecting'/><category scheme='http://www.blogger.com/atom/ns#' term='PureMVC'/><category scheme='http://www.blogger.com/atom/ns#' term='disconnecting'/><title type='text'>PureMVC Pipes Connecting / Disconnecting Pipes TeeMerge</title><content type='html'>&lt;code&gt;&lt;br /&gt;===pipe1========= teemerge ---------------&lt;br /&gt;                     |&lt;br /&gt;======pipe2==========|&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To get something like above you could either do&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;pipe1.connect(teemerge);&lt;br /&gt;pipe2.connect(teemerge);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;OR equivalently&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;teemerge.connectInput(pipe1);&lt;br /&gt;teemerge.connectInput(pipe2);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;disconnecting pipes&lt;br /&gt;&lt;br /&gt;lets say we had:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;======pipe1========pipe2==========pipe3=========&lt;br /&gt;&lt;br /&gt;doing:&lt;br /&gt;pipe1.disconnect().disconnect().disconnect();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;would result in:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;=====pipe1        pipe          pipe3&lt;br /&gt;&lt;br /&gt;because each disconnect returns the disconnected pipe&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;===teesplit==============pipe1=====&lt;br /&gt;              |&lt;br /&gt;              |==========pipe2=====&lt;br /&gt;              |&lt;br /&gt;              |==========pipe3=====&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in this case&lt;br /&gt;&lt;br /&gt;teesplit.disconnect();&lt;br /&gt;teesplit.disconnect();&lt;br /&gt;teesplit.disconnect();&lt;br /&gt;&lt;br /&gt;removes all 3 pipes in the reverse order that you connected them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;there is no built in capability to remove a pipe of your choosing at the moment(something you need if your gonna be doing a lot of module building!!).&lt;br /&gt;&lt;br /&gt;check here to see how someone implemented it themself:&lt;br /&gt;http://forums.puremvc.org/index.php?action=printpage;topic=508.0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-4250946732852616545?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/4250946732852616545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=4250946732852616545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4250946732852616545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4250946732852616545'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/puremvc-pipes-connecting-disconnecting.html' title='PureMVC Pipes Connecting / Disconnecting Pipes TeeMerge'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-7171100087007466210</id><published>2008-07-10T10:07:00.001-07:00</published><updated>2008-08-04T13:36:04.588-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pipes'/><category scheme='http://www.blogger.com/atom/ns#' term='filter'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='PureMVC'/><title type='text'>PureMVC Pipes - using the filter</title><content type='html'>The filter is useful for filtering the messages going through the pipes.  An analogy you can use is a water filter.  &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;wall ======== [water filter] ========= fridge/sink&lt;br /&gt;       pipe1                    pipe2&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in code form this would look like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;              // create output pipes 1&lt;br /&gt;               var pipe1:IPipeFitting = new Pipe();&lt;br /&gt;               var pipe2:IPipeFitting = new Pipe();&lt;br /&gt;&lt;br /&gt;              // create filter&lt;br /&gt;               var filter:Filter = new Filter( 'TestFilter' );&lt;br /&gt;               &lt;br /&gt;               // connect input fitting&lt;br /&gt;               var connectedInput:Boolean     = pipe1.connect( filter );&lt;br /&gt;               &lt;br /&gt;               // connect output fitting&lt;br /&gt;               var connectedOutput:Boolean = filter.connect( pipe2 );&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;the way something gets filtered is this..&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1] the message going through the filter must have a variable in the message header, &lt;br /&gt;lets call it  particleSize:int.&lt;br /&gt;&lt;br /&gt;example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; var h20Message:IPipeMessage = new Message( Message.NORMAL, { particleSize:1, name:'h20'} );&lt;br /&gt; var mineralMessage:IPipeMessage = new Message( Message.NORMAL, { particleSize:10, name:'mineral'} );&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2] the filter also needs a paramater to compare wether to let the message through or not, lets call it maxParticleSize.&lt;br /&gt;&lt;br /&gt;3] then the filter needs a filter function which checks if the maxParticleSize &gt;= particleSize. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to setup the filter&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;to make it do something we have to create the filter and pass in parameters to the constructor.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;        /**&lt;br /&gt;         * Constructor.&lt;br /&gt;         * &lt;P&gt;&lt;br /&gt;         * Optionally connect the output and set the parameters.&lt;/P&gt;&lt;br /&gt;         */&lt;br /&gt;        public function Filter( name:String, output:IPipeFitting=null, filter:Function=null, params:Object=null ) &lt;br /&gt;        {&lt;br /&gt;            super( output );&lt;br /&gt;            this.name = name;&lt;br /&gt;            if ( filter != null ) setFilter( filter );&lt;br /&gt;            if ( params != null ) setParams( params );&lt;br /&gt;        }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;One way to create the filter is to pass in all name, output, filter and params to the functions parameters:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var teeMerge:TeeMerge = new TeeMerge();&lt;br /&gt;var filter:Filter = new Filter( 'waterFilter',&lt;br /&gt;                                new PipeListener(this,function ( message:IPipeMessage ){trace('particle got through');),&lt;br /&gt;                                function( message:IPipeMessage, params:Object ):void { if (message.getHeader().particleSize &gt;= params.maxParticleSize) throw new Error('particle filtered'); }, &lt;br /&gt;                                { maxParticleSize:5 }&lt;br /&gt;                              );&lt;br /&gt;teeMerge.connect(filter);&lt;br /&gt;junction.registerPipe( PipeAwareModule.STDIN, Junction.INPUT, teeMerge );&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;above, messages enter input the teeMerge, then goes to the filter, if the filter&lt;br /&gt;accepts the message, it sends it to the pipelistener.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you look at the Filter constructor you can see output, filter and params are optional and can be set/modified after creation of the filter which I will explain how that works below.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;setting the output&lt;/b&gt;&lt;br /&gt;&lt;code&gt;filter.connect(a IPipeFitting)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;setting the log level/filter function&lt;/b&gt;&lt;br /&gt;If you look at Filter's source, its write method is where the filter changes it's log level and filter function.  When the filter sees a FilterControlMessage.SET_PARAMS it will then try to set the new params.&lt;br /&gt;&lt;br /&gt;below I set the maxParticleSize to 10 because i want the mineral to go through:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var maxParticleSize:number = 10;&lt;br /&gt;var setLogLevelMessage:LogFilterMessage = new LogFilterMessage(FilterControlMessage.SET_PARAMS, particleSize);&lt;br /&gt;filter.write(setLogLevelMessage );&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;of course, you can send the FilterControlMessage through a modules junction to the&lt;br /&gt;filter using junction.sendMessage as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-7171100087007466210?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/7171100087007466210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=7171100087007466210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/7171100087007466210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/7171100087007466210'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/puremvc-pipes-using-filter.html' title='PureMVC Pipes - using the filter'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-2672463537435120957</id><published>2008-07-09T15:00:00.001-07:00</published><updated>2008-08-04T13:35:05.962-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='as3'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='resize'/><category scheme='http://www.blogger.com/atom/ns#' term='component'/><category scheme='http://www.blogger.com/atom/ns#' term='button'/><title type='text'>Adding a Resize button to a Flex Panel v2</title><content type='html'>check out this guys resizable panel: http://www.aboutflex.net/flex/resizable-panel/ &lt;br /&gt;&lt;br /&gt;Its pretty cool, but it won't work if you try to add the panel inside another component. Thats because handleScale directly references the stage to get the mouse coordinates. But if your component does not start at x=0 y=0 then the cordinates will be off. &lt;br /&gt;&lt;br /&gt;here is the modified version which uses the parents mouseX,mouseY in handleScale:&lt;br /&gt;&lt;br /&gt;&lt;OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="100%" HEIGHT="300" id="Yourfilename" ALIGN=""&gt;&lt;br /&gt;&lt;PARAM NAME=movie VALUE="http://wiki.willinteractive.com/images/c/c4/ResizablePanelv2.swf"&gt; &lt;PARAM NAME=quality VALUE=high&gt; &lt;PARAM NAME=bgcolor VALUE=#333399&gt; &lt;EMBED src="http://wiki.willinteractive.com/images/c/c4/ResizablePanelv2.swf" quality=high WIDTH="100%" HEIGHT="300" NAME="http://wiki.willinteractive.com/images/c/c4/ResizablePanelv2.swf" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"&gt;&lt;/EMBED&gt; &lt;/OBJECT&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;heres the source:&lt;br /&gt;&lt;br /&gt;ResizablePanelv2.mxml &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:containers="com.flexas3.containers.*"&amp;gt;&lt;br /&gt; &amp;lt;mx:VBox horizontalAlign="center" verticalAlign="middle" backgroundColor="#696969" horizontalCenter="0" verticalCenter="0" width="50%" height="75%"&amp;gt;&lt;br /&gt;  &amp;lt;mx:Button label="I'm in a Vbox" /&amp;gt;&lt;br /&gt;  &amp;lt;containers:ResizablePanel title="Resize Me !!" x="73" y="110" width="258" height="213" /&amp;gt;&lt;br /&gt; &amp;lt;/mx:VBox&amp;gt;&lt;br /&gt;&amp;lt;/mx:Application&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;./com/flexas3/containers/ResizablePanel.as &lt;br /&gt;&lt;CODE&gt;&lt;br /&gt;package com.flexas3.containers&lt;br /&gt;{&lt;br /&gt; import flash.events.MouseEvent;&lt;br /&gt;&lt;br /&gt; import mx.containers.Panel;&lt;br /&gt; import mx.controls.Button;&lt;br /&gt; &lt;br /&gt; public class ResizablePanel extends Panel&lt;br /&gt; {&lt;br /&gt;  public function ResizablePanel()&lt;br /&gt;  {&lt;br /&gt;   super();&lt;br /&gt;   resizer.addEventListener(MouseEvent.MOUSE_DOWN,handleDown)&lt;br /&gt;  }&lt;br /&gt;  private var resizer:Button=new Button();&lt;br /&gt;&lt;br /&gt;  override protected function createChildren():void{&lt;br /&gt;   this.resizer.width=12;&lt;br /&gt;            this.resizer.height=12;&lt;br /&gt;&lt;br /&gt;   super.createChildren();&lt;br /&gt;   this.rawChildren.addChild(resizer);&lt;br /&gt;  }&lt;br /&gt;  override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{&lt;br /&gt;   super.updateDisplayList(unscaledWidth,unscaledHeight);&lt;br /&gt;   this.resizer.y = unscaledHeight - resizer.height ;&lt;br /&gt;            this.resizer.x = unscaledWidth - resizer.width ;&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;  private function handleDown(e:MouseEvent):void{&lt;br /&gt;   stage.addEventListener(MouseEvent.MOUSE_MOVE,handleScale)&lt;br /&gt;   stage.addEventListener(MouseEvent.MOUSE_UP,stopResize)&lt;br /&gt;  }&lt;br /&gt;  private function handleScale(e:MouseEvent):void{&lt;br /&gt;      if(parent.mouseX-this.x&gt;50)        &lt;br /&gt;       width=parent.mouseX-this.x;   &lt;br /&gt;      if(parent.mouseY-this.y&gt;50)        &lt;br /&gt;       height=parent.mouseY-this.y;&lt;br /&gt;  }&lt;br /&gt;  private function stopResize(e:MouseEvent):void{&lt;br /&gt;   stage.removeEventListener(MouseEvent.MOUSE_MOVE,handleScale)&lt;br /&gt;   stage.removeEventListener(MouseEvent.MOUSE_UP,stopResize)&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/CODE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-2672463537435120957?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/2672463537435120957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=2672463537435120957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/2672463537435120957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/2672463537435120957'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/07/adding-resize-button-to-component.html' title='Adding a Resize button to a Flex Panel v2'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-8965582202986671944</id><published>2008-06-26T15:36:00.000-07:00</published><updated>2008-08-04T13:35:17.730-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pipes'/><category scheme='http://www.blogger.com/atom/ns#' term='pipeworks'/><category scheme='http://www.blogger.com/atom/ns#' term='modules'/><category scheme='http://www.blogger.com/atom/ns#' term='PureMVC'/><title type='text'>PureMVC Pipeworks Singleton vs Multiple-Instance Modules</title><content type='html'>Sometimes you only want one instance of a module created.  We'll call this type of module a singleton module.  &lt;br /&gt;&lt;br /&gt;Sometimes you might want to be able to create multiple instances of a module.  We'll just call this a multiple-instance module.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Take a look at the &lt;a href="http://puremvc.org/pages/demos/AS3/Demo_AS3_MultiCore_Flex_PipeWorks/"&gt;Pipeworks demo&lt;/a&gt; and note how the app uses the LoggerModule and PrattlerModule.  &lt;br /&gt;&lt;br /&gt;We see there is only one instance of LoggerModule for the whole app, but we can  create many instances of the PrattlerModule.  &lt;br /&gt;&lt;br /&gt;First, &lt;a href="http://puremvc.org/pages/demos/AS3/Demo_AS3_MultiCore_Flex_PipeWorks/srcview/"&gt;here&lt;/a&gt; is the link to the Pipeworks source. &lt;br /&gt;&lt;br /&gt;Below are the differences between singleton and multiple-instance modules:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;LoggerModule - a singleton module&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;-LoggerModule constructor uses LoggerModule.NAME (static String) as LoggerModule.ApplicationFacade's multiton key&lt;br /&gt;-LoggerModuleMediator uses LoggerModuleMediator.NAME (static String) as Shell.Mediator's name&lt;br /&gt;-LoggerModuleMediator registered, pipes connected on application startup&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PrattlerModule - a multiple-instance module&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;-PrattlerModule constructor uses PrattlerModule.moduleID (unique ID created from auto-incrementing static counter) as PrattlerModule.ApplicationFacade's multiton key&lt;br /&gt;-PrattlerModuleMediator uses PrattlerModule.getID() as Shell.Mediator's name&lt;br /&gt;-PrattlerModuleMediator registered using a command, pipes connected inside command.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below are the pertinent functions PrattleModule used to generate and retrieve moduleID:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       public function getID():String&lt;br /&gt;        {&lt;br /&gt;            return moduleID;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private static function getNextID():String&lt;br /&gt;        {&lt;br /&gt;            return NAME + '/' + serial++;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        private static var serial:Number = 0;&lt;br /&gt;&lt;br /&gt;        private var moduleID:String = PrattlerModule.getNextID();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-8965582202986671944?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/8965582202986671944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=8965582202986671944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8965582202986671944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/8965582202986671944'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/06/puremvc-pipeworks-singleton-vs-multiple.html' title='PureMVC Pipeworks Singleton vs Multiple-Instance Modules'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-7473273299632406274</id><published>2008-06-24T15:56:00.000-07:00</published><updated>2008-08-04T13:35:27.147-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AMFPHP'/><category scheme='http://www.blogger.com/atom/ns#' term='cakephp'/><category scheme='http://www.blogger.com/atom/ns#' term='cakeamfphp'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><title type='text'>How to Install CakeAMFPHP</title><content type='html'>&lt;span style="font-size:150%"&gt;Introduction&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;CAKEPHP &lt;br /&gt;Are you trying to create an enterprise Flex app?  You'll be needing to do some heavy lifting serverside.  Chances are, you'll be needing some help...  thats where &lt;a href="http://cakephp.org/"&gt;CakePHP&lt;/a&gt; comes in.  If you've programmed in PHP before, you've probably heard of CakePHP, a rapid development PHP framework.   Using CakePHP allows us to stay MVC oriented, resulting in code with better readability and objects with looser coupling.  Scalability. Baby!&lt;br /&gt;&lt;br /&gt;AMFPHP&lt;br /&gt;If you've ever tried to send data back and forth between flash and php chances are you've used &lt;a href="http://www.amfphp.org/"&gt;AMFPHP&lt;/a&gt;.  With AMFPHP you can do stuff like for example sending in custom value objects(public var fooGuy:UserVO) to your PHP script and back.  This means less work, no converting objects to arrays and arrays back to objects.&lt;br /&gt;&lt;br /&gt;CAKEAMFPHP&lt;br /&gt;Wanna combine the best of both worlds?  This is where &lt;a href="http://cakeforge.org/frs/?group_id=25"&gt;CakeAMFPHP&lt;/a&gt; comes in.  I'll be telling you have to install CakeAMFPHP with CakePHP 1.1 in this post.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size=150%;"&gt;Installation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1. &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Grab the latest CakePHP here: http://cakeforge.org/frs/download.php/591/cake_1.1.19.6305.tar.bz2&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Extract this anywhere you'd like.&lt;br /&gt;The directory structure should look like:&lt;br /&gt;&lt;br /&gt;cake_1.1.19.6305/app&lt;br /&gt;cake_1.1.19.6305/cake&lt;br /&gt;cake_1.1.19.6305/docs&lt;br /&gt;cake_1.1.19.6305/vendors&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Grab the latest CakeAMFPHP here: http://cakeforge.org/frs/download.php/267/cakeamfphp.0.6.0.tar.bz2&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4. &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Unzip CakeAMFPHP into a temporary directory.&lt;br /&gt;The directory structure should look like:&lt;br /&gt;&lt;br /&gt;cakeamfphp/webroot&lt;br /&gt;cakeamfphp/views&lt;br /&gt;cakeamfphp/vendors&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 5.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Next cut and paste the webroot, views, and vendors directories into cakePHP's app folder (cake_1.1.19.6305/app).  You are doing it right if cakeamfphp/webroot matches with cake_1.1.19.6305/app/webroot.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 6.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Configure your cakePHP installation (/app/config/core.php). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;----------------------&lt;br /&gt;the amfbrowser is located in the amfbrowser directory.  If localhost points to your cakeAMFPHP project then http://localhost/amfbrowser will point you to the amfbrowser.&lt;br /&gt;&lt;br /&gt;Now that the files are in place, take a look at &lt;a href="http://cakeforge.org/frs/?group_id=25&amp;release_id=75"&gt;amfBB for examples&lt;/a&gt; of how to use the cake_gateway.php to invoke cakePHP's controller methods.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You might notice that cakeAMFPHP break's cakePHP's session component.  Next time, I'll teach you how to get cakePHP's sessions working with cakeAMFPHP :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-7473273299632406274?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/7473273299632406274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=7473273299632406274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/7473273299632406274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/7473273299632406274'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/06/how-to-install-cakeamfphp.html' title='How to Install CakeAMFPHP'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6403790658767936403.post-4390780372152572674</id><published>2008-06-23T10:36:00.001-07:00</published><updated>2008-06-23T15:45:48.055-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pipes'/><category scheme='http://www.blogger.com/atom/ns#' term='Actionscript'/><category scheme='http://www.blogger.com/atom/ns#' term='Junction'/><category scheme='http://www.blogger.com/atom/ns#' term='Module'/><category scheme='http://www.blogger.com/atom/ns#' term='Flex'/><category scheme='http://www.blogger.com/atom/ns#' term='PureMVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Multicore'/><title type='text'>Getting into PureMVC Pipes</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_FRPkjjl1G3I/SF__HdFjcTI/AAAAAAAAAAU/Qoa7s3b1rIU/s1600-h/plumbing.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5215167397050413362" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 208px; CURSOR: hand; HEIGHT: 183px" height="234" alt="" src="http://2.bp.blogspot.com/_FRPkjjl1G3I/SF__HdFjcTI/AAAAAAAAAAU/Qoa7s3b1rIU/s320/plumbing.png" width="250" border="0" /&gt;&lt;/a&gt;&lt;a href="http://trac.puremvc.org/Utility_AS3_MultiCore_Pipes"&gt;Pipes&lt;/a&gt; is a utility written for &lt;a href="http://trac.puremvc.org/PureMVC_AS3_MultiCore"&gt;PureMVC multi-core&lt;/a&gt; that allows application module communication and/or module module communication.&lt;br /&gt;&lt;br /&gt;Before Pipes, communicating from application to module meant defining interfaces and directly accessing modules (through references). But in a PureMVC application implementing the Pipe utility, we communicate by sending 'messages' via the pipe system. &lt;span style="BACKGROUND-COLOR: rgb(255,255,0)"&gt;A &lt;i&gt;Message&lt;/i&gt; carries its type and also a payload object&lt;/span&gt;. Messages behave similarly to events in that the recipient of the message is not strongly tied to the sender of the message. The benefit should be clear that Pipes allows our application and modules to be further decoupled.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;The Basics&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_FRPkjjl1G3I/SGAA-_1DOKI/AAAAAAAAAAc/Qy-tZwXoCtM/s1600-h/overflowtoilet.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5215169450780866722" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_FRPkjjl1G3I/SGAA-_1DOKI/AAAAAAAAAAc/Qy-tZwXoCtM/s320/overflowtoilet.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The Pipes utility works off the plumbing metaphor. Take a toilet for example. A toilet has a pipe connecting to it that supplies water (input). There is also another pipe leaving the toilet that moves out waste (output). Please note that &lt;span style="BACKGROUND-COLOR: rgb(255,255,0)"&gt;stuff in pipes are only intended to move in one direction&lt;/span&gt;. For example, you wouldn't want waste to come back from the sewers into your toilet! Yuck!&lt;br /&gt;&lt;br /&gt;To hook up your application/module with pipes. You need to create whats called a Junction. A &lt;span style="BACKGROUND-COLOR: rgb(255,255,0)"&gt;&lt;i&gt;Junction&lt;/i&gt; is like a hole you just drilled into your app/module, now we can connect some pipes to it&lt;/span&gt;! In a PureMVC application, we use whats called a JunctionMediator. A &lt;span style="BACKGROUND-COLOR: rgb(255,255,0)"&gt;&lt;i&gt;JunctionMediator&lt;/i&gt; is just a Mediator that contains an instance of a Junction&lt;/span&gt;. It works just like any other mediator in that it can list and handle notification interests. Remember, you have to create a JunctionMediator for both application AND all of your modules.&lt;br /&gt;&lt;br /&gt;With the Junction in place, we can now connect Pipes to it! A Pipe is the most basic element in this system. A &lt;span style="BACKGROUND-COLOR: rgb(255,255,0)"&gt;&lt;i&gt;Pipe&lt;/i&gt;'s goal is simple, it passes stuff from one end(input) out through the other end (output)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5215171030945611938" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 130px; CURSOR: hand; HEIGHT: 84px; TEXT-ALIGN: center" height="91" alt="" src="http://1.bp.blogspot.com/_FRPkjjl1G3I/SGACa-ZrwKI/AAAAAAAAAAk/_8_cX1pMoJc/s320/pvc-fitting-401-regular-tee-sxsxs.jpg" width="135" border="0" /&gt;&lt;br /&gt;&lt;div align="center"&gt;Plumbers call this a 'Tee'&lt;/div&gt;&lt;p&gt;&lt;br /&gt;Sometimes you need a pipe to 'split' to different destinations. For example, a main water pipe connects to your house. The pipe then splits off to your kitchen sink, bathroom sink, toilet, shower, garden hose, etc. To do this in our application, we use whats called a 'TeeSplit.' &lt;span style="BACKGROUND-COLOR: rgb(255,255,0)"&gt;A &lt;i&gt;TeeSplit&lt;/i&gt; sends a message from its input pipe down every output pipe that is connected to it&lt;/span&gt;. If you have an instance of TeeSplit and 3 Pipes and you do: Pipe1.connect(aTeeSplit), aTeeSplit.connect(Pipe2), and aTeeSplit.connect(Pipe3).&lt;br /&gt;Stuff from Pipe1 flows into both Pipe2 and Pipe3.&lt;br /&gt;&lt;br /&gt;Othertimes we need several pipes to 'merge' into one pipe. For example, there may be several toilets throughout the house, but all the waste pipes merge into one main waste pipe that leaves the house and flows to the local sewer system. To do this in our application, we use whats called a 'TeeMerge.' &lt;span style="BACKGROUND-COLOR: rgb(255,255,0)"&gt;A &lt;i&gt;TeeMerge&lt;/i&gt; will take messages sent from its input pipes and send it down its output pipe&lt;/span&gt;. If you have an instance of TeeMerge and 3 Pipes and you do: Pipe1.connect(aTeeMerge), aTeeMerge.connectInput(Pipe2), and aTeeMerge.connectInput(Pipe3). Stuff from both Pipe2 and Pipe3 flow into Pipe1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Step 1: Making the Application Pipable&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Create a JunctionMediator for your application&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; FONT-SIZE: 90%; PADDING-BOTTOM: 15px; OVERFLOW: scroll; PADDING-TOP: 15px; BACKGROUND-COLOR: #eee"&gt;&lt;br /&gt;// ./mainapp/view/ApplicationJunctionMediator.as&lt;br /&gt;public class ApplicationJunctionMediator extends JunctionMediator&lt;br /&gt;{&lt;br /&gt;  //Constructor, create a Junction instance&lt;br /&gt;  public function ApplicationJunctionMediator()&lt;br /&gt;  {&lt;br /&gt;    super(NAME, new Junction());&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  //After the facade registers this mediator, lets attach some pipe fittings&lt;br /&gt;  override public function onRegister():void {&lt;br /&gt;    //Attach a TeeSplit to the junction for broadcasting messages&lt;br /&gt;    junction.registerPipe('output', Junction.OUTPUT, new TeeSplit());&lt;br /&gt;&lt;br /&gt;    //Attach a TeeMerge to the junction for receiving messages&lt;br /&gt;    junction.registerPipe('input', Junction.INPUT, new TeeMerge());&lt;br /&gt;&lt;br /&gt;    //Add a listener, to listen for messages entering the Junction&lt;br /&gt;    junction.addPipeListener('input', this, handlePipeMessage);&lt;br /&gt;&lt;br /&gt;    //give the application junction to mymodulemediator so we can connect the pipes&lt;br /&gt;    sendNotification(ApplicationFacade.CONNECT_APP_TO_MYMODULE, junction );&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  //this function handles any messages the Junction recieves&lt;br /&gt;  override public function handlePipeMessage( message:IPipeMessage ):void&lt;br /&gt;  {&lt;br /&gt;     trace('App got message: ', message.message);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Step 2: Making a Module Pipable&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Create a JunctionMediator for your module&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; FONT-SIZE: 90%; PADDING-BOTTOM: 15px; OVERFLOW: scroll;  PADDING-TOP: 15px; BACKGROUND-COLOR: #eee"&gt;&lt;br /&gt;&lt;br /&gt;// ./mymodule/view/MyModuleJunctionMediator.as&lt;br /&gt;public class MyModuleJunctionMediator extends JunctionMediator&lt;br /&gt;{&lt;br /&gt;  //Constructor, create a Junction instance&lt;br /&gt;  public function MyModuleJunctionMediator()&lt;br /&gt;  {&lt;br /&gt;    super(NAME, new Junction());&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  //After the facade registers this mediator, lets attach some pipe fittings&lt;br /&gt;  override public function onRegister():void {&lt;br /&gt;    //Add a listener, to listen for messages entering the Junction&lt;br /&gt;    junction.addPipeListener('input', this, handlePipeMessage);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  //this function handles any messages the Junction recieves&lt;br /&gt;  override public function handlePipeMessage( message:IPipeMessage ):void&lt;br /&gt;  {&lt;br /&gt;     trace('MyModule got message: ', message.message);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Step 3: Creating the Module and Connecting the Pipes&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To use a module in your application, you need to create a mediator that instantiates and holds an instance of that module. This mediator is also responsible for connecting the Pipes after the application and module have finished instantiating.&lt;br /&gt;&lt;br /&gt;&lt;pre style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; FONT-SIZE: 90%; PADDING-BOTTOM: 15px; OVERFLOW: scroll; PADDING-TOP: 15px; BACKGROUND-COLOR: #eee"&gt;&lt;br /&gt;// ./mainapp/view/MyModuleMediator.as&lt;br /&gt;public class MyModuleMediator extends Mediator&lt;br /&gt;{&lt;br /&gt;    //Constructor, create a instance of MyModule&lt;br /&gt;    public function MyModuleMediator()&lt;br /&gt;    {&lt;br /&gt;     super(NAME, new MyModule());&lt;br /&gt;    }&lt;br /&gt;  &lt;br /&gt;    override public function handleNotification( note:INotification ):void&lt;br /&gt;    {&lt;br /&gt;        switch( note.getName() )&lt;br /&gt;        {&lt;br /&gt;            case  ApplicationFacade.CONNECT_APP_TO_MYMODULE:&lt;br /&gt;&lt;br /&gt;                // The junction was passed from ApplicationJunctionMediator&lt;br /&gt;                var junction:Junction = note.getBody() as Junction;&lt;br /&gt;              &lt;br /&gt;                // Connect the apps's teesplit(output) to mymodule's junction&lt;br /&gt;                var ateesplit:TeeSplit = junction.retrievePipe('output') as TeeSplit;&lt;br /&gt;                var apipe:IPipeFitting = new Pipe();&lt;br /&gt;                ateesplit.connect(apipe);                            &lt;br /&gt;                mymodule.acceptInputPipe('input', apipe);              &lt;br /&gt;      &lt;br /&gt;                // Connect a new output pipe from mymodule's junction to app's teemerge&lt;br /&gt;                var mymoduleToApp:Pipe = new Pipe();&lt;br /&gt;                var ateemerge:TeeMerge = junction.retrievePipe('input') as TeeMerge;&lt;br /&gt;                ateemerge.connectInput(mymoduleToApp);&lt;br /&gt;                mymodule.acceptOutputPipe('output', mymoduleToApp);&lt;br /&gt;          &lt;br /&gt;            break;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    private function get mymodule:MyModule { return viewComponent as MyModule; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Step 4: Sending a Message down the Pipes&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To send a Message down the pipes, you use the Junction's sendMessage function.&lt;br /&gt;&lt;br /&gt;For example, if I wanted to send a message from the application to MyModule. I would in ApplicationJunctionMediator, do:&lt;br /&gt;&lt;br /&gt;junction.sendMessage('output', new Message(Message.NORMAL, null, 'hellofromapp'));&lt;br /&gt;&lt;br /&gt;MyModuleJunctionMediator would get the message, and its method handlePipeMessage invoked would be invoked. The result should be a trace 'MyModule got message: hellofromapp'.&lt;br /&gt;&lt;br /&gt;In this example, the message payload was only a String. If you want you can pass any object as the payload.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;More Resources&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This was a very basic explaination of Pipes. Pipes also has filtering and queueing features which I won't discuss here. For more information please take a look at the following:&lt;br /&gt;&lt;br /&gt;Nice tutorial on Pipes: &lt;a href="http://www.joshuaostrom.com/2008/06/15/understanding-puremvc-pipes/"&gt;http://www.joshuaostrom.com/2008/06/15/understanding-puremvc-pipes/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Take a look at Pipe's unit tests to get a better understanding of what each class is trying to accomplish:&lt;br /&gt;&lt;a href="http://trac.puremvc.org/Utility_AS3_MultiCore_Pipes_UnitTests"&gt;http://trac.puremvc.org/Utility_AS3_MultiCore_Pipes_UnitTests&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check out Pipeworks example's source code to see Pipes in action:&lt;br /&gt;&lt;a href="http://trac.puremvc.org/Demo_AS3_MultiCore_Flex_PipeWorks"&gt;http://trac.puremvc.org/Demo_AS3_MultiCore_Flex_PipeWorks&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6403790658767936403-4390780372152572674?l=flexas3.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flexas3.blogspot.com/feeds/4390780372152572674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6403790658767936403&amp;postID=4390780372152572674' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4390780372152572674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6403790658767936403/posts/default/4390780372152572674'/><link rel='alternate' type='text/html' href='http://flexas3.blogspot.com/2008/06/puremvc-pipes.html' title='Getting into PureMVC Pipes'/><author><name>Panupan Sriautharawong</name><uri>http://www.blogger.com/profile/07849739533252569519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_FRPkjjl1G3I/SF__HdFjcTI/AAAAAAAAAAU/Qoa7s3b1rIU/s72-c/plumbing.png' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
