load_image_name = function (image)
{
author = image;
author_text = new String(author);
author_field.text = author_text.toUpperCase();
};
portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = function (success)
{
if (success)
{
portfolio_config(portfolio_xml);
}
};
portfolio_config = function (xmlDoc_xml)
{
createEmptyMovieClip("thumb_holder", 1);
var _l1 = 0;
while (_l1 < xmlDoc_xml.childNodes.length)
{
thumb_holder.attachMovie("portfolio_thumb", "thumb" + _l1, _l1, {image: portfolio_xml.childNodes[_l1].childNodes[0].childNodes[0].nodeValue, name: portfolio_xml.childNodes[_l1].childNodes[1].childNodes[0].nodeValue});
if (location_trigger != 1)
{
next_x = 10;
next_y = 10;
location_trigger = 1;
column = 1;
}
else if (column < 5)
{
next_x = next_x + 41;
column = column + 1;
}
else
{
next_x = 10;
next_y = next_y + 33;
column = 1;
} // end if
target = thumb_holder.getInstanceAtDepth(_l1);
target._x = next_x;
target._y = next_y;
_l1++;
} // end while
first_project = portfolio_xml.childNodes[0].childNodes[1].childNodes[0].nodeValue;
//change the below directory relative to the main movie
visuals.loadMovie(rel + "images/" + first_project + ".jpg");
first_image = portfolio_xml.childNodes[0].childNodes[0].childNodes[0].nodeValue;
load_image_name(first_image);
delete first_image;
delete first_project;
delete location_trigger;
delete next_y;
delete next_x;
delete column;
delete target;
};
portfolio_xml.load(rel + "portfolio.xml");
stop();