Base code in flex and java script using flash builder 4 and sdk 4.1