0 Replies Latest reply on Jun 10, 2012 7:45 AM by DaronPL

    Problem with AS->XML

    DaronPL

      Hi,
      at first i would say im newbie in flash and dont know all :/

       

      My friend do for me web in flash, and leave town... and now i dont know how to end web:/

       

      Web is showing but there is no gallery - perhaps no xml file:/ dont know how to write this xml:/ Can some 1 help?

       

      at down is my (i thfing) as to gallery and something else. PLS help
      i would know what i must write in xml, what dir, what name, to work my web. Sory for long post:/

       

      _global.tweenMenus = function (ball_mc, t)

      {

          easeType = mx.transitions.easing.Back.easeInOut;

          var _loc3 = ball_mc._y;

          var _loc5 = t;

          var _loc2 = 1;

          var _loc1 = ball_mc;

          var _loc6 = ball_mc._y;

          myTween = new mx.transitions.Tween(_loc1, "_y", easeType, _loc3, _loc5, _loc2, true);

          tweenMenus.onMotionFinished = function ()

          {

          };

      };

      _global.tweenMenu = function (ball_mc, t)

      {

          easeType = mx.transitions.easing.Back.easeOut;

          var _loc3 = ball_mc._x;

          var _loc4 = t;

          var _loc2 = 0.800000;

          var _loc1 = ball_mc;

          ballTween1 = new mx.transitions.Tween(_loc1, "_x", easeType, _loc3, _loc4, _loc2, true);

      };

      _global.scaleMenu = function (ball_mc, t)

      {

          easeType = mx.transitions.easing.Strong.easeOut;

          var _loc2 = ball_mc._xscale;

          var _loc4 = t;

          var _loc1 = 0.600000;

          var _loc3 = ball_mc;

          ballTween2 = new mx.transitions.Tween(_loc3, "_xscale", easeType, _loc2, _loc4, _loc1, true);

          ballTween3 = new mx.transitions.Tween(_loc3, "_yscale", easeType, _loc2, _loc4, _loc1, true);

      };

      var xBegin = 0;

      var picDist = 0;

      _global.tweenMenu2 = function (ball_mc, t)

      {

          easeType = mx.transitions.easing.Back.easeOut;

          var _loc3 = ball_mc._x;

          var _loc4 = t;

          var _loc2 = 2;

          var _loc1 = ball_mc;

          ballTween1 = new mx.transitions.Tween(_loc1, "_x", easeType, _loc3, _loc4, _loc2, true);

      };

      function onFinish(success_boolean, results_obj, xml)

      {

          if (success_boolean)

          {

              play ();

          } // end if

      } // End of the function

      Stage.align = "MC";

      Stage.scaleMode = "noScale";

      _root.gall = url = "27536";

      _root.cacheKiller = "true";

      stop ();

      var parsed_obj = {};

      var unCash = new Date().getTime();

      if (_root.cacheKiller == "true")

      {

          fileToLoad = url + "_main.xml?cacheKiller=" + unCash;

          fileToLoad = url + "_main.xml";

      }

      else

      {

          fileToLoad = url + "_main.xml";

      } // end else if

      gs.dataTransfer.XMLParser.load(fileToLoad, onFinish, parsed_obj);

      function onFinish(success_boolean, gallery_obj, xml)

      {

          if (success_boolean)

          {

              play ();

          } // end if

      } // End of the function

      function loadBitmapSmoothed(url, target)

      {

          var _loc6 = target.createEmptyMovieClip("bmc", target.getNextHighestDepth());

          var _loc2 = new Object();

          _loc2.tmc = target;

          _loc2.onLoadInit = function (mc)

          {

              mc._visible = false;

              var _loc3 = new flash.display.BitmapData(mc._width, mc._height, true);

              this.tmc.attachBitmap(_loc3, this.tmc.getNextHighestDepth(), "auto", true);

              _loc3.draw(mc);

          };

          var _loc4 = new MovieClipLoader();

          _loc4.addListener(_loc2);

          _loc4.loadClip(url, _loc6);

      } // End of the function

      function textSelectable(selectedObject)

      {

          isTextSelected = getSettingsValue(mainObj, "textSelectable", "item");

          if (isTextSelected == "true")

          {

              selectedObject.selectable = true;

          } // end if

      } // End of the function

      function getXmlSection(obj, itemName, sectionName)

      {

          for (i = 0; obj[itemName][i]; i++)

          {

              if (obj[itemName][i].name == sectionName)

              {

                  returnedResult = true;

                  return (i);

                  break;

              } // end if

          } // end of for

      } // End of the function

      function getConfigOption(optionName)

      {

          var _loc1 = getXmlSection(mainObj, "section", "configuration");

          return (mainObj.section[_loc1][optionName][0].value);

      } // End of the function

      function getCurrentFolder(folderNumber)

      {

          sectionNum = getXmlSection(mainObj, "section", "pages");

          fParams = new Array();

          fParams.name = mainObj.section[sectionNum].page[currentPage].gall[0].folder[folderNumber].fName;

          fParams.title = mainObj.section[sectionNum].page[currentPage].gall[0].folder[folderNumber].fTitle;

          return (fParams);

          trace (fParams.name);

      } // End of the function

      function getCurrentFolderImg(folderNumber, imgNumber)

      {

          sectionNum = getXmlSection(mainObj, "section", "pages");

          currentPage = _root.link_gall - _root.firstPageFrame;

          imgParams = new Array();

          imgParams.name = mainObj.section[sectionNum].page[currentPage].gall[0].folder[folderNumber].image[imgNumber].imageUrl;

          imgParams.vid_url = mainObj[sectionNum].page[currentPage].gall[0].folder[folderNumber].image[imgNumber].link;

          imgParams.size = Number(mainObj.section[sectionNum].page[currentPage].gall[0].folder[folderNumber].image[imgNumber].size);

          imgParams.size_width = Number(mainObj.section[sectionNum].page[currentPage].gall[0].folder[folderNumber].image[imgNumber].size_width);

          return (imgParams);

      } // End of the function

      function getGalleryText(textObj, folderNumber, textsNumber, optional)

      {

          sectionNum = getXmlSection(mainObj, "section", "pages");

          textObj.htmlText = mainObj.section[sectionNum].page[currentPage].gall[0].gall_text[0].folder[folderNumber].texts[textsNumber].value;

          if (optional == undefined)

          {

              textSelectable(textObj);


          } // end if

      } // End of the function

      var mainObj = _root.parsed_obj;

      _root.x_pic = Number(_root.getConfigOption("delta_pics"));

      _root.alph = Number(_root.getConfigOption("alpha_bg"));

      _root.delta_scr = Number(_root.getConfigOption("delta_scr"));

      _root.smoth = _root.getConfigOption("pic_smoth");

      _root.pic_ext = _root.getConfigOption("pic_ext");

      firstPageFrame = 1;

      _root.link_gall = 1;

       

       

       

      button:


      on (rollOver)

      {

          gotoAndPlay("s1");

      }

      on (releaseOutside, rollOut)

      {

          gotoAndPlay("s2");

      }

      on (release)

      {

          if (_root.F != 1 && _root.photo < _root.NN && num == 1)

          {

              _parent._parent.ch_sm_pic.sss.for_text.scrolledMC["pictyre" + (_root.photo - 1)].pic_m.gotoAndPlay("s2");

              _root.photo = _root.photo + 1;

              _parent._parent.ch_sm_pic.sss.for_text.scrolledMC["pictyre" + (_root.photo - 1)].pic_m.gotoAndPlay("s1");

              _root.scroller.gotoAndStop("s0");

              _parent.ph2.gotoAndStop(2);

          } // end if

          if (_root.F != 1 && _root.photo > 1 && num == 2)

          {

              _parent._parent.ch_sm_pic.sss.for_text.scrolledMC["pictyre" + (_root.photo - 1)].pic_m.gotoAndPlay("s2");

              _root.photo = _root.photo - 1;

              _parent._parent.ch_sm_pic.sss.for_text.scrolledMC["pictyre" + (_root.photo - 1)].pic_m.gotoAndPlay("s1");

              _root.scroller.gotoAndStop("s0");

              _parent.ph2.gotoAndStop(2);

          } // end if

      }


      onClipEvent (load)

      {

          num_b = 1;

          this.n = 1;

      }

      on (rollOver)

      {

          this.gotoAndPlay("s1");

      }

      on (releaseOutside, rollOut)

      {

          this.gotoAndPlay("s2");

      }

      on (release)

      {

          if (_root.ch_gall != 1 && _root.F != 1)

          {

              _root.gall = num_b;

              _root.kat = num_b - 1;

              _root.photo = 1;

              _root.D = 0;

              _parent._parent._parent.ch_sm_pic.play();

              _parent._parent._parent.ch_ph.play();

              tweenMenus(_root.gallery.ch_ph, 462);

              _root.play();

              _root.prm = 0;

          } // end if

      }



      onClipEvent (load)

      {

          if (_root.smoth != "true")

          {

              loadMovie(_root.url + "_gall_" + (_root.kat + 1) + "_" + _root.photo + _root.pic_ext, this.cont.cont1);

          } // end if

          if (_root.smoth == "true")

          {

              _root.loadBitmapSmoothed(_root.url + "_gall_" + (_root.kat + 1) + "_" + _root.photo + _root.pic_ext, this.cont.cont1);

          } // end if

      }

       

       

       

      var i = 0;

      var x_dist = 0;

      var y_dist = 0;

      var Params = new Object();

      Params.Name = [];

      Params.Size = [];

      Params.Size2 = [];

      Params.Url = [];

      fold = _root.getCurrentFolder(_root.kat);

      _root.getCurrentFolderImg(_root.kat, 0);

      Params.Size[0] = _root.imgParams.size;

      Params.Size2[0] = _root.imgParams.size_width;

      Params.Name[0] = _root.url + _root.imgParams.name;

      Params.Url[0] = _root.imgParams.vid_url;

      while (_root.imgParams.name != undefined)

      {

          Params.Size[i] = _root.imgParams.size;

          Params.Size2[i] = _root.imgParams.size_width;

          Params.Name[i] = _root.url + _root.imgParams.name;

          Params.Url[i] = _root.imgParams.vid_url;

          i = i + 1;

          _root.NN = i;

          _root.getCurrentFolderImg(_root.kat, i);

      } // end while

      counter = i;

      inst._visible = false;

      txt._visible = false;

      var scrolledMC;

      for (i = 0; i < counter; i++)

      {

          str = String("pictyre" + i);

          str2 = String("txt" + i);

          string = Params.Name[i];

          x_dist2 = x_dist + Number(Params.Size2[i]) + _root.x_pic;

          this.scrolledMC.attachMovie("pic_ins", str, this.scrolledMC.getNextHighestDepth(), {_x: x_dist, _y: y_dist});

          loadMovie(string, this.scrolledMC["pictyre" + i].pic_m.pict.cont_pic);

          _root.getGlobalText(this.scrolledMC["txt" + i].thisText, i);

          this.scrolledMC["pictyre" + i].num = i;

          this.scrolledMC["pictyre" + i].var_num = i;

          this.scrolledMC["pictyre" + i].pic_m.pict.cont_pic._alpha = 100;

          this.scrolledMC["pictyre" + i].load_pic._alpha = 100;

          x_dist = x_dist + Number(Params.Size2[i]) + _root.x_pic;

      } // end of for

      this.scrolledMC.pictyre0.pic_m.pict.cont_pic._alpha = 100;

      this.scrolledMC.pictyre0.load_pic._alpha = 100;

      scrolledMC_height = 0;

      for (i = 0; i < counter; i++)

      {

          scrolledMC_height = scrolledMC_height + Params.Size[i] + _root.y_pic;

      } // end of for