optimise transphere flash -javascript