refactored flash js, now they are not stacking