Flash Course

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

merge_drawing
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

object_drawing
  - 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

HTML
CSS
JavaScript
PHP-MySQL
Which tag is used to add lists into <ul> and <ol> elements?
<dt> <dd> <li>
<ul>
 <li>http://coursesweb.net/html/</li>
 <li>http://coursesweb.net/css/</li>
</ul>
Which value of the "display" property creates a block box for the content and ads a bullet marker?
block list-item inline-block
.some_class {
  display: list-item;
}
Which instruction converts a JavaScript object into a JSON string.
JSON.parse() JSON.stringify eval()
var obj = {
 "courses": ["php", "javascript", "ajax"]
};
var jsonstr = JSON.stringify(obj);
alert(jsonstr);    // {"courses":["php","javascript","ajax"]}
Indicate the PHP class used to work with HTML and XML content in PHP.
stdClass PDO DOMDocument
$strhtml = '<body><div id="dv1">CoursesWeb.net</div></body>';
$dochtml = new DOMDocument();
$dochtml->loadHTML($strhtml);
$elm = $dochtml->getElementById("dv1");
echo $elm->nodeValue;    // CoursesWeb.net
Merge Drawing and Object Drawing

Last accessed pages

  1. querySelector and querySelectorAll (30124)
  2. sPBM - Simple PHP Backup Manager (3402)
  3. Vue JS - Transition and Animation (490)
  4. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (141749)
  5. Node.js Move and Copy file (28420)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (473)
  2. CSS cursor property - Custom Cursors (79)
  3. The Mastery of Love (70)
  4. PHP-MySQL free course, online tutorials PHP MySQL code (62)
  5. CSS3 2D transforms (46)