all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

Bullseye Mask


Bullseye Mask krl
5/27/2005 12:00:00 AM
flash actionscript:
Basically I've been trying to mask an image symbol with a bullseye looking
object, but I can't find a way to manipulate the fills right. I wrote the
bullseye in actionscript but the last fill would fill the largest circle making
the mask just one bid circle. I want to see through a every other strip of the
bullseye.
I tried premaking a bullseye by making concentric circles and deleting every
other strip manually. When I liked the object the same problem happened. I
think it didn't work this time because I had to convert the image into a symbol.
Any thoughts on how I can make this work and/or what I'm doing wrong?
Thanks
KRL
Re: Bullseye Mask Rothrock
5/27/2005 12:00:00 AM
I don't think Flash can do what would be called "compound paths" in
Illustrator. A trick is to make a very thin line through the shape, convert the
line to a fill, and then delete the line. This will leave a little gap so the
shape really is compound. You may need to try it a couple of times to get it to
work correctly and not be noticeable.

Also depending upon what exactly you are trying to do you can duplicate layers
and have multiple masks.
Re: Bullseye Mask krl
5/27/2005 12:00:00 AM
I think the multiple layers is porbably going to be the way I have to go.

I think I tried a variation of deleting a line/fill. I made 9 different circle
and colored them differently and stacked them on each other. When I deleted the
strips I could see through the object. But when I converted the shape to a fill
so I could use it in script is where I ran into the problem.

I love scripts so I try to do everything with them. I should probably break
out of this and try using the stage tools.
I've been able to get the effect with using the timelines and graphics, but I
can't get it with ActionScript.

Have you been able to do the compund paths with scripts?
Re: Bullseye Mask rlc5611
5/28/2005 12:00:00 AM
I was able to successfully make a bullseye mask for a jpeg in authoring mode. I
thought Rothrock may be right because, in the past, I have had to have some
sort of continuous link for the fill. Possibly MX 2004 has removed this need. I
made concentric circles and deleted alternative fills and deleted the lines I
had used to make the circles so all I had left was fills. This leftover
bullseye I grouped and then set the mask and it worked correctly. This will not
work if a) the bullseye is drawing in actionscript and/or b) you set the mask
in actionscript using setMask. It only works for a mask defined in the
authoring environment with the mask set in the timeline as far as I can tell.
Re: Bullseye Mask krl
5/28/2005 12:00:00 AM
Thank you. You confirmed what I was seeing. I was able to get it in the
authoring to even with grouping the jpg and the bullseye, but once I tried to
do anything with action script it no longer worked.
There isn't a problem with manipulating the bullseye with actionscript once
you've masked it, is there?
Thanks again.
Re: Bullseye Mask rlc5611
5/28/2005 12:00:00 AM
I think I tried to use the bullseye as a movie clip and it no longer worked so,
that being the case, I would say you could not manipulate it via actionscript.
When I try it without making it a movie clip and trace all the objects in the
movie, I don't see anything to target.
Re: Bullseye Mask krl
5/31/2005 12:00:00 AM
I was able to get a movie clip with a hole to mask and use action script to
move it. But I changed the object somehow and then the clip wouldn't mask with
the hole... I saw it work the once though... Any luck with you?
Re: Bullseye Mask rlc5611
6/1/2005 12:00:00 AM
Re: Bullseye Mask krl
6/1/2005 12:00:00 AM
I have a fla to show you, but I have nowhere to put it at the moment. I created
a clip and am able to manuever it with actionscript with the holes masked
semi-correctly... PM and I can email it to you.
Re: Bullseye Mask I flash therefore I am
6/1/2005 12:00:00 AM
I'm game. Send it to robert dot cox at aramco dot com. It is getting late
but, if you send it, I'll download it in the morning which comes in about 8
hours for me.

Re: Bullseye Mask I flash therefore I am
6/2/2005 12:00:00 AM
I looked at the three files but this just goes back to Rothrock's original
position that Flash cannot handle "compound paths" in a mask. The first one
works because most all the fills are connected (except for the outer ring
that does not show) and even some of the other arcs don't show but that may
just be due to a small separation. The third file is quite fun. There must
be a good use for that!

Re: Bullseye Mask I flash therefore I am
6/2/2005 12:00:00 AM
The closest I can get to a bullseye without connecting everything is to use
text (letter "o") of a suitable font. I made a movie clip of a movie clip of
the letter "o" and then, within the parent, made multiple copies of the
child "o" clip at various scales. It is not exactly a uniform bullseye but
it does mask correctly.

Re: Bullseye Mask krl
6/2/2005 12:00:00 AM
I think the authoring environment with it's limitations pushes you to go to do
scripting sometimes.
At least for this instance I found a loop hole. No pun... (Ever wonder why
people say that when then mean for you to catch the pun?)
Instead of doing like I originally was doing by just making a complete circle
then moving on to the next circle and filling it I decided to take a different
approach. I drew a circle and then then decreased the radius and drew a smaller
circle and ended where I began by making a slit in the 'o', hence a 'c'. I
actually over lap the 'c strip' slightly, but when rendered the 'c'/'o' is
seamless, making a 'donut'. :) Now to actually make the bullseye... :D
Thanks for all the comments.
AddThis Social Bookmark Button