-
[F8] non API drawing tool
I have a movieclip in the library with linkage "dot". I would like to make a drawing tool out of this movie clip. Could anyone provide me with a code to make the dot spawn at the mouse point when you click?
-
Pumpkin Carving 2008
Use a mouse listener. Every frame, check the listener. If it's true (mouse is down) then use attachMovie("dot", mcName, depth) and apply mouseX mouseY to your new clip.
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
thanx, ill see how it works
-
383,890,620 polygons
Since I came here from the virus thread, I assume you're considering to use the drawing API as well.
Basically it works like the attaching of the dot movieclip:
1. write something that triggers the current mouse position (either using an onMouse move event or an onEnterFrame)
2. onMousedown set the starting point of the paint process via "moveTo" of the drawing API (be sure to set the linestyle first)
3. while the mouse is down, "lineTo" to the current mouse position.
4. stop drawing when the mouse isn't pressed anymore.
I guess I be able to upload a small demo fla in a few minutes ...
nGFX
-
yea, i just wonderd if you could use a code similar to the API version. It doesnt matter now anyway, because i have created the effect i wanted in API. Thanx for all help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|