Results 1 to 9 of 9

Thread: js tween issue

  1. #1
    Join Date
    Apr 2007
    Location
    Sydney, Aust - Downunder
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default js tween issue

    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.

  2. #2
    Join Date
    May 2007
    Location
    USA
    Posts
    373
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Default

    Your link is bad.

  3. #3
    Join Date
    Apr 2007
    Location
    Sydney, Aust - Downunder
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Why did it add the full stops?

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

    hope that works

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

  5. #5
    Join Date
    Apr 2007
    Location
    Sydney, Aust - Downunder
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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):

    Code:
    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:

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

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Apr 2007
    Location
    Sydney, Aust - Downunder
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    im having issues with this script in Firefox. any one else experienced CPU processing power being drained in FF??
    Cheers

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Apr 2007
    Location
    Sydney, Aust - Downunder
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Cheers for the help John.

    ill show u what it looks like when its finished

Bookmarks

Posting Permissions

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