32 Replies Latest reply on Jun 21, 2011 10:57 PM by Devdariani

    Hello! i need help please!

    Devdariani

      im creating Flash website, and i have Slideshows, many slideshows, i have XMl code which is loading images from external folder,  those slideshows must be on frame by frame , or frame 1 , second slideshow on frame 3 , and also those slideshows must appear when i will click on image which is on the same frame where is the code of xml (slideshow) sorry my english is awful , so anyway here is the xml code

      import fl.transitions.Tween;
      import fl.transitions.easing.*;
      import fl.transitions.TweenEvent;

       

      var my_speed:Number;
      var my_total:Number;
      var my_images:XMLList;

       

      var my_loaders_array:Array=[];
      var my_labels_array:Array=[];
      var my_success_counter:Number=0;
      var my_playback_counter:Number=0;

       

      var my_slideshow:Sprite = new Sprite();
      var my_image_slides:Sprite = new Sprite();
      var my_label_slides:Sprite = new Sprite();
      var my_preloader:TextField;

       

      var my_timer:Timer;
      var my_prev_tween:Tween;
      var my_tweens_array:Array=[];

       

      var my_xml_loader:URLLoader = new URLLoader();
      my_xml_loader.load(new URLRequest("slideshow.xml"));
      my_xml_loader.addEventListener(Event.COMPLETE, processXML);

       

      function processXML(e:Event):void {
          var my_xml:XML=new XML(e.target.data);
          my_speed=my_xml.@SPEED;
          my_images=my_xml.IMAGE;
          my_total=my_images.length();

       

          loadImages();

       

          my_xml_loader.removeEventListener(Event.COMPLETE, processXML);
          my_xml_loader=null;
      }

       

      function loadImages():void {
          for (var i:Number = 0; i < my_total; i++) {
              var my_url:String=my_images[i].@URL;
              var my_loader:Loader = new Loader();
              my_loader.load(new URLRequest(my_url));
              my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
              my_loaders_array.push(my_loader);

       

              var my_label:TextField = new TextField();
              my_label.text=my_images[i].@TITLE;
              my_label.autoSize=TextFieldAutoSize.LEFT;
              my_labels_array.push(my_label);

       

          }

       

          my_preloader = new TextField();
          my_preloader.text="Loading";
          my_preloader.autoSize=TextFieldAutoSize.CENTER;
          my_preloader.x = (stage.stageWidth - my_preloader.width)/2;
          my_preloader.y = (stage.stageHeight - my_preloader.height)/2;
          addChild(my_preloader);

       

      }

       

      function onComplete(e:Event):void {

       

          my_success_counter++;
          if (my_success_counter==my_total) {
              startShow();
          }

       

          var my_loaderInfo:LoaderInfo=LoaderInfo(e.target);
          my_loaderInfo.removeEventListener(Event.COMPLETE, onComplete);

       

      }

       

      function startShow():void {

       

          removeChild(my_preloader);
          my_preloader=null;

       

          addChild(my_slideshow);
          my_slideshow.addChild(my_image_slides);
          my_slideshow.addChild(my_label_slides);

       

          nextImage();

       

          my_timer=new Timer(my_speed*3000);
          my_timer.addEventListener(TimerEvent.TIMER, timerListener);
          my_timer.start();

       

      }

       

      function nextImage():void {

       

          var my_image:Loader=Loader(my_loaders_array[my_playback_counter]);
          my_image_slides.addChild(my_image);
          my_image.x = -150.0;
          my_image.y = -300.0;
          my_tweens_array[0]=new Tween(my_image,"alpha",Strong.easeOut,0,1,1,true);

       

          var my_label:TextField=TextField(my_labels_array[my_playback_counter]);
          my_label_slides.addChild(my_label);
          my_label.x=my_image.x;
          my_label.y=my_image.y+my_image.height;
          my_tweens_array[1]=new Tween(my_label,"alpha",Strong.easeOut,0,1,1,true);

       

      }

       

      function timerListener(e:TimerEvent):void {

       

          hidePrev();

       

          my_playback_counter++;
          if (my_playback_counter==my_total) {
              my_playback_counter=0;
          }
          nextImage();

       

      }

       

      function hidePrev():void {

       

          var my_image:Loader=Loader(my_image_slides.getChildAt(0));
          my_prev_tween=new Tween(my_image,"alpha",Strong.easeOut,1,0,1,true);
          my_prev_tween.addEventListener(TweenEvent.MOTION_FINISH, onFadeOut);

       

          var my_label:TextField=TextField(my_label_slides.getChildAt(0));
          my_tweens_array[2]=new Tween(my_label,"alpha",Strong.easeOut,1,0,1,true);

       

      }

       

      function onFadeOut(e:TweenEvent):void {
          my_image_slides.removeChildAt(0);
          my_label_slides.removeChildAt(0);
      }

       

       

       

      END.

       

       

       

       

       

       

       

       

       

      var my_xml_loader:URLLoader = new URLLoader();
      my_xml_loader.load(new URLRequest("slideshow.xml"));
      my_xml_loader.addEventListener(Event.COMPLETE, processXML);

       

      right here is xml file, Slideshow.xml , when im click on image which must open slideshow , its working , but i already tried to dulpicate those codes (full code) on second frame, im wondering can i add with this Slideshow.xml another one to dont duplicate such a big code again, and when i will click image to slideshow2 will apear, and when i will click image 1 slideshow1 will apear,

       

      sorry for awful explain,

       

      SOMEBODY PLEASE HELP!

        • 1. Re: Hello! i need help please!
          kglad Adobe Community Professional & MVP

          in frame 3, you'll need to loop through your arrays removing the displayobjects from the display list (using removeChild() ).  then reset both arrays and just execute

           

          my_xml_loader.load(new URLRequest("dude.xml"));

           

          ///////////////////////////////// frame 1 code //////////////////////////////////////////////

          import fl.transitions.Tween;
          import fl.transitions.easing.*;
          import fl.transitions.TweenEvent;

           

          var my_speed:Number;
          var my_total:Number;
          var my_images:XMLList;

           

          var my_loaders_array:Array;
          var my_labels_array:Array;

          var my_success_counter:Number=0;
          var my_playback_counter:Number=0;

           

          var my_slideshow:Sprite = new Sprite();
          var my_image_slides:Sprite = new Sprite();
          var my_label_slides:Sprite = new Sprite();
          var my_preloader:TextField;

           

          var my_timer:Timer;
          var my_prev_tween:Tween;
          var my_tweens_array:Array=[];

           

          var my_xml_loader:URLLoader = new URLLoader();
          my_xml_loader.load(new URLRequest("slideshow.xml"));
          my_xml_loader.addEventListener(Event.COMPLETE, processXML);

           

          function processXML(e:Event):void {
              var my_xml:XML=new XML(e.target.data);
              my_speed=my_xml.@SPEED;
              my_images=my_xml.IMAGE;
              my_total=my_images.length();

           

              loadImages();

           

             my_xml_loader.removeEventListener(Event.COMPLETE, processXML);
             my_xml_loader=null;

          }

           

          function loadImages():void {

          my_loaders_array=[];

          my_labels_array=[];

              for (var i:Number = 0; i < my_total; i++) {
                  var my_url:String=my_images[i].@URL;
                  var my_loader:Loader = new Loader();
                  my_loader.load(new URLRequest(my_url));
                  my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
                  my_loaders_array.push(my_loader);

           

                  var my_label:TextField = new TextField();
                  my_label.text=my_images[i].@TITLE;
                  my_label.autoSize=TextFieldAutoSize.LEFT;
                  my_labels_array.push(my_label);

           

              }

           

              my_preloader = new TextField();
              my_preloader.text="Loading";
              my_preloader.autoSize=TextFieldAutoSize.CENTER;
              my_preloader.x = (stage.stageWidth - my_preloader.width)/2;
              my_preloader.y = (stage.stageHeight - my_preloader.height)/2;
              addChild(my_preloader);

           

          }

           

          function onComplete(e:Event):void {

           

              my_success_counter++;
              if (my_success_counter==my_total) {
                  startShow();
              }

           

              var my_loaderInfo:LoaderInfo=LoaderInfo(e.target);
              my_loaderInfo.removeEventListener(Event.COMPLETE, onComplete);

           

          }

           

          function startShow():void {

           

              removeChild(my_preloader);
              my_preloader=null;

           

              addChild(my_slideshow);
              my_slideshow.addChild(my_image_slides);
              my_slideshow.addChild(my_label_slides);

           

              nextImage();

           

              my_timer=new Timer(my_speed*3000);
              my_timer.addEventListener(TimerEvent.TIMER, timerListener);
              my_timer.start();

           

          }

           

          function nextImage():void {

           

              var my_image:Loader=Loader(my_loaders_array[my_playback_counter]);
              my_image_slides.addChild(my_image);
              my_image.x = -150.0;
              my_image.y = -300.0;
              my_tweens_array[0]=new Tween(my_image,"alpha",Strong.easeOut,0,1,1,true);

           

              var my_label:TextField=TextField(my_labels_array[my_playback_counter]);
              my_label_slides.addChild(my_label);
              my_label.x=my_image.x;
              my_label.y=my_image.y+my_image.height;
              my_tweens_array[1]=new Tween(my_label,"alpha",Strong.easeOut,0,1,1,true);

           

          }

           

          function timerListener(e:TimerEvent):void {

           

              hidePrev();

           

              my_playback_counter++;
              if (my_playback_counter==my_total) {
                  my_playback_counter=0;
              }
              nextImage();

           

          }

           

          function hidePrev():void {

           

              var my_image:Loader=Loader(my_image_slides.getChildAt(0));
              my_prev_tween=new Tween(my_image,"alpha",Strong.easeOut,1,0,1,true);
              my_prev_tween.addEventListener(TweenEvent.MOTION_FINISH, onFadeOut);

           

              var my_label:TextField=TextField(my_label_slides.getChildAt(0));
              my_tweens_array[2]=new Tween(my_label,"alpha",Strong.easeOut,1,0,1,true);

           

          }

           

          function onFadeOut(e:TweenEvent):void {
              my_image_slides.removeChildAt(0);
              my_label_slides.removeChildAt(0);
          }

           

          var my_xml_loader:URLLoader = new URLLoader();
          my_xml_loader.load(new URLRequest("slideshow.xml"));
          my_xml_loader.addEventListener(Event.COMPLETE, processXML);

           

          stop();

          /////////////////// end frame 1 code //////////////////////////////

           

           

          ///////////////////// frame 3 code ///////////////////////////////////

          for(var i:int=0;i<my_labels_array.length;i++){

          removeChild(my_labels_array[i]);

          my_labels_array[i]=null

          removeChild(my_loaders_array[i]);

          my_loaders_array[i]=null;

          }

          my_xml_loader.load(new URLRequest("dude.xml"));
          ////////////////////// end frame 3 code ////////////////////////////
          • 2. Re: Hello! i need help please!
            Devdariani Level 1

            1151: A conflict exists with definition my_xml_loader in namespace internal.

             

             

             

             

            i got this.

            • 3. Re: Hello! i need help please!
              kglad Adobe Community Professional & MVP

              that's not from the code i suggested.

               

              create a new fla.  copy and paste the code i suggested into the frames i suggested.

              • 4. Re: Hello! i need help please!
                Devdariani Level 1

                and also i need to add Frame 3 code again on fram5 then 7 and so..

                • 5. Re: Hello! i need help please!
                  Devdariani Level 1

                  ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
                      at flash.display::DisplayObjectContainer/removeChild()
                      at website_fla::Alpha_11/website_fla::frame4()[website_fla.Alpha_11::frame4:3]

                   

                   

                  after i fixed last error i got this when i clicked on frame 3

                  • 6. Re: Hello! i need help please!
                    kglad Adobe Community Professional & MVP

                    use:

                     


                     

                    ///////////////////// frame 3 code ///////////////////////////////////

                    for(var i:int=0;i<my_labels_array.length;i++){

                    if(my_labels_array[i].stage){

                    removeChild(my_labels_array[i]);

                    }

                    my_labels_array[i]=null

                    if(my_loaders_array[i].stage){

                    removeChild(my_loaders_array[i]);

                    }

                    my_loaders_array[i]=null;

                    }

                    my_xml_loader.load(new URLRequest("dude.xml"));
                    ////////////////////// end frame 3 code ////////////////////////////
                    • 7. Re: Hello! i need help please!
                      Devdariani Level 1

                      TypeError: Error #1009: Cannot access a property or method of a null object reference.

                       

                          at website_fla::Alpha_11/website_fla::frame4()[websitei_fla.Alpha_11::frame4:1]

                       

                       

                      second error...\

                       

                       

                      ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
                          at flash.display::DisplayObjectContainer/removeChild()
                          at website_fla::Alpha_11/website_fla::frame4()[website_fla.Alpha_11::fra me4:3]

                       

                       

                      i made everything like you said. but still gettin those errors.

                      • 8. Re: Hello! i need help please!
                        kglad Adobe Community Professional & MVP

                        what's line 1 in frame 4?

                        • 9. Re: Hello! i need help please!
                          Devdariani Level 1

                          for(var i:int=0;i<my_labels_array.length;i++){

                          • 10. Re: Hello! i need help please!
                            kglad Adobe Community Professional & MVP

                            you must be nulling my_labels_array before frame 4 plays.

                            • 11. Re: Hello! i need help please!
                              Devdariani Level 1

                              i dont know how to do that honestly......

                              • 12. Re: Hello! i need help please!
                                kglad Adobe Community Professional & MVP

                                then slideshow.xml isn't loading.

                                • 13. Re: Hello! i need help please!
                                  Devdariani Level 1

                                  Look. Frame 4 code

                                   

                                  for(var i:int=0;i<my_labels_array.length;i++){

                                   

                                  if(my_labels_array[i].stage){

                                   

                                  removeChild(my_labels_array[i]);

                                   

                                  }

                                   

                                  my_labels_array[i]=null

                                   

                                  if(my_loaders_array[i].stage){

                                   

                                  removeChild(my_loaders_array[i]);

                                   

                                  }

                                   

                                  my_loaders_array[i]=null;

                                   

                                  }

                                   

                                  my_xml_loader.load(new URLRequest("dude.xml"));

                                   

                                  ///Frame 1 Code///

                                   

                                  import fl.transitions.Tween;
                                  import fl.transitions.easing.*;
                                  import fl.transitions.TweenEvent;

                                   

                                   

                                   

                                  var my_speed:Number;
                                  var my_total:Number;
                                  var my_images:XMLList;

                                   

                                   

                                   

                                  var my_loaders_array:Array;
                                  var my_labels_array:Array;
                                  var my_success_counter:Number=0;
                                  var my_playback_counter:Number=0;

                                   

                                   

                                   

                                  var my_slideshow:Sprite = new Sprite();
                                  var my_image_slides:Sprite = new Sprite();
                                  var my_label_slides:Sprite = new Sprite();
                                  var my_preloader:TextField;

                                   

                                   

                                   

                                  var my_timer:Timer;
                                  var my_prev_tween:Tween;
                                  var my_tweens_array:Array=[];

                                   

                                   

                                   

                                  var my_xml_loader:URLLoader = new URLLoader();
                                  my_xml_loader.load(new URLRequest("slideshow.xml"));
                                  my_xml_loader.addEventListener(Event.COMPLETE, processXML);

                                   

                                   

                                   

                                  function processXML(e:Event):void {
                                      var my_xml:XML=new XML(e.target.data);
                                      my_speed=my_xml.@SPEED;
                                      my_images=my_xml.IMAGE;
                                      my_total=my_images.length();

                                   

                                   

                                   

                                      loadImages();

                                   

                                   

                                   

                                     my_xml_loader.removeEventListener(Event.COMPLETE, processXML);
                                     my_xml_loader=null;
                                  }

                                   

                                   

                                   

                                  function loadImages():void {

                                   

                                  my_loaders_array=[];

                                   

                                  my_labels_array=[];

                                   

                                      for (var i:Number = 0; i < my_total; i++) {
                                          var my_url:String=my_images[i].@URL;
                                          var my_loader:Loader = new Loader();
                                          my_loader.load(new URLRequest(my_url));
                                          my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
                                          my_loaders_array.push(my_loader);

                                   

                                   

                                   

                                          var my_label:TextField = new TextField();
                                          my_label.text=my_images[i].@TITLE;
                                          my_label.autoSize=TextFieldAutoSize.LEFT;
                                          my_labels_array.push(my_label);

                                   

                                   

                                   

                                      }

                                   

                                   

                                   

                                      my_preloader = new TextField();
                                      my_preloader.text="Loading";
                                      my_preloader.autoSize=TextFieldAutoSize.CENTER;
                                      my_preloader.x = (stage.stageWidth - my_preloader.width)/2;
                                      my_preloader.y = (stage.stageHeight - my_preloader.height)/2;
                                      addChild(my_preloader);

                                   

                                   

                                   

                                  }

                                   

                                   

                                   

                                  function onComplete(e:Event):void {

                                   

                                   

                                   

                                      my_success_counter++;
                                      if (my_success_counter==my_total) {
                                          startShow();
                                      }

                                   

                                   

                                   

                                      var my_loaderInfo:LoaderInfo=LoaderInfo(e.target);
                                      my_loaderInfo.removeEventListener(Event.COMPLETE, onComplete);

                                   

                                   

                                   

                                  }

                                   

                                   

                                   

                                  function startShow():void {

                                   

                                   

                                   

                                      removeChild(my_preloader);
                                      my_preloader=null;

                                   

                                   

                                   

                                      addChild(my_slideshow);
                                      my_slideshow.addChild(my_image_slides);
                                      my_slideshow.addChild(my_label_slides);

                                   

                                   

                                   

                                      nextImage();

                                   

                                   

                                   

                                      my_timer=new Timer(my_speed*3000);
                                      my_timer.addEventListener(TimerEvent.TIMER, timerListener);
                                      my_timer.start();

                                   

                                   

                                   

                                  }

                                   

                                   

                                   

                                  function nextImage():void {

                                   

                                   

                                   

                                      var my_image:Loader=Loader(my_loaders_array[my_playback_counter]);
                                      my_image_slides.addChild(my_image);
                                      my_image.x = -150.0;
                                      my_image.y = -300.0;
                                      my_tweens_array[0]=new Tween(my_image,"alpha",Strong.easeOut,0,1,1,true);

                                   

                                   

                                   

                                      var my_label:TextField=TextField(my_labels_array[my_playback_counter]);
                                      my_label_slides.addChild(my_label);
                                      my_label.x=my_image.x;
                                      my_label.y=my_image.y+my_image.height;
                                      my_tweens_array[1]=new Tween(my_label,"alpha",Strong.easeOut,0,1,1,true);

                                   

                                   

                                   

                                  }

                                   

                                   

                                   

                                  function timerListener(e:TimerEvent):void {

                                   

                                   

                                   

                                      hidePrev();

                                   

                                   

                                   

                                      my_playback_counter++;
                                      if (my_playback_counter==my_total) {
                                          my_playback_counter=0;
                                      }
                                      nextImage();

                                   

                                   

                                   

                                  }

                                   

                                   

                                   

                                  function hidePrev():void {

                                   

                                   

                                   

                                      var my_image:Loader=Loader(my_image_slides.getChildAt(0));
                                      my_prev_tween=new Tween(my_image,"alpha",Strong.easeOut,1,0,1,true);
                                      my_prev_tween.addEventListener(TweenEvent.MOTION_FINISH, onFadeOut);

                                   

                                   

                                   

                                      var my_label:TextField=TextField(my_label_slides.getChildAt(0));
                                      my_tweens_array[2]=new Tween(my_label,"alpha",Strong.easeOut,1,0,1,true);

                                   

                                   

                                   

                                  }

                                   

                                   

                                   

                                  function onFadeOut(e:TweenEvent):void {
                                      my_image_slides.removeChildAt(0);
                                      my_label_slides.removeChildAt(0);
                                  }

                                   

                                   

                                   

                                   

                                   

                                  stop();

                                   

                                  slideshow.xml is loading, but Dude.xml is not loading.................

                                   

                                  i dont understand what is the problem, i really need to fix this , this will sound to you childish, well it is childish but if i will fix this , than my life is saved, but if i wont.... i dont want to even imagen it...

                                  • 14. Re: Hello! i need help please!
                                    kglad Adobe Community Professional & MVP

                                    to confirm it's not loading use the trace() function:

                                     


                                    ///Frame 1 Code///

                                     

                                    import fl.transitions.Tween;
                                    import fl.transitions.easing.*;
                                    import fl.transitions.TweenEvent;

                                     

                                     

                                     

                                    var my_speed:Number;
                                    var my_total:Number;
                                    var my_images:XMLList;

                                     

                                     

                                     

                                    var my_loaders_array:Array;
                                    var my_labels_array:Array;
                                    var my_success_counter:Number=0;
                                    var my_playback_counter:Number=0;

                                     

                                     

                                     

                                    var my_slideshow:Sprite = new Sprite();
                                    var my_image_slides:Sprite = new Sprite();
                                    var my_label_slides:Sprite = new Sprite();
                                    var my_preloader:TextField;

                                     

                                     

                                     

                                    var my_timer:Timer;
                                    var my_prev_tween:Tween;
                                    var my_tweens_array:Array=[];

                                     

                                     

                                     

                                    var my_xml_loader:URLLoader = new URLLoader();
                                    my_xml_loader.load(new URLRequest("slideshow.xml"));
                                    my_xml_loader.addEventListener(Event.COMPLETE, processXML);

                                     

                                     

                                     

                                    function processXML(e:Event):void {
                                        var my_xml:XML=new XML(e.target.data);
                                        my_speed=my_xml.@SPEED;
                                        my_images=my_xml.IMAGE;
                                        my_total=my_images.length();

                                     

                                     

                                    trace("loaded");

                                        loadImages();

                                     

                                     

                                     

                                       my_xml_loader.removeEventListener(Event.COMPLETE, processXML);
                                       my_xml_loader=null;
                                    }

                                     

                                     

                                     

                                    function loadImages():void {

                                     

                                    my_loaders_array=[];

                                     

                                    my_labels_array=[];

                                    trace(my_loaders_array)

                                        for (var i:Number = 0; i < my_total; i++) {
                                            var my_url:String=my_images[i].@URL;
                                            var my_loader:Loader = new Loader();
                                            my_loader.load(new URLRequest(my_url));
                                            my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
                                            my_loaders_array.push(my_loader);

                                     

                                     

                                     

                                            var my_label:TextField = new TextField();
                                            my_label.text=my_images[i].@TITLE;
                                            my_label.autoSize=TextFieldAutoSize.LEFT;
                                            my_labels_array.push(my_label);

                                     

                                     

                                     

                                        }

                                     

                                     

                                     

                                        my_preloader = new TextField();
                                        my_preloader.text="Loading";
                                        my_preloader.autoSize=TextFieldAutoSize.CENTER;
                                        my_preloader.x = (stage.stageWidth - my_preloader.width)/2;
                                        my_preloader.y = (stage.stageHeight - my_preloader.height)/2;
                                        addChild(my_preloader);

                                     

                                     

                                     

                                    }

                                     

                                     

                                     

                                    function onComplete(e:Event):void {

                                     

                                     

                                     

                                        my_success_counter++;
                                        if (my_success_counter==my_total) {
                                            startShow();
                                        }

                                     

                                     

                                     

                                        var my_loaderInfo:LoaderInfo=LoaderInfo(e.target);
                                        my_loaderInfo.removeEventListener(Event.COMPLETE, onComplete);

                                     

                                     

                                     

                                    }

                                     

                                     

                                     

                                    function startShow():void {

                                     

                                     

                                     

                                        removeChild(my_preloader);
                                        my_preloader=null;

                                     

                                     

                                     

                                        addChild(my_slideshow);
                                        my_slideshow.addChild(my_image_slides);
                                        my_slideshow.addChild(my_label_slides);

                                     

                                     

                                     

                                        nextImage();

                                     

                                     

                                     

                                        my_timer=new Timer(my_speed*3000);
                                        my_timer.addEventListener(TimerEvent.TIMER, timerListener);
                                        my_timer.start();

                                     

                                     

                                     

                                    }

                                     

                                     

                                     

                                    function nextImage():void {

                                     

                                     

                                     

                                        var my_image:Loader=Loader(my_loaders_array[my_playback_counter]);
                                        my_image_slides.addChild(my_image);
                                        my_image.x = -150.0;
                                        my_image.y = -300.0;
                                        my_tweens_array[0]=new Tween(my_image,"alpha",Strong.easeOut,0,1,1,true);

                                     

                                     

                                     

                                        var my_label:TextField=TextField(my_labels_array[my_playback_counter]);
                                        my_label_slides.addChild(my_label);
                                        my_label.x=my_image.x;
                                        my_label.y=my_image.y+my_image.height;
                                        my_tweens_array[1]=new Tween(my_label,"alpha",Strong.easeOut,0,1,1,true);

                                     

                                     

                                     

                                    }

                                     

                                     

                                     

                                    function timerListener(e:TimerEvent):void {

                                     

                                     

                                     

                                        hidePrev();

                                     

                                     

                                     

                                        my_playback_counter++;
                                        if (my_playback_counter==my_total) {
                                            my_playback_counter=0;
                                        }
                                        nextImage();

                                     

                                     

                                     

                                    }

                                     

                                     

                                     

                                    function hidePrev():void {

                                     

                                     

                                     

                                        var my_image:Loader=Loader(my_image_slides.getChildAt(0));
                                        my_prev_tween=new Tween(my_image,"alpha",Strong.easeOut,1,0,1,true);
                                        my_prev_tween.addEventListener(TweenEvent.MOTION_FINISH, onFadeOut);

                                     

                                     

                                     

                                        var my_label:TextField=TextField(my_label_slides.getChildAt(0));
                                        my_tweens_array[2]=new Tween(my_label,"alpha",Strong.easeOut,1,0,1,true);

                                     

                                     

                                     

                                    }

                                     

                                     

                                     

                                    function onFadeOut(e:TweenEvent):void {
                                        my_image_slides.removeChildAt(0);
                                        my_label_slides.removeChildAt(0);
                                    }

                                     

                                     

                                     

                                     

                                     

                                    stop();

                                     

                                    /// frame 4 ///

                                    trace(4,my_loaders_array);
                                    • 15. Re: Hello! i need help please!
                                      Devdariani Level 1

                                      this is the answer from OUTPUT

                                       

                                      4 null

                                      • 16. Re: Hello! i need help please!
                                        kglad Adobe Community Professional & MVP

                                        that's what i said.  you're not loading that first xml file.

                                        • 17. Re: Hello! i need help please!
                                          Devdariani Level 1

                                          4 null


                                          this answer is from Frame 4

                                           

                                          on Frame 1 i got Output message: Loaded

                                          • 18. Re: Hello! i need help please!
                                            Devdariani Level 1

                                            what do you mean that im not loading that first xml file?

                                             

                                            if im not loading it , then how can i?

                                            • 19. Re: Hello! i need help please!
                                              kglad Adobe Community Professional & MVP

                                              if you were loading it you would see "loaded".  if you see "loaded", the line below would execute

                                               

                                              loadImages();

                                               

                                              if that executes the loadImages() function would be called and the next trace output would appear (null).  so, something you've posted isn't correct.

                                              • 20. Re: Hello! i need help please!
                                                Devdariani Level 1

                                                give me about 8 min, and ill upload source file okay?

                                                 

                                                Message was edited by: Devdariani

                                                • 21. Re: Hello! i need help please!
                                                  kglad Adobe Community Professional & MVP

                                                  i don't download and correct files unless i'm hired.

                                                   

                                                  someone else may, however.

                                                  • 22. Re: Hello! i need help please!
                                                    Devdariani Level 1

                                                    please download it, i cant fix it, please.....

                                                     

                                                    https://rapidshare.com/files/557586997/web.zip

                                                     

                                                    Please...

                                                     

                                                    its not a virus or something, im not a .......... please trust me

                                                    • 23. Re: Hello! i need help please!
                                                      Devdariani Level 1

                                                      I really need help.. please

                                                      • 24. Re: Hello! i need help please!
                                                        kglad Adobe Community Professional & MVP

                                                        if you want to hire me to fix this send an email via www.kglad.com

                                                         

                                                        but, if you're patient, you might get help for free.

                                                        • 25. Re: Hello! i need help please!
                                                          Devdariani Level 1

                                                          you mean that you need money for that?

                                                          • 26. Re: Hello! i need help please!
                                                            kglad Adobe Community Professional & MVP

                                                            not necessarily but, it appears, you don't value my time.  so, i find that's a good way to limit the amount of time i spend helping any person who doesn't value my time.

                                                            • 27. Re: Hello! i need help please!
                                                              Devdariani Level 1

                                                              well sorry i dont have money, if i had i would send but...sorry...

                                                              • 28. Re: Hello! i need help please!
                                                                kglad Adobe Community Professional & MVP

                                                                no problem.


                                                                • 29. Re: Hello! i need help please!
                                                                  Devdariani Level 1

                                                                  anybody else can help me?

                                                                  • 30. Re: Hello! i need help please!
                                                                    relaxatraja Level 5

                                                                    You should remove all the clips using removeChild on frame 4 that had alreaded loaded in the firstframe. Or else create a function which passes the xml name as an argument and within the function remove all the child and load it again.

                                                                     

                                                                    //declarations

                                                                    var thisSprite:Sprite;

                                                                     

                                                                    function InitSlideshow(xmlname:String){

                                                                    //Check whether the clips are added before, if yes remove all the clips that was added on the stage.

                                                                    if (thisSprite!=null) removeChild(thisSprite);

                                                                    thisSprite=new Sprite();

                                                                     

                                                                    //processEverthing to load slideshow

                                                                    //In your url pass the xml name as a string

                                                                    var request:URLRequest=new URLRequest(xmlname);

                                                                     

                                                                    //your code

                                                                    }

                                                                     

                                                                    //call the funciton on frame1:

                                                                    InitSlideshow("slideshow.xml");

                                                                     

                                                                    //call the function on frame4

                                                                    InitSlideshow("dude.xml");

                                                                     

                                                                    So, everything when call the function at the initial stage you should unload and remove all the clips that you had used on the stage and load it again.

                                                                    • 31. Re: Hello! i need help please!
                                                                      Devdariani Level 1

                                                                      sorry but i dont understand how to do that all , cause i even dont understand so much english, i posted my code at start, maybe you can replace please.... thanks for answer btw...

                                                                      • 32. Re: Hello! i need help please!
                                                                        Devdariani Level 1

                                                                        i dont even understand your explanation , i mean i dont know where to put those codes