Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Flash: Actionscript Need Help, problem urgent help
alexviii
post 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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Actionscript(2)
  2. Print With Flash And Datagrids Without Resizing!(3)
  3. Macromedia Flash(9)
  4. How To Get High Quality Gif Images In Flash(1)
  5. Appeal For Flash-related Help [kinda Urgent](0)
  6. Actionscript For Newbies(2)
  7. Playing Flash Movies Without The One-click Activation: Simple Insertion Of Javascript(3)
  8. Flash Player Simpleviewer Using Flickr And Picassa2(0)
  9. Here Is A Really Good Flash Tutorial Site(7)
  10. Flash, Sqlserver And Asp(0)
  11. Flash Tutorial : Realistic Ball Movement(0)
  12. Flash Vs. Java Applets(2)
  13. Flash(3)
  14. Need Sugation About Flash(4)
  15. Contact Form Actionscript(3)
  1. Move The Movie Clip In Flash(2)
  2. Flash Coding(1)
  3. Flash - Streaming Flv With Interactible Objects(3)
  4. Actionscript : Using Loadvars() Online.(5)
  5. Flash Problem(9)
  6. Flash As3 Question(2)
  7. Flash, Php And Facebook Integration(0)


 



- Lo-Fi Version Time is now: 5th September 2008 - 06:07 AM