Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drawerings...can I hide the pencil?? 1

Status
Not open for further replies.

endoflux

Technical User
Aug 6, 2001
227
US
I've create a clip that gives the illusion that a sketch is being drawn as the timeline progresses....this is done simply by covering a picture with a white shape, and having a "pencil" to cover the given area you want to draw within a couple frames' range. Once the "pencil" is covering that area of the picture, you delete the portion of the shape under the "pencil", and do a motion tween to move your pencil along, making it look like the lines drawn are coming from the "pencil".

Pretty simple...however, I've come across a problem, because I want to eliminate the pencil as a visible entity. Since it's on a layer above the covering shape, as well as the picture, once the covering shape is removed from an area of the picture, I can't go back over that area (which is necessary to get the "sketching" effect) without blanking out--if only briefly--what I've already done.

Question is, can anyone think of an efficient method to keep the lines already revealed from being covered up, short of manually putting each piece of line into a layer above the "pencil" after drawing it?
 
dude i really don't understand your question..you can use mask to make a drawing effect in flash is that what you mean..i've seen it done before but i have yet to do it..i know there are some tutorials out there about masking and the drawing effect..
e.gif


carlsatterwhite@endangeredgraphics.com
 
check these out:



All of the animation is inside the "Bhorizontal animation" symbol.

there are three layers: the picture, the mass cover (removed in pieces when hidden by the moving cover) and the moving cover. You'll see what's going on pretty quickly :)

Thanks for any advice you can give!!
 
those links do not work...
e.gif


carlsatterwhite@endangeredgraphics.com
 
yeh i see what you mean..you would have to use mask and work your way from left to right..that way you would never have to go back over lines already drawn..

just a thought..
e.gif


carlsatterwhite@endangeredgraphics.com
 
Trouble is, it's a sketch...lines get almost retraced in the animation...

The one way I thought to do it is to create a layer above the other three, and when I'm done with a segment of line, I'd draw the line exactly the same as below in that top layer. That would take care of everything...but it takes such a steady hand and lots of time to get that done well!

Is there a way that I can take what's visible in a layer (given that there's more to the picture there than is visible, but it's covered by another layer) and copy it into another layer, or do you think I'd have to either put the picture on the top layer and progressively delete less and less of the picture for the same effect?
 
how about putting a small section of the drawing inside movie clips..starting from the left have the first movie clip play it's masking tween.. have it draw out each part and at the end of each clip have a stop action to stop the first mc and leave it dormant on the stage..have a _root.gotoandplay("nextmc"); action to start the next animation..and continuing on for the rest of the animation the same way..

just a thought....
e.gif


carlsatterwhite@endangeredgraphics.com
 
but now that i look at it you will have to re-think the way you are sketching it out..your gona have to work from left to right(or right to left)..that is all i can think of for this..i'm sure there probably is a way to script it where the mask that you are using becomes invisible but you will have to ask wangbar or dave design..they are more qualified for this then me..probably what you will need is a script that can tell when the mask is moving over a line that has already been drawn and make itself invisible untill it gets off the pre-drawn line..if this is possible which i am sure it is(for i haven't seen much that flash can't do, except that famous javascript water effect..but that is another story..) they will be the ones who can help you get through this..
e.gif


carlsatterwhite@endangeredgraphics.com
 
Wow...if there was a script that could put visibility of a mapped area to 0 until passed over, I'd be the happiest man alive! :)

Thank for all your help on this; I've got to let it go for the weekend, cause things are just piling up too high on my list of things to do, and these are just personal projects!

I'll start trucking on them again next week though...we'll see what I can engineer!

Thanks again!
 
After looking at your "sketch" drawing itself on the screen it seems to me that the easiest way to get your effect would be to have the whole thing as a keyframed animation.

If you spread it out over, say, 100 frames you could add a "pencil stroke" per frame and you'd get a pretty convincing effect.

To make it I'd put the whole design in the 100 frames, then, on a frame by frame basis convert each one to a keyframe and use the eraser to wipe out a part of the sketch. When you've got to the last frame and the whole picture is gone select all the frames, go to modify>frames>reverse and your animation will flip round and look like it's being drawn line by line.

It's a bit of a cheat :) but it would look pretty good I think.

I'll try to come up with an ActionScript alternative later...
 
Hmmm....That would actually be a MUCH smaller file too...a bit more work, considering what I've put in already, but much less than I have left to do if I plan to do it another way!
 
that has the same problem as he was having..if you look closely when it draws the first e it goes over a previous drawn line at one point and the mask shows..only for a split second though..it worked well because the draweing was going in one direction..never had to cross over a pre-drawn line..
e.gif


carlsatterwhite@endangeredgraphics.com
 
What I ended up doing on this was slowly erasing the picture across 300 frames, then reversing it...it was SO much more simple to do than that we were trying for. However, it made a HUGE file out of it; my swf was 413K, so that's more or less unusable.

I think the best way to make it appear without the marker covering up pieces I've already done would be to "draw" the line, then place that line in a layer above the marker so when it goes back over it, it doesn't over it up. It's a bit of work, but I think it's probably the most practical, given the inflated file size of doing such a large scale drawing the other way.

Thanks TONS to both of you for banging yours heads against mine in getting this to work!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top