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 to include external CSS file in web page?
<body> <script> <link>
<link href="/templ/style.css" rel="stylesheet" type="text/css" />
Which CSS property sets the text size?
font-weight text-decoration font-size
h2 {
  font-size: 1em;
Indicate the JavaScript property that can add HTML code into an element.
text value innerHTML
document.getElementById("someID").innerHTML = "HTML content";
Click on the function that returns the number of characters of a string in PHP.
count() strlen() stristr()
$str = "";
$nr_chr = strlen($str);
echo $nr_chr;       // 22
Merge Drawing and Object Drawing

Last accessed pages

  1. Remove / Get duplicate array values - Reset array keys in PHP (6698)
  2. jqPlot Charts (4042)
  3. jQuery parent, children and nth-child() (9010)
  4. Santas Ride (31)
  5. Auto Moto Games (4491)

Popular pages this month

  1. Bubbles3 (4787)
  2. Butterfly Kyodai (3589)
  3. Zuma Deluxe (2934)
  4. Backgammon (1742)
  5. Qwop (1741)