Accessibility

Flash sample application

Drawing sample: Coordinate space, radians, and degrees

The key to controlling visual elements with code is to understand the coordinate space within the timeline that the graphics are located in. Adobe Flash Player uses one or more nested timelines to create a movie (SWF file). Each timeline contains a registration point that marks the zero x coordinate and the zero y coordinate in the container. All measurements of movement and distance are judged in points (x, y) and their relation to the timeline's registration point.

AlertThis content requires Flash

Download the free Flash Player now!

Get Adobe Flash Player

This sample demonstrates how math functions can be used to calculate the distance, angle, and offset from a point in a timeline in relation to a center point. Click and drag the icon to see the results. You can use this type of functionality for game elements and various types of visual effects.

User level: Beginner

Requirements

To view these samples, you need the following software and files:

Flash CS4 Professional

Sample files:

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License