# Dynamic, load, container, mask and nextFrame

**URL:** <https://forum.kirupa.com/t/dynamic-load-container-mask-and-nextframe/92828>\
**Category:** Uncategorized\
**Created:** [October 22, 2003, 9:29am UTC](https://forum.kirupa.com/t/dynamic-load-container-mask-and-nextframe/92828 "2003-10-22T09:29:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)\
**Post date:** [October 22, 2003, 9:29am UTC](https://forum.kirupa.com/t/dynamic-load-container-mask-and-nextframe/92828/1 "2003-10-22T09:29:15Z")

</div>

HI,

I am trying to make my flash more dynamic it’s just a simple photogallery with a mask transition. It works when i have it static.

But now i want to make it dynamic. Here’ part of my code:

```auto

//
this.pArray=["ph_big1.jpg", "ph_big2.jpg", "ph_big3.jpg", "ph_big4.jpg"];

//load the photos in the maskee movieclip
maskee.msk_ph0.loadMovie(this.pathToPics+this.pArray[0],0);
maskee.msk_ph1.loadMovie(this.pathToPics+this.pArray[1],1);
maskee.msk_ph2.loadMovie(this.pathToPics+this.pArray[2],2);
maskee.msk_ph3.loadMovie(this.pathToPics+this.pArray[3],3);

//load the photos in the background movieclip
bg.bg_ph1.loadMovie(this.pathToPics+this.pArray[3],1);
bg.bg_ph2.loadMovie(this.pathToPics+this.pArray[0],2);
bg.bg_ph3.loadMovie(this.pathToPics+this.pArray[1],3);
bg.bg_ph4.loadMovie(this.pathToPics+this.pArray[2],4);

maskee.setMask(mask);

```

More explanation:  
movieclip “bg” is just a movieclip with 4 keyframes each of this key frames has a container (named bg\_ph1 etc)

movieClip “maskee” has the same structured only the sequence of the loaded photos is different.

Further more the “mask” movieclip has the following AS

```auto

_parent.maskee.nextFrame ();
_parent.bg.nextFrame ();
gotoAndPlay (1);

```

but somehow the nextFrame() doesn’t do what i thinkk it would do.  
I already loaded the images in the containers ( based in next frames) or didn’t i ???

It just works for the first one but for the other 3 transitions not.

Any suggestions??
