Created
July 18, 2009 16:59
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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