Hi guys me again... One last cry for help..

Ok what i'm basicly trying to do is write a function where i can populate several vars at once by hitting a button... my data is coming from an array ported from xml.. the areas in my array are sectional array.


and the attributes attached to these


Etc etc..

so to trace one bit of the bits of information you would call this array code..

trace (createArtist[1]);

this would display

Andrew Newman

So what i'm basicly doing it trying to make the process easier now i'm no action script wizz more of a designer... so i'm wondering how i can get the following bit of code to work.

the sName needs to be an parameter which i can define..

and the same with the sPos..

i'm ov not coding the thing right cause it's coming up undefined when i trace the values..

i'm really confused... can anyone help me???


function populateCONTENT(sName:String,sPos:Number):Void;

	_root.playMovie = sNamesourcedir[sPos]
	_root.artistName = sNameArtist[sPos]
	_root.medium = sNameMedium[sPos]
	_root.about = sNameAbout[sPos]
	_root.project = sNameProject[sPos]
trace("video file = "+sNamesourcedir[sPos])
trace("artist name = "+sNameArtist[sPos])
trace("medium = "+sNameMedium[sPos])
trace("about = "+sNameAbout[sPos])
trace("project = "+sNameProject[sPos])

//Function Called..