Jump to content
xisto Community
Sign in to follow this  
alexviii

Flash: Actionscript Need Help problem urgent help

Recommended Posts

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:

 

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

 

loader.contentPath= path;

the Actionscript will look for an mc called "button". But what I need is that it refere to the string:

 

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.