dcsimg
A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Problem with simple rotating image gallery

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    26

    Problem with simple rotating image gallery

    So the problem is like... when i hover really fast over my buttons, it feels like flash just has a meltdown and stops running the function i have inside my button onRollOut. Can someone take a peak and see why this is happening?

    File: http://www.crosswebdesigns.net/misc/navSlide.v0.3.fla

    So i got this on frame 2, with frame 1 being reserved for a preloader.

    Code:
    delay = 1500;
    mouseHover = 0;
    Then, i got 5 frames with names "marine", "architectural", etc

    In the first frame "marine" there is the following code (i've only included 1 of the buttons, but there another 4 with identical code where appropriate):

    Code:
    stop();
    //enter current[] and goto[]
    //current[marine][2] -> next[architectural][3]
    mBtn.gotoAndStop("on");//current, everything else not current off (below) [copy "currentBtn" 4]
    aBtn.gotoAndStop("off");
    dBtn.gotoAndStop("off");
    vBtn.gotoAndStop("off");
    iBtn.gotoAndStop("off");
    
    waitTime = setInterval(nextImage, delay);
    function nextImage() {
    	if (mouseHover == 1) {
    		for (i=0; i<=1000; i++) {
    			clearInterval(i);
    		}
    	} else {
    		gotoAndPlay("architectural");//[paste "next" 25]
    		pSlide.gotoAndStop(2);//[paste 19-21]
    		offAlpha = Math.round((mSlide._currentframe/15)*100);
    		pSlide._alpha = offAlpha;
    		trace(pSlide._currentframe);
    		trace(pSlide._alpha);
    		for (i=0; i<=1000; i++) {
    			clearInterval(i);
    		}
    	}
    }
    
    mBtn.onRollOver = function() {//[paste "currentBtn" 4]
    	gotoAndStop("marine");//change "current"
    	mouseHover = 1;
    	for (i=0; i<=1000; i++) {
    		clearInterval(i);
    	}
    }
    
    mBtn.onRollOut = function() {//[paste "currentBtn" 4]
    	pSlide.gotoAndStop(2);//change(currentNumber) [copy 19-21]
    	offAlpha = Math.round((mSlide._currentframe/15)*100);//currentSlide
    	pSlide._alpha = offAlpha;
    		trace(pSlide._currentframe);
    		trace(pSlide._alpha);
    	mouseHover = 0;
    	waitTime = setInterval(nextImage, delay);
    	function nextImage() {
    		gotoAndPlay("architectural");//change "next" [copy "next" 25]
    		for (i=0; i<=1000; i++) {
    			clearInterval(i);
    		}
    	}
    }
    Help, greatly appreciated! Thanks!!
    Last edited by senkei; 05-17-2010 at 02:13 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center