A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Trace a path

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2001
    Posts
    25

    Trace a path

    I have deep-etched an image of a spectacle frame so that the background and sections where the lenses fit are transparent. After converting to a swf movie, I can easily position the movie over an image of a face to show how the person would look wearing spectacles. I'm now looking for a way to fill the lens spaces with various tints to simulate tinted lenses or sunglasses. Is there a way that I can trace the inner path with script? I'm using Flash MX.

    Any help would be greatly appreciated.

    John Stein

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    682
    If you have a closed path, use the paint brush set to "Paint Inside". Use this to create a mask or a fill.

  3. #3
    Junior Member
    Join Date
    Feb 2001
    Posts
    25
    Thanks for the reply. Any ideas on how to do this with Actionscript?

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Posts
    682
    Aw, you did ask about "with script". Sorry, I missed that. The answer is "no." You can change the tint of a movie with AS. So, if you created a fill, changed it to a movie, you could use AS to change the tint on button press, etc.

  5. #5
    Junior Member
    Join Date
    Feb 2001
    Posts
    25
    Thanks, but creating the fill is where I have my problem. Perhaps the only way is to store the fill as a separate swf when I do the initial deep-etch - unless anyone can come up with a brainwave.

  6. #6
    Senior Member
    Join Date
    Apr 2002
    Posts
    682
    I'm not sure why you think it would need to be an external swf. It can just be a movie that's on stage. You can control it's tint and alpha levels with actionscript. I recently did a proloader for a client who wanted a martini glass to fill with blue liquid as the preloader progressed. Affecting the alpha levels and tint for a lens would be very similar.

  7. #7
    Junior Member
    Join Date
    Feb 2001
    Posts
    25
    Sorry, I didn't give the full picture. I have about 1000 images of spectacle frames - all different shapes and colors. The idea is to choose from the database of images and then 'apply' a tint.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center