0 Replies Latest reply on Dec 10, 2007 9:33 PM by dwkd

    a Little bit of scripting problem

    dwkd Level 1
      I am trying to make a photo gallery from a xml file.
      I have the photos uploaded and displaying correctly in the dinamicly created movie clips but i am trying to also add a link to each photo .. or a property ( startDrag )

      here is my code

      function loadXML(loaded) {
      if (loaded) {
      xmlNode = this.firstChild;
      image = [];
      description = [];
      total = xmlNode.childNodes.length;
      for (i=0; i<total; i++) {
      image = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
      image_width = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
      image_height = xmlNode.childNodes.childNodes[2].firstChild.nodeValue;
      var xmlChildPosition:Number = i;
      _root.createEmptyMovieClip("mc_" +i, getNextHighestDepth());
      _root["mc_" + i]._x =300 * i;
      _root["mc_" + i].loadMovie(image ,i);
      _root["mc_" + i].onRelease = function()
      I am about 90% sure that _root["mc_" + i].onRelease = function() is my problem and onRelease works for buttons not movie clips.
      Is there any other way to do this?
      Also if i mess with the width and height of the movie it will no longer load the photo or i might have to add _root["mc_" + i].play(); wich doesn`t work all the time. As far as width and height values i entered, they were integer.

      Thank You