You can draw shapes in Flash using two drawing models: Merge Drawing and Object Drawing.
In the image below you can see the location of the "Object Drawing" button, from which you can activate / desactivate this mode:

Object Drawing

Merge Drawing

The Merge Drawing model (the default) automatically merges shapes that you draw when you overlap them.
The drawing which was "overlapped" over another shape will affect the form of that shape, its underside (hidden) area will be deleted.
If you select a shape that has been merged with another, and move it, the shape below it is moved too.
  - Try the next example:
1. Open a new Flash document and select Rectangle Tool. Be shure that the "Object Drawing" is not activated.
2. Draw a rectangle shape on the Stage.
3. Select Oval Tool (located inside the button where the Rectangle Tool is, or press key O) and draw a circle on the Stage.
4. Chose the Selection Tool (the black arrow in Tools Panel).
5. Select all the circle and then drag it a little over the rectangle.
6. Click on the rectangle and move it away.
  - The area where the circle was overlapped is deleted.
7. Move the rectangle over a part of the circle, then select both shapes.
8. Click somewhere on the Stage to unselect the shapes, then try to drag one of them.
  - The two shapes was merged, becoming a single shape.
9. Select an area of this shape, click the Fill Color button and chose a color.
  - It changes the color of the selected area only.
Click the image below to see the steps of this example.

Merge Drawing example

This method is useful in obtaining a variety of new forms, with a few geometric shapes.

Object Drawing

The Object Drawing model allows you to draw shapes as separate objects that do not automatically merge together when you overlap them.
To draw shapes using Object Drawing, you must activate the Object Drawing button on the Tools Panel, after you choose a tool for drawing.
When you select a shape created using Object Drawing, Flash selects the shape with a rectangular bounding box.
  - Try the next example:
1. Open a new Flash document, select Rectangle Tool, and activate the "Object Drawing" mode (by click on the "Object Drawing" button, if it is not activated).
2. Draw two separated rectangles on the Stage.
3. Chose the Selection Tool and drag one of the rectangle over the other.
4. Now move away one of these rectangles.
  - It can be noticed that both rectangles have remained unaffected.
5. Try to select with "Free Transform Tool" a piece of a rectangle. The entire rectangle will be selected.
Click the image below to see the steps of this example.

Object Drawing example

  - To get to the shapes inside a Drawing Object, double-click it with "Selection tool".
- You can convert a Merge Drawing shape to an Object Drawing shape. Select the shape on the Stage, click the Modify menu -> Combine Objects, and then click Union.
- To convert a Object Drawing shape to a Merge Drawing shape, select the shape, and click Modify -> Brek Apart.

You can extend the Object Drawing mode by creating primitive rectangles and ovals, with Rectangle Primitive tool and Oval Primitive tool, which allows you to edit properties in the "Properties Panel" and specify the corner radius of rectangles and inner radius of ovals.

Daily Test with Code Example

Which tag is used in <table> to create table header cell?
<thead> <th> <td>
  <th>Title 1</th>
  <th>Title 2</th>
Which CSS property sets the distance between lines?
line-height word-spacing margin
.some_class {
  line-height: 150%;
Which function opens a new browser window.
alert() confirm() open()
document.getElementById("id_button").onclick = function(){"");
Indicate the PHP function that returns an array with names of the files and folders inside a directory.
mkdir() scandir() readdir()
$ar_dir = scandir("dir_name");
Merge Drawing and Object Drawing

Last accessed pages

  1. Super Dragon Mahjongg (2554)
  2. Script Users Register, Login, Online (14792)
  3. Create simple Website with PHP (13259)
  4. Voting Poll System script PHP-AJAX (5171)
  5. Rectangle, Oval, Polygon - Star (1482)

Popular pages this month

  1. Qwop (4094)
  2. Bubbles3 (3536)
  3. Butterfly Kyodai (2503)
  4. Zuma Deluxe (2305)
  5. Backgammon (1198)