|
|
|
|
![]() ![]() |
Jan 21 2007, 09:39 AM
Post
#1
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 70 Joined: 5-August 06 From: Rome (born only) Member No.: 27,852 |
hi everyone,
I'm creating a flash movie with the objective of arrange fotos. Almost as a slider show. This .exe file will be inserted in a CD with all the photos. Now every photo in a specified album, have o figure in the bottom and only the one selected in he center, bigger. In order to do that I tried to create, with an XML file (where photos are listed) and a for statment, a mc that contain: a Loader an a transparent button. The button is needed to make the photo selectable. and in the loader the photo it self. I have so the following Actionscript: CODE function assignsmall(){ function loadXML(loaded) { if (loaded) { var xnRootNode:XMLNode = this; nTotalButtons = xnRootNode.firstChild.childNodes.length; for (var i = 0; i<nTotalButtons; i++) { var path= xnRootNode.firstChild.childNodes[i].attributes.jpegURL; var numero= xnRootNode.firstChild.childNodes[i].attributes.num; var imgname= xnRootNode.firstChild.childNodes[i].attributes.imgname; var position= 120*i +240; loader= "load"+i; button= "btn"+i; trace (i+". "+path+" - "+numero+" - "+imgname+" - "+position+" - "+loader); loader.contentPath= path; } } } var xmlData:XML = new XML(); xmlData.ignoreWhite = true; xmlData.load("slides.xml"); xmlData.onLoad = loadXML; } I have here a problem: When I says CODE loader.contentPath= path; the Actionscript will look for an mc called "button". But what I need is that it refere to the string: CODE loader= "load"+i; because there will be more mc called btn1, btn2, btn3, etc.. How do I do? I tried also with setPropriety() but also with this the sintax is nameofmc.setPropriety(). If someone knows how to do that please contact is urgent.. PS: if I wrote the topic in the wrong forum, I m sorry: I didn't find any forum about flash.. 10x, bye. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th September 2008 - 06:07 AM |