0 Replies - 7138 Views - Last Post: 02 July 2012 - 08:26 AM

#1 captsig  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-July 12

Mask element doesn't "mask"

Posted 02 July 2012 - 08:26 AM

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 */
pic1.mask = mask1;

When I test my fla file, all I see is the background picture; there should be a square in the middle that reveals the target picture "pic1".

Would appreciae any advice you can offer.


This post has been edited by Atli: 02 July 2012 - 10:34 AM
Reason for edit:: Please use [code] tags when posting code.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1