5 Replies Latest reply on Jul 21, 2011 6:51 AM by bkrascal

    Help with Flash 3D wall gallery component

    bkrascal

      Hello,

       

      I have a 3D wall component that works well. This component has also a built in slide show mode, so when the clip is inactive for

      5 seconds, the wall shows each element one by one in slideshow mode.

       

      This is great, but the problem is that the slideshow mode kicks in much too fast! When the page opens it takes a few seconds for

      the 3D wall to load. The second it is complete, the user does not get a chance to navigate the wall, but instead it kicks into the slideshow mode!

       

      Here I have included a link for you to see what I mean.

       

      http://www.rouwbrieven.nl//kerst_banner/slideshow.swf

       

       

      I have tried adjusting the code a bit, but it does not effect the timing between the loading of images, and the slideshow mode. The timing in the code seems only to change the timing between showing one image and the next image.

       

      Here is the Code I think is needed to change. Can anyone tell me how to change that built in 5 second delay to approximately 15 seconds? Probably an easy answer, but I just cant figure it out.

       

      Thank you very much in advance!!!

       

      Here is the code...

       

      ------------------------------------------------------------------------------------------ --------

       

       

      import com.flashloaded.Wall3DPro.Wall3DEvent;

      import com.flashloaded.Wall3DPro.Wall3DScrollEvent;

      import com.flashloaded.Wall3DPro.Wall3DImage;

      import flash.events.TimerEvent;

      import flash.utils.Timer;

      import flash.events.MouseEvent;

       

      var _favouritesArray:Array;

      var _imageNowShowing:int;

      var timer:Timer;

       

      // create a timer object that moves through each favourite image in sequence     -------           ((here I tried increasing the value 3500 but all that does is change the timing

      between showing the images in the slideshow mode))

      timer = new Timer(3500); // fires every 3.5 seconds

      timer.repeatCount = 0; // infinite

      timer.addEventListener(TimerEvent.TIMER, showNextImage);

       

      var restartTimer:Timer;

      restartTimer = new Timer(3500); // fires every 3.5 seconds, then 3.5 to the next image      ------------      ((here I tried increasing the value 3500 but all that does is change the timing

      between showing the images in the slideshow mode))

      restartTimer.repeatCount = 1;

      restartTimer.addEventListener(TimerEvent.TIMER, restartImage);

       

      function restartImage(e:TimerEvent):void {

      timer.start();

      restartTimer.stop();

      }

       

      var mySource;

      var inLargeImage = false;

       

      wall.addEventListener(Wall3DEvent.ELEMENT_DESELECTED,clickHandler3);

      function clickHandler3(evt:Wall3DEvent):void{

      inLargeImage = false;

      }

       

       

      wall.addEventListener(Wall3DEvent.ELEMENT_SELECTED,clickHandler2);

       

      function clickHandler2(evt:Wall3DEvent):void{

      inLargeImage = true;

      mySource = evt.element.src;

      restartTimer.stop();

      }

       

      wall.addEventListener(Wall3DEvent.CLICK,clickHandler);

      function clickHandler(evt:Wall3DEvent):void{

      if(inLargeImage == true)

      {

      if(mySource == evt.element.src)

      {

      inLargeImage = false;

      timer.stop();

      restartTimer.start();

      }

      }

      }

       

      wall.addEventListener(Wall3DScrollEvent.SCROLLING_STARTED,zoomingOut);

      function zoomingOut(evt:Wall3DScrollEvent):void

      {

      timer.stop();

      restartTimer.start();

      }

       

      wall.addEventListener(Wall3DEvent.WALL_LOADED, loadedWall);

      function loadedWall(evt:Wall3DEvent):void{

      _favouritesArray = wall.getElementsByParam("favourite","yes");

          _imageNowShowing = -1;

      timer.start();

      }

       

      function showNextImage(e:TimerEvent):void {

      // move on to the next image

      _imageNowShowing++;

      restartTimer.stop();

      if(_imageNowShowing > _favouritesArray.length)

      {

      _imageNowShowing=0;

      }

      wall.showThumbnail(_favouritesArray[_imageNowShowing]);

      }

       

       

      ----------------------------

       

       

      any help would be greatly appreciated!!

       

      thanks...

        • 1. Re: Help with Flash 3D wall gallery component
          robdillon Most Valuable Participant

          The timer "timer" is initially set to run when the Wall3DEvent WALL_LOADED event occurs. I'm guessing that event occurs well before the Wall3DScrollEvent SCROLLING_STARTED event. You could move the call for timer.start() from the wall loaded event function to the scrolling started event. It might be even better if there is a scrolling finished event that you could use.

          • 2. Re: Help with Flash 3D wall gallery component
            bkrascal Level 1

            Hi, good to see you again!

             

            Thanks to you my other project is was success. I hope you got my thank you mail..

             

            Anyway, as you can see, I am playing with this component. Im afraid your advise is just a bit out of my league.

            Though I gave it a shot,.. but Im afraid I was not successful.

             

            may I send you the fla file so maybe you can play with the code?

             

            You were absolutely correct. This version of the wall component was designed to begin the slideshow mode immediately after loading all images

            and when inactive for more than 5 seconds. But it would be more handy if it first loaded and waited for the user to check out the banner first. Then after about

            15 seconds then start the slideshow mode.

             

            Anyway, I sent the fla to your email with the necessary files to support it.

            If its a real brain teaser, then please dont worry. It would be really great if we could figure this out,but if not, it is not terrible.

             

            I hope it is an easy one..

            Good luck! I will keep playing with it...

            • 3. Re: Help with Flash 3D wall gallery component
              robdillon Most Valuable Participant

              I don't know where you sent those files. I didn't receive anything.

              • 4. Re: Help with Flash 3D wall gallery component
                bkrascal Level 1

                I only have the one address from you, so I sent it there. I just resent it.

                 

                Let me know if you receive it ok..

                • 5. Re: Help with Flash 3D wall gallery component
                  bkrascal Level 1

                  Hey Rob,

                   

                  You have been a great help! your solution with this code adjustment.....

                   

                   

                  -----------
                  wall.addEventListener(Wall3DEvent.WALL_LOADED, loadedWall);
                  function loadedWall(evt:Wall3DEvent):void{
                  _favouritesArray = wall.getElementsByParam("favourite","yes");
                      _imageNowShowing = -1;
                  //timer.start();
                  }

                   

                  wall.addEventListener(Wall3DEvent.INTRO_ANIM_COMPLETE,startTheTimer);
                  function startTheTimer(evt:Wall3DEvent):void {
                  timer.start();
                  }
                  -----------

                   

                   

                  Worked like a charm!!!

                   

                  amazing!

                   

                  I have mailed you the missing scripts so that you can play with this, and

                  maybe find out if we can extend the pause from 5 to about 12 seconds  before

                  it goes into slideshow mode.. that would be ideal!

                   

                  thanks in advance. I

                   

                  I will also take your advice and head over to Flashloaded.com for more info.

                   

                  Lets keep in touch..