actionscript 3 - Working with Masks in Flash -


i'm having hell of time trying custom mask work on project i'm creating.

the mask i'm trying use applied pixel mask on layer in photoshop doc i'm working off, can't seem figure out proper way layer mask imported flash, compile .swc , called actionscript. (i'm coding in flex)

whats proper workflow getting pixel mask imported photoshop when call:

container.mask = mymask;

it'll show shape want, , not square box size of shape?

thanks in advance, driving me batty!

you'd have convert mask shape in photoshop vector shape, import vector flash.

in photoshop:

  • click on mask's thumbnail in layers palette.
  • in channels palette, click mask's channel click "load channel selection" button @ bottom of palette.
  • open paths palette, click "make work path" button. create vector path of mask area. click newly created path in paths palette. see path in document window.
  • select path selection tool (the black arrow), click path. you'll know it's selected when can see edit handles on path. right-click on path , select define custom shape, give shape name.
  • create new layer, select custom shape tool. select shape created shapes menu in toolbar @ top. click menu arrow next shape tools view custom shape options window. click defined size radio button.
  • click inside window place shape. doesn't matter fill color is, since you're doing import shape layer created in flash.
  • save psd file.

in flash:

  • choose file->import->import library find psd file saved.
  • in flash import settings window, click shape layer created in photoshop. under "import shape layer as:" select "editable paths , layer styles". click ok.
  • flash create assets folder in library of layers imported. in assets folder, you'll see symbol name of custom shape created in photoshop. open symbol , you'll see box fill color used in photoshop, there's mask layer. mask layer vector shape of mask. convert own symbol. can use symbol mask.

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -