PDA

View Full Version : trying to mask an as



imported_mucho
May 3rd, 2004, 06:12 PM
Hi Everyone,

I created a grid with an AS ano now try to mask it, with another AS.
I think when you look at the below, it becomes pretty clear what I'm trying to do.
Appreciated,

M.

emptyMC._x = 100;
emptyMC._y = 100;
trace (emptyMC)
emptyMC.loadMovie (); {

gridx=3;
for (var i=0;i < 270;i++)
{
dot.duplicateMovieClip("dot"+i,i);
mc=this["dot"+i];
mc._x=gridx*i;
}
dot._visible=0;
}
stop();

Yeldarb
May 3rd, 2004, 07:12 PM
what problem are you having with it?

Digitalosophy
May 3rd, 2004, 07:41 PM
you have to use setMask().

Usage :[AS] main_mc.setMask(mask_mc)[/code]
Parameters:

main_mc The instance name of a movie clip to be masked.

mask_mc The instance name of a movie clip to be a mask.

if thats what u mean

claudio
May 4th, 2004, 10:58 AM
Hi Everyone,

I created a grid with an AS ano now try to mask it, with another AS.
I think when you look at the below, it becomes pretty clear what I'm trying to do.
Appreciated,

M.

emptyMC._x = 100;
emptyMC._y = 100;
trace (emptyMC)
emptyMC.loadMovie (); {

gridx=3;
for (var i=0;i < 270;i++)
{
dot.duplicateMovieClip("dot"+i,i);
mc=this["dot"+i];
mc._x=gridx*i;
}
dot._visible=0;
}
stop();To me this script has got alot of sintax errors :-/
You have emptyMC.loadMovie but no movie to load. Then you open a curly bracket that i don't know what it is for (the one right after loadMovie)

imported_mucho
May 4th, 2004, 11:53 AM
Thanks guys,

I'll try it later and feedback you (@ dif. terminal just now).

thanks,
m.

imported_mucho
May 4th, 2004, 03:06 PM
k, I've attached th fla, so you guys have a better understanding of what I'm trying to do.

A script creates a grid from a 45 degree shifted line, but I want this grid to be in a recangle - that's why I think I should mask it.

hope this helps,

m.