bug fixed at Flash function