PDA

View Full Version : js tween issue



chriskq
06-03-2007, 11:25 PM
Hi all,
im working on a vertical image slider carousel type of thing and have run into a problem with void space issue.

here is where im up too:
http://www.massarcade.com/chris_test...ween/test.html

As im moving all the items within my absolute positioned wrapper (not one at a time) it has to wait until the last item finishes out of the wrapper for them to start at the beginning again (looping).

I have experimented with cloning, but there was too many timing issues.

Instead, do you think it would be possible to make each item append to the bottom after it appears out of sight from the wrapper.

any help i'd appreciate.

Trinithis
06-04-2007, 12:30 AM
Your link is bad.

chriskq
06-04-2007, 01:13 AM
Why did it add the full stops?

oh well ill use tinyurl
http://tinyurl.com/2uyxyx

hope that works

jscheuer1
06-04-2007, 06:03 AM
Timing?

http://home.comcast.net/~jscheuer1/side/files/vertical_slide.htm

chriskq
06-04-2007, 06:29 AM
thats a great demo there.

although i would prefer to use the Tween.js as im already using it for other functions in the site.... dont want to bulk up the js too much.

any other ideas?
Cheers

jscheuer1
06-04-2007, 07:35 AM
It really isn't that much code. If you aren't using any of the controls, you can get rid of this section (or just keep the one(s) you want):


if(arguments[5]){
vslide['reverse'+vslide.num]=function(){cacheobj.d=!cacheobj.d};
vslide['stop'+vslide.num]=function(){cacheobj.pause=1};
vslide['go'+vslide.num]=function(){cacheobj.pause=0};
vslide['up'+vslide.num]=function(){cacheobj.pause=cacheobj.d=0;};
vslide['down'+vslide.num]=function(){cacheobj.pause=0;cacheobj.d=1;};
vslide['obj'+vslide.num]=function(){return cacheobj};
vslide['slow'+vslide.num]=function(){cacheobj.speed=cacheobj.speed-2>0? cacheobj.speed-2 : 0;cacheobj.pause=cacheobj.speed>0? 0 : 1;}
vslide['fast'+vslide.num]=function(){cacheobj.speed=cacheobj.speed+2<9? cacheobj.speed+2 : 9;cacheobj.pause=0;}
vslide['top'+vslide.num]=function(){cacheobj.pause=1;cacheobj.m1[0].style.top=cacheobj.m2[0].style.top=0}
vslide['end'+vslide.num]=function(){cacheobj.pause=1;cacheobj.m1[0].style.top=cacheobj.m2[0].style.top=cacheobj.h+cacheobj.m.offsetHeight+'px'}
vslide['r'+vslide.num]=function(){var el=this;setTimeout(function(){el.onmouseout=function(){cacheobj.pause=1};},300);}
}


And, if you aren't using the mouseover pause, this can go too:


if(arguments[4]){
this.m.onmouseover=function(){cacheobj.pause=1};
this.m.onmouseout=function(){cacheobj.pause=0};
}

chriskq
06-20-2007, 11:44 PM
im having issues with this script in Firefox. any one else experienced CPU processing power being drained in FF??
Cheers

jscheuer1
06-21-2007, 01:59 AM
Almost all repetitive calculation scripts require much more processing power in Windows if you are not using IE. As long as you are at or below 70% it isn't that big of a deal, but I admit the other browsers could do better - especially if MS would release to them the specs required to interface more efficiently with the Windows kernel.

chriskq
06-21-2007, 08:33 AM
Cheers for the help John.

ill show u what it looks like when its finished :)