View Full Version : line drawing effect : should be very simple?
hooman
07-08-2004, 09:25 PM
i read the thread that Jefinho posted, called "Amazing line-drawing-effect" and my question may be similar, but not quite. the responses posted had links to examples that are different from what i want to do.
this is a quick b-day card i made for my cousin: http://geocities.com/flashbirthdaycard/
see the line effect, before the car appears? i've seen that effect in tons of places. i did my keyframe by keyframe...stupid; i'm sure there has to be a way to make this very simple (but "Amazing") effect with actionscript.
please let me know.
thanks,
hooman
petefs
07-08-2004, 09:29 PM
http://proto.layer51.com/d.aspx?f=945
hooman
07-08-2004, 09:32 PM
thanks. that was fast. kind of complex code, but i'll learn it.
senocular
07-08-2004, 09:34 PM
well, its not necessarily easy. It requires quite a bit of management of lines and dynamic drawing progressively over a period of time. This may help:
http://proto.layer51.com/d.aspx?f=952
Note the example in msg7
if you just wanted the bounding box, stick to petefs's link :D
hooman
07-08-2004, 09:40 PM
thanks senocular. i'll try both.
senocular
07-08-2004, 10:05 PM
on a aside note, you can also use the follow-guide-as-you-draw techniquw for more complicated situations. The car for example...
mx-guest2004
07-09-2004, 12:40 PM
Just a question from me:
Are you guys drawing the guide curve (outline of the car) first by the pencil tool over the bitmap of the car?
mx-guest2004
hooman
07-11-2004, 02:13 AM
wow, thanks for the file senocular, that should be a big help to learn by.
hooman
07-11-2004, 02:15 AM
i think i'll try learning the scripting though, because it can reduce file size. i hadn't thought of the guide way though, thanks.
mx-guest2004
07-12-2004, 07:14 AM
Hi,
Is here someone who wants to answer my question above, please? :)
My question was:
Do we draw the guide curve (outline of the car) first by the pencil tool over the bitmap of the car?
senocular
07-12-2004, 03:06 PM
when I drew the car outline, I took a screen shot of the animation provided earlier, put it into fireworks to make a silhouette of the car (black and white 2 color picture with the car black and the background white) and imported that into Flash and used trace bitmap to convert it to vector. From there I just deleted the white space, stroked the remaining car shape and deleted the fill to get the outline. Though, you can draw it with the pencil tool if you want. It doesnt matter, its just a guide like any other. How you make it is up to you.
mx-guest2004
07-12-2004, 04:15 PM
Thanks senocular,
Just one thing since I'm not familiar with fireworks. Can we do the same thing in photoshop? I agree with you that "it's just a guide", but I want to learn the method for the more complicated cases.
mx-guest2004
senocular
07-12-2004, 04:24 PM
yes, any drawing program, basically. But like I said, its not necessary. You could have just traced it in Flash.
gohziyan
04-05-2006, 10:47 AM
hi there,
i hope somebody will reply this cuz i know its a very long ago thread.
im a reall kukoo in flash but i am required to conjuire up a website during my intership.
haa
i want to create the drawing effect too..
but i simply cant understand the actionscript senocular uploaded.
lineStyle(1, 0, 100);
moveTo(glider._x, glider._y);
onEnterFrame = function () {
// get current position of the glider following the guide
curr = {x:glider._x, y:glider._y};
// draw upto the new position along guide
lineTo(curr.x, curr.y);
// compare positions to see if stopped. If stopped, delete enterframe
if (prev && curr.x == prev.x && curr.y == prev.y) {
delete onEnterFrame;
} else {
prev = curr;
}
// assign curr(ent) position to prev(ious) for next comparison
};
which are the parts which makes the gilder follow the path?
please help me.
michy
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.