PDA

View Full Version : setProperty in masked layer..



lap_dog_shuffle
July 12th, 2002, 01:51 PM
hello..

i'm having some problems setting _x and _y possitions of a movie clip attached (into a clip on a masked layer) using attachMovie..

the code should position the clips icon1-8 on the y axis (100 pixels appart)

the destination movie clip (the one with the actions) resides in a masked layer, i remember reading that there were some problems with masked layers in version 5. (i'm using flash MX on a pee cee)

the movie clip is _root.openwindow.files

ive simplified it a bit but the actions go something like this

---------------------------------

onClipEvent (load) {

for (var counter=1; counter<9; ++counter) {

this.attachMovie("icon", "icon"+counter, counter);
this["icon"+counter]._x= 37;
this["icon"+counter]._y=counter*100;
}
}

----------------------------------

im pretty sure there is nothing wrong with the code.. as it works outside the masked layer..

has anyone run into a problem like this or have a way to get around this..

thanks alot..
/steven

sbeener
July 12th, 2002, 04:32 PM
try setting your mask dynamically, that way you don't hijack the a/s abilities.

make your mask layer a normal movie clip then:

movieYouWantToMask.setMask(MovieThatIsTheMask);

lap_dog_shuffle
July 12th, 2002, 06:34 PM
genius..

i had never come across set mask before..

works a treat

thanks..

/Steven