Embed
Email

Dot-to-Dot Puzzles

Document Sample

Shared by: xiaopangnv
Categories
Tags
Stats
views:
1
posted:
12/11/2011
language:
pages:
5
Dot-to-Dot Puzzles

Step 1:

Create three layers. Call one layer Actions and the other layers Dots and Picture. Lock the dots and

Actions layers.

Step 2:

On the picture layer, draw out your shape. Lock the Picture layer when you are done.









Step 3:

Unlock the dots layer and click on frame 1 and paint on the dots using the paint brush tool and then

select the text tool and add your numbers.

Step 4:

Lock all the layers and then click on frame 1 of the actions layer.



Open the actions box and type in the following code:



_root.createEmptyMovieClip("myLine", 0);



_root.onMouseDown = function() {

myLine.moveTo(_xmouse, _ymouse);

myLine.lineStyle(2, 0xff0000, 100);

_root.onMouseMove = function() {

myLine.lineTo(_xmouse, _ymouse);

}

}



_root.onMouseUp = function() {

_root.onMouseMove = noLine;

}

Step 5:

Delete the picture layer.



Press CTRL+Enter to test your puzzle.



Then pen will draw a red line to join the dots.

Step 6:

To change the colour of the line you need to modify the code slightly.



Look for the bit of code that reads: myLine.lineStyle(2, 0xff0000, 100);



The bit of code you need to change is the colour code which, in this example, starts after 0x.



For example, the code for red lines is ff0000. Black lines are 000000.









If you want to know what your colour code is you can use the colour picker.









Select your colour using the main colour picker. Then use the slide bar to display the colour code.



Using the code from above you would change the code like this:







myLine.lineStyle(2, 0xff0000, 100);



changes to:





myLine.lineStyle(2, 0x 67C925, 100);



Related docs
Other docs by xiaopangnv
180617
Views: 0  |  Downloads: 0
apostar-por-crear-una-empresa
Views: 0  |  Downloads: 0
Contemplative Pedagogy Principles and Design
Views: 1  |  Downloads: 0
PreApplications
Views: 1  |  Downloads: 0
Basic or Pure Science vs. Applied Science
Views: 0  |  Downloads: 0
Algorithmic Problems Related To The Internet
Views: 0  |  Downloads: 0
E07-PC-23-03a_EFET Wish list
Views: 0  |  Downloads: 0
ATT
Views: 2  |  Downloads: 0
1793A_Example
Views: 1  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!