# Dynamic Masking for XML Driven Photo Gallery

**URL:** https://forum.kirupa.com/t/dynamic-masking-for-xml-driven-photo-gallery/288988
**Category:** flash
**Created:** [May 24, 2009, 5:43pm UTC](https://forum.kirupa.com/t/dynamic-masking-for-xml-driven-photo-gallery/288988 "2009-05-24T17:43:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dezamp](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dezamp](https://forum.kirupa.com/u/dezamp)
#### Post date: [May 24, 2009, 5:43pm UTC](https://forum.kirupa.com/t/dynamic-masking-for-xml-driven-photo-gallery/288988/1 "2009-05-24T17:43:25Z")

</div>

I am creating a photo gallery using xml and a thumbnail bar at the side. I want each picture to fit into a square without distorting the image, so I will need to use masks. Currently I am using the loadClip metohd for loading pictures then I am attempting to use onLoadInit to dynamically set the masks. It is hard to show the problem on here so I have here’s the link…

[http://misolad.vndv.com/xml\_gallery.zip](http://misolad.vndv.com/xml_gallery.zip)

It seems that you can’t place “i” values in the onLoadInit part which I tired previously, atm I can only get one to work as you will be able to see.

Cheers
