changed of few types to build in both js and flash