import Slice.of.Infinity;

Accordion Custom Header

Below is a custom header renderer utilizing flexlib, you can grab the source if you find it useful ^_^

Link with viewsource >> headerRenderer

 Add first comment! | Date Posted: September 08 2008, 01:51 PM

Checkbox - checking realtime

Case: You want to respond or do some “real-time” code logic when a checkbox control is selected.

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  3. <mx:Script>
  4.  <![CDATA[
  5.    
  6.  private function checkBox_change(evt:Event):void {
  7.                 var ch:CheckBox = evt.currentTarget as CheckBox;
  8.                 ch.selected ? mx.controls.Alert.show( ch.getRepeaterItem().data ) : null;
  9.             }
  10.    
  11.   ]]>
  12. </mx:Script>
  13.  
  14. <mx:Array id="Values_arr">
  15.       <mx:Object label="Value 1" data="Value  1"/>
  16.       <mx:Object label="Value 2" data="Value 2"/>
  17.       <mx:Object label="Value 3" data="Value 3"/>
  18.       <mx:Object label="Value 4" data="Value 4"/>
  19.       <mx:Object label="Value 5" data="Value 5"/>
  20.       <mx:Object label="Value 6" data="Value 6"/>
  21.       <mx:Object label="Value 7" data="Value 7"/>
  22.       <mx:Object label="Value 8" data="Value 8"/>
  23.       <mx:Object label="Value 9" data="Value 9"/>
  24.       <mx:Object label="Value 10" data="Value 10"/>
  25.       <mx:Object label="Value 11" data="Value 11"/>
  26.       <mx:Object label="Value 12" data="Value 12"/>
  27.       <mx:Object label="Value 13" data="Value 13"/>
  28.    </mx:Array>
  29.  
  30. <mx:VBox maxHeight="200" width="100%" backgroundColor="#ffffff">
  31.   <mx:Repeater dataProvider="{Values_arr}" id="rValues">
  32.    <mx:CheckBox label="{rValues.currentItem.label}" click="checkBox_change(event);" />
  33.   </mx:Repeater>
  34.  </mx:VBox>
  35.  
  36. </mx:Application>
 Add first comment! | Date Posted: September 03 2008, 10:23 AM

AS3/Flex CheatSheet

I plan to blog/post the common routine used in AS3 here for future use/reference or for anyone that might can benefit from it …

Watch out for it … (drum roll …)

 Add first comment! | Date Posted: September 03 2008, 09:46 AM

hmm …

I don’t care if it works on your machine! We are not shipping your machine!
Vidiu Platon

 2 Comments | Date Posted: August 30 2008, 11:11 PM

Nullsoft SHOUTcast UI Contest Via TopCoder.com

Made this UI Design entry for http://studio.topcoder.com/?module=ViewContestDetails&ct=2306. I hope I could get something out of it +.+…

Entry 1

On the other hand, i was hesitant to submit this design >_<

*cross-fingers….

 1 Comment | Date Posted: July 31 2008, 03:03 PM

TODO/FIXME extension for Flex Builder 2

Found this awesome TODO/FIX-ME extension for Flex 2/3. It’s Just a jewel! One of those “Must-have” Flex IDE component.

 Add first comment! | Date Posted: July 25 2008, 09:46 AM

import mx.utils.Base64Decoder in Flash CS3

I came across with an output requirement that needs Base64Decoder in Flash (NOT Flex). So, I googled but found out that “mx.utils.Base64Decoder” is only available to Flex. Luckily with the richness of the web, I found an alternative dynamicflash’s Base 64 Class . However, i still think it’s possible to use Flex library into Flash (AS3) and i found out you can SVN to http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/framework and get the mx package in the “src” directory. Then import as you normally do! ^_^

 1 Comment | Date Posted: July 16 2008, 02:59 PM

250G on my Macbook pro ^_^

Ok, so i got bored and unsatisfied with my macbook pro because i only got 6G of free space. So what does a geek should do about it??? (lol) … asked my friend to get me a 250G Hitachi SATA 5200 (I wish i got 7200 RPM though) but i think I’m already satisfied with the space…

I followed the instruction from http://ifixit.com

and wallah! I’m one happy grasshopper!

 Add first comment! | Date Posted: July 07 2008, 05:40 PM

Searchable SWF’s

Adobe is working with Google and Yahoo! to enable one of the largest fundamental improvements in web search results by making the Flash file format (SWF) a first-class citizen in searchable web content. This will increase the accuracy of web search results by enabling top search engines to understand what’s inside of RIAs and other rich web content created with Adobe Flash technology and add that relevance back to the HTML page.  More information from Adobe on SWF searchability FAQ

 Add first comment! | Date Posted: July 02 2008, 09:21 AM

Flex - Currency Converter

Played around today with WSDL webservice Currency Converter using Flex, weee!

Live Version isn’t working properly as I didn’t use LCDS, nor a cross-domain policy so, download the application and run it locally. You can grab the source by right clicking the application on this URL and selecting View Source from the context menu. Hmm, this could be a pretty handy AIR widget.

Also, worth noting is the WebService Release 1.0 by Carlo Alducente which makes it’s less than a minute to consume WebService in AS3.

// converts PHP (Philippine PESO to USD currency)

import alducente.services.WebService;
import flash.events.*;

var ws:WebService = new WebService();
ws.addEventListener(Event.CONNECT, connected);
ws.connect(”http://www.webservicex.net/CurrencyConvertor.asmx?WSDL”);
ws.cacheResults = true;

var myAmount = 10;

function connected(evt:Event):void{
ws.ConversionRate(done, “USD”,”PHP”, 0);
}

function done(serviceResponse:XML):void{
var _result = new XML(serviceResponse);

//trace(_result);
var rate:Number = Number(_result.children()[0].children()[0].children());
trace( myAmount * rate);
}

 Add first comment! | Date Posted: July 01 2008, 05:02 PM