Skip to content

Instantly share code, notes, and snippets.

@zed9h
Created July 18, 2009 16:59
Show Gist options
  • Save zed9h/149618 to your computer and use it in GitHub Desktop.
Save zed9h/149618 to your computer and use it in GitHub Desktop.
flash: trace bitmaps (e.g., an imported movie) on each frame of the timeline.
// http://www.dynamicflash.com/jsfl/
var doc = fl.getDocumentDOM()
var t = doc.getTimeline()
for(i=0; i < t.frameCount; i++) {
t.currentFrame=i
doc.selectAll()
doc.traceBitmap(
64,32,
// i%8? i%4 ? 36 : 48 : 24,
// i%8? i%4 ? 12 : 16 : 8,
"smooth", "few corners")
// threshold An integer that controls the number of colors in your traced bitmap.
// Valid values are integers between 0 and 500.
// minimumArea An integer that specifies the radius measured in pixels.
// Valid values are integers between 1 and 1000.
// curveFit A string that specifies how smoothly outlines are drawn.
// Valid values are: "pixels", "very tight", "tight", "normal",
// "smooth", and "very smooth".
// cornerThreshold A string that is similar to curveFit,
// but it pertains to the corners of the bitmap image.
// Valid values are: "many corners", "normal", and "few corners".
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment