Targeting a movieclip

hopefully i can explain this clearly… so, i have a loop that attaches clips of the picFrame to a holder clip based on the number of childNodes.
how do i target the selected picFrame clip and have it call the function resizeFrame to change the width of just the border clip inside the picFrame the onRelease was chosen?

i realize under the resize function i have it targeting the holder clip’s width. i just don’t know what else to do and i’ve tried many else’s.

thanks for any help. :slight_smile:

 ActionScript Code:
 [FONT=Courier New][LEFT][COLOR=#000000]**var**[/COLOR] pictures:[COLOR=#0000ff]Array[/COLOR] = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000ff]Array[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

[COLOR=#808080]//var xArray:Array = new Array();[/COLOR]
[COLOR=#808080]//var yArray:Array = new Array();[/COLOR]
[COLOR=#000000]var[/COLOR] newWidth;
[COLOR=#000000]var[/COLOR] newHeight;

xmlData = [COLOR=#000000]new[/COLOR] [COLOR=#0000ff]XML[/COLOR]COLOR=#000000[/COLOR];
xmlData.[COLOR=#0000ff]ignoreWhite[/COLOR] = [COLOR=#000000]true[/COLOR];
xmlData.[COLOR=#0000ff]onLoad[/COLOR] = loadXML;
xmlData.[COLOR=#0000ff]load[/COLOR]COLOR=#000000[/COLOR];

[COLOR=#000000]function[/COLOR] loadXMLCOLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#0000ff]if[/COLOR] COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]
photoNode = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]firstChild[/COLOR].[COLOR=#0000ff]childNodes[/COLOR];
[COLOR=#0000ff]for[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]var[/COLOR] i = [COLOR=#000080]0[/COLOR]; i< photoNode.[COLOR=#0000ff]length[/COLOR]; i++[COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
pictures.[COLOR=#0000ff]push[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#808080]//xArray = photoNode.attributes.xSize;[/COLOR]
[COLOR=#808080]
//yArray = photoNode*.attributes.ySize;[/COLOR]
[COLOR=#000000]var[/COLOR] picFrame:[COLOR=#0000ff]MovieClip[/COLOR] = holder.[COLOR=#0000ff]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“frame”[/COLOR], [COLOR=#ff0000]“frame”[/COLOR] + i, i[COLOR=#000000])[/COLOR];
picFrame.[COLOR=#000080]xWidth[/COLOR] = photoNode[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]attributes[/COLOR].[COLOR=#000080]xSize[/COLOR];
picFrame.[COLOR=#000080]yWidth[/COLOR] = photoNode[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR].[COLOR=#0000ff]attributes[/COLOR].[COLOR=#000080]ySize[/COLOR];
[COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR];
picFrame.[COLOR=#0000ff]_x[/COLOR] = i
COLOR=#000000[/COLOR];
[COLOR=#808080]//[/COLOR]
[COLOR=#808080]//picFrame.border._width = xWidth;[/COLOR]
[COLOR=#808080]//picFrame.border._height = yHeight;[/COLOR]
[COLOR=#808080]//[/COLOR]
[COLOR=#808080]//picFrame.border.xWidth = xWidth;[/COLOR]
[COLOR=#808080]//picFrame.border.yHeight = yHeight;[/COLOR]
[COLOR=#808080]//[/COLOR]
picFrame.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]
newWidth = [COLOR=#0000ff]this[/COLOR].[COLOR=#000080]xWidth[/COLOR];
[COLOR=#0000ff]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]"newWidth = "[/COLOR] + newWidth[COLOR=#000000])[/COLOR];
[COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR];
resizeFrameCOLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#808080]//trace(“loaded”);[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#0000ff]else[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]

[COLOR=#000000]function[/COLOR] resizeFrameCOLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]
[COLOR=#0000ff]if[/COLOR][COLOR=#000000]([/COLOR]newWidth != [COLOR=#000000]null[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR]
holder.[COLOR=#0000ff]_width[/COLOR] = newWidth;
[COLOR=#0000ff]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]"resize = "[/COLOR] + holder[COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]