Graphics Programs Reference
In-Depth Information
We will solve the problem by cutting the letter so that it no longer has a hole. Actually,
we will make two cuts, one going from the outside of the letter into the counter area,
and another going from the counter area back to the outside of the letter. The idea is to
make the cuts in exactly the same place so that they are there but can't be seen. Kind
of a cheap trick, but it works.
Step 3: Create the object data file
We need to create a data file for the letter. Choose File > New. The New Document
dialog box appears as in Figure 9.8. Select the ActionScript file option, and then OK.
Figure 9.8 Setting up an ActionScript file
An Actions window will appear. Create an array named points as shown in line 2, and
then assign the x- and y-coordinates of the letterform to the elements of the array.
Enter the coordinates in counterclockwise order as shown below and on the next page.
// define the coordinates of the letter A
points = new Array();
1
2
3
4
5
6
7
8
9
10
11
points[0] = { x: 75, y:250 }
points[1] = { x: 0, y: 0 }
points[2] = { x: 50, y: 0 }
points[3] = { x: 65, y: 60 }
points[4] = { x:100, y: 60 }
points[5] = { x:100, y:100 }
points[6] = { x: 75, y:100 }
points[7] = { x:100, y:200 }
Search WWH ::




Custom Search