View Full Version : animating lines w/ flash mx (this is driving me insane)
01-18-2003, 08:08 AM
I just know there has to be a very simple way to do this, but i can't seem to figure it out. I've tried a few scripts that didn't work how i wanted them to... and i've tried just drawing a partial line and stretching it out and use a motion tween. But when i do that and make the line a movie clip or a graphic....it resises the line and makes it thicker, no idea why it's doing that.
Kirupa.com forums are down right now so you guys are basically my only hope =D. I can't really proceed on w/ a site that im making til i get this worked out, so any help would be greatly appreciated.
Thx A loT =D
01-18-2003, 08:22 AM
with flash mx you don't need to use the old technique of stretching a diagonal line (10x100px) instead just use the new drawing commands, theyr'e in the reference library, so jsut check them out, then you can draw stuff to your hearts content using actionscipt :)
01-18-2003, 06:13 PM
hmmm only thing i could find was lineTo and moveTo.... but they aren't exactly what i want. The example in the reference guide doesn't draw the line in real-time, like as ur watching the movie, a line is being drawn. It just plops the lines out there when you hit the frame.
Sorry im not the most proficient person w/ actionscript yet so i might be missing something obvious, i dunno.
01-18-2003, 06:40 PM
you could try "shape" tweening between two lines. You may want to also look into using shape "hints" with the shape tween if it does odd things. Don't know if that would do what you are looking for, but its something you could try.
01-18-2003, 06:55 PM
in the reference or the actionscript editor go throught hte library like this to see the drawing commands
Objects->Movie->Movie Clip->Drawing Methods
there you should find the following commands
if you open up your reference you should be able to find out how to use this. and you can draw lines as if they're being drawin by the invisible hand this way in an empty movie clip, you can evven create an empty movie clip easily with actionscript so you don't have ot set one up using the nameOfMovieClipiWantToMakeANewMovieClipIn.createEmptyMovieClip(clipname,depth) command.
hope this helps you some more :)
for drawing lines i almost always use masks, haven't gotten into doing them in as yet. create your line at the "drawn" length you want it to be, then create a box in the layer over it (big enough to cover your entire line) and turn it into a symbol. keyframe the box not covering the line at all on your first frame, then make the last keyframe (where you want the line to be "drawn") completely covering the box and tween between those. right-click the layer and select mask and you should be good to go.
01-18-2003, 09:14 PM
fig, you rock dood :buttrock:
Heh i shoulda thought about using masks, thx a lot for the tip.
sadie: I dunno, i can't seem to get anything to work using those scripts.... i guess i just dont know how to go about it wit those.
glad to help :thumbsup:
01-14-2006, 06:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.