Tuesday, October 25, 2011

Understanding the difference between Object Drawing Mode vs Merge Drawing Mode in Flash - PART 4 - Flash CS5 Beginners Tutorial


When you use the paint bucket tool to fill the inside of shapes, you'll find that it will sometimes behave differently depending on whether it was drawn in merge mode or object mode.

Let's take a look at an example.

In the image below, you'll see three separate segments drawn using the brush tool in the merge drawing mode.


In the next image, the segments were moved closer so that they would intersect with each other - the two diagonal segments meet each other at the top, while the segment at the bottom touches both diagonal segments. So what we have is a closed area in the shape of a triangle.


And because merge drawings combine when they intersect, what we have now is just one shape with an empty area inside it. We can then use the paint bucket tool to fill this empty area with any color we choose.


Here's the shape with the empty area filled with red.


This works because all the segments merged together to form one closed area. And the paint bucket tool is capable of filling empty areas that are closed. If there is a gap or opening that's too large, then the paint bucket will not be able to fill the area.

Now in the next image, all the segments were drawn in the object drawing mode instead.


If we move the segments to form a triangle, each segment will still be considered separate.


Visually, we may have a triangle, but Flash still sees each segment as separate from each other because they were drawn in the object drawing mode. Therefore, the segments will NOT merge to form into one closed shape. And since we don't have a closed shape, the paint bucket tool will NOT be able to fill the inside.


However, we can actually still use the object drawing mode to create closed areas that can be filled using the paint bucket tool. This can work provided that the shape is drawn in one continuous stroke. In the image below, the triangle was drawn in one continuous stroke instead of drawing three segments separately.


You'll notice that the entire shape is enclosed within just one set of borders. This means that the shape is just one object, unlike the previous example which was made up of three different objects. Because of this, you will be able to fill the inside using the paint bucket tool.



In the final part of this series, we'll learn how to convert an object drawing into a merge drawing and vice versa.

<< PREV: Understanding the difference between Object Drawing Mode vs Merge Drawing Mode in Flash - PART 3


No comments:

Post a Comment