trace outline effect.

  • plecks
  • Novice
  • Novice
  • plecks
  • Posts: 20

Post 3+ Months Ago

i'd like to create an animation in which an animated line traces the contour of an image in a bitmap that i've imported. i've tried shape tweening lines, but it does not produce the desired effect. any suggestions?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

you could do frame by frame animation.

Or use masked animation. While you can't use a line as a mask you can go to Modify/Shape/Convert Lines to Fills and then use it as a mask. Then create the tween behind it to fill the shape with colour, thus appearing to trace it.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

The way this effect is usually done is with Actionscript using the Drawing API since creating an animation of that type by hand could cause the display computer to lag pretty badly.

If you have a decent handle on actionscript the drawing API isn't too difficult to grasp. Take a look at the Kirupa tutorial at: http://www.kirupa.com/developer/actionscript/tricks/drawing_api.htm
for a good start.[/url]
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Actually doing such an animation with actionscript would be more cpu intensive than tweening it, and you don't have as much control.

Difficult shapes are harder to pull off with the drawing API in Flash. Not impossible, but not worth the effort in most cases when doing it manually will be the better choice anyway. Especially when it comes to animating the drawing since the drawing API in Flash outputs the final result of the drawing... so to animate you have to keep drawing a line from point to point to point in an onEnterFrame. So it's not always about the handle on the API, it's the mathematical functions that may need to go into create the animation.

http://www.senocular.com/flash/source.php?id=0.127

Take that source code for example. It's pretty basic if you are drawing shapes with straight lines, but what happens when you need a curve? You can't animate the curveTo() function for that, so you need to mathematically plot the points on the curve and draw to them (possibly manipulating curveTo() between those points for a smoother curve instead of a bunch of lines). It's just not worth it for something that could be so simply done otherwise.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

very true. I sometimes forget that I'm starting to think in actionscript more than in tweens. Not sure if thats good or bad :?

Anyway another option is simply using a mask. as long as all you want is an outline without too many complex internal features. Simply draw your shape/outline and then use a mask to reveal the shape. It will look like the line is being drawn by an invisible pen.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

lol... i guess it depends on if it's good or bad. i suck at flash, but i'm good with actionscript...lol.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.