# Masking an image loader

**URL:** <https://forum.kirupa.com/t/masking-an-image-loader/290181>\
**Category:** flash\
**Created:** [June 10, 2009, 9:32pm UTC](https://forum.kirupa.com/t/masking-an-image-loader/290181 "2009-06-10T21:32:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobDup12345](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@RobDup12345](https://forum.kirupa.com/u/RobDup12345)\
**Post date:** [June 10, 2009, 9:32pm UTC](https://forum.kirupa.com/t/masking-an-image-loader/290181/1 "2009-06-10T21:32:27Z")

</div>

Hey guys, I’m coming from AS3 and I’m trying to mask a SWF file that’s being imported in but it’s doing something pretty funky. The SWF file is coming in fine, but when I’m masking it, it shows the shape I’m masking with, but it’s also masking because nothing is going beyond its’ edges.

Any ideas?  
Thanks

{

```
var mask_mc:Shape = new Shape();
mask_mc.graphics.beginFill(0x000000);
mask_mc.graphics.drawRect(177, 0, 400, 300);
mask_mc.graphics.endFill();

addChild(mask_mc);

var imageRequest:URLRequest = new URLRequest("motion01.swf");
var imageLoader:Loader = new Loader();
var maskedImageLoader:MovieClip = new MovieClip();
imageLoader.load(imageRequest);
addChild(imageLoader);
mask_mc.mask = maskedImageLoader;
imageLoader.x = 177;
imageLoader.y = 0;

```

}
