Hi everyone…just joined the forum. I’m trying to learn more Actionscript and I have a very simple program that is not working. My ultimate goal is to manipulate a mask so I can impart movement to it so it reveals in a eyecatching way.
But, for starters, I can’t get my very simple program to run.
I have three elements in the library; a background picture, a picture to be masked, and a square graphic about 50px by 50px which is to serve as the mask; all are typed MovieClips and have a linkage class matching their symbol names.
Here is my Actionscript code:
/*instantiate the movieclip classes */
var bk1:MovieClip = new backgrd();
var pic1:MovieClip = new picture();
var mask1:MovieClip = new squaremask();
/*specify positioning */
bk1.x = 275;
bk1.y = 200;
pic1.x = 275;
pic1.y = 200;
mask1.x = 275;
mask1.y = 200;
/*add them to the display list */
addChild(pic1);
addChild(bk1);
addChild(mask1);
pic1.mask = mask1;
When I test my fla file, all I see is the background image; there should be a square in the middle that is revealing the targeted picture-be-masked, in this case, pic1.
Would appreciate any help.
captsig