Image array and loader component issues

im trying to create an array of images and use them in a Loader component. so far ive got this as my code…

SmImgs = [“Images/xpc1.jpg”,“Images/xpc2.jpg”,“Images/xpc3.jpg”,“Images/xpc4.jpg”,“Images/xpc5.jpg”,“Images/xpc6.jpg”,“Images/xpc7.jpg”,“Images/xpc8.jpg”,“Images/xpc9.jpg”,“Images/xpc10.jpg”];
LgImgs = [“Images/xpc1_2.jpg”,“Images/xpc2_2.jpg”,“Images/xpc_23.jpg”,“Images/xpc4_2.jpg”,“Images/xpc5_2.jpg”,“Images/xpc6_2.jpg”,“Images/xpc7_2.jpg”,“Images/xpc8_2.jpg”,“Images/xpc9_2.jpg”,“Images/xpc10_2.jpg”]
IMGList1.contentPath=trace(SmImgs[0])
MainIMG.contentPath=trace(LgImgs[0]);

it would b even better if i could make it just make the array out of watever was in a certain folder…
any help?