Techblog

Tech Blog

Our latest geek adventures!

8 June Flash rotation

Posted by Gert-Jan on in Flash+ActionScript

Last week we’ve been working on an importer for the Floorplanner. It allows us to generate a floor plan based on a xml file from one of our clients. This way they can keep drawing the plans with their own software and export them to the internet with the click of a button.

While working on the importer we came across an issue with the rotation in Flash. After generating a floor plan, the rotation of all doors and windows we’re slightly off. They all seemed mirrored.

After reading the documentation it became clear that Flash uses a different way of working with rotations.Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Wikipedia tells us that the rest of the world uses a different approach.

Solution: mc._rotation =* -1;

Leave a Reply