# \[Flex\] setMask problem in external swf

**URL:** https://forum.kirupa.com/t/flex-setmask-problem-in-external-swf/268127
**Category:** flash
**Created:** [August 10, 2008, 10:22am UTC](https://forum.kirupa.com/t/flex-setmask-problem-in-external-swf/268127 "2008-08-10T10:22:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![theHollow](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thehollow/32/106_2.png) [@theHollow](https://forum.kirupa.com/u/theHollow)
#### Post date: [August 10, 2008, 10:22am UTC](https://forum.kirupa.com/t/flex-setmask-problem-in-external-swf/268127/1 "2008-08-10T10:22:07Z")

</div>

This is driving me crazy.

Ok, firstly, in the initialise function on one of my objects, I have this line:

```auto
this.topview_mc.setMask(this.topviewmask_mc);

```

topviewmask\_mc is a movieclip, topview\_mc is a custom object which extends the movieclip class. The swf this is in is being embedded in a flex movie.

The mask isnt working at all and both objects show on the stage. If I comment this line out and set the this.topviewmask\_mc layer as the mask for the this.topview\_mc layer it works fine, but I would prefer not to do it this way as it’s also happening on some dynamically created/loaded movieclips.

When I get the path values of the two objects I get these:

```auto
_root.topviewboard_mc.topview_mc
_level0.flexi_plan.designboards.FlexLoader276.instance349.topviewboard_mc.topviewmask_mc

```

They are both on the same timeline though.

Any help with this is appreciated.

Thanks,  
Brendan.
