ok, I’m creating an effect in flash mx where lasers follow a guide path and reveal a word beneath. I was setting it up making it drop behind a square where the spark travelled and i used the setmask command to mask it, problem is, the setmask command only works with one instance at a time! Can i group multiple instances with actionscript? Or can i have it dump the squares on a mask layer with actionscript? Any help will be greatly appreciated and i’ll drop the code i have so far if needed.
Oh yeah, I was also wondering if i could just make the script play on every frame without copying it to every frame? I tried the on enter frame deal but it didn’t work.
i’m getting nothing here from people, all i want to do is to group together 2 objects with actionscript, does anyone know if thats possible?
otherwise, can ac make objects or instances appear on a certain layer? ie a mask layer?
Patience grasshoper! We’re all happy to help, but it takes a while to get to everyone. I’ll try to take a look.
However, you can always speed up the process by putting your file here. That way we can have some point to start from, and we’ll know exactly what you’re trying to accomplish.
a = _currentframe;
myMovieX = getProperty(_root.puck, _x);
myMovieY = getProperty(_root.puck, _y);
attachMovie(“baseline5”, “Line”, -1);
this[“Line”]._x = 264;
this[“Line”]._y = 44;
this[“Line”]._xscale = myMovieX - 264;
this[“Line”]._yscale = myMovieY - 44;
attachMovie(“baseline5”, “Line1”, 0);
this[“Line1”]._x = 252;
this[“Line1”]._y = 44;
this[“Line1”]._xscale = myMovieX -252;
this[“Line1”]._yscale = myMovieY - 44;
attachMovie(“mask”, “mask”+a, a);
this[“mask”+a]._x = mymoviex;
this[“mask”+a]._y = mymoviey;
this[“mask”+a]._xscale = 40;
this[“mask”+a]._yscale = 40;
this is the code i’m using, the first 2 attachmovie are for two lines that come out of this guys eyes and go to where the puck is (the puck is the spark that follows the guide lines which is supposed to reveal a word like lasers)
the two line movies are on the same layers each time because as of now i have to repeat the code on each frame because the lasers have to be on every frame following the guide path motion tweens.
a is the current frame and its added to the mask movie instance (just a square) so there is a square left behind where the puck is each time. a is also used to put them on different depths so they dont replace eachother
image is the symbol of the word that i want to be revealed by the left mask objects.
My problem is the setmask command only works on one instance at a time, so the mask just switches through the left over squares on each frame. Hopefully you can understand and help me with this now. Any help with my code or problem is greatly appreciated since i just started coding actionscript. by the way, im using flash mx and i dont want to switch to the new line commands.