Moebius -- an infinite scrolling carousel-lite

This is not rolled into an Action yet, but I wanted to get it out there and get some comment. I’ve had a whole lot of requests for a carousel that would not whip backward at the end of the strip. I had a thought about that a couple of days ago, and made a little proof of concept script to make it work. I still have to rip apart Carousel and get it to build one of these, but in the meantime, here’s the way to do it:

Paste that into Protaculous, and choose scriptaculous-packed as your library. The last two lines are example calls to the function, they do not need to be in your page unless that’s what your elements are named.

The construction you need is extremely important. Follow these steps precisely, and the effect will work. Ignore any step at your peril!

  1. Draw a layered HTML box on the page where you want the effect to appear. If you want a border, add one to that element. Set the Overflow on this box to Hidden. While that element is selected…

  2. Choose the HTML tool again, and draw a second box entirely within the first box. This is a nested positioned child. While that second element is selected…

  3. Use the Inspector to set the following properties: left=0, top=0.

  4. Next decide if you are animating horizontally or vertically. If you’re animating horizontally, then (still in the Inspector) set the width to [number of panes] x pane width, and the height to the pane height. If you’re animating vertically, then do the opposite. This box will appear to stick out of the box you made in step 1. Do not be afraid. While that inner box is selected…

  5. Press Return, which gives you a text cursor. Choose Insert / HTML Item. Click on that 100px box and set its height and width to your desired pane size (the same as the box you drew in step 1). Use this box to make your first pane, then copy it, double-click inside the box you made in step 2 and paste as many times as you have remaining panes. Alter them to become the other panes.

  6. Go back to Protaculous and alter the example code to reflect the name of the box you made in step 1, your desired direction and other options, and preview. For example:

    $(‘item2’).moebius();

This makes a vertical animation at 5 second intervals, with animations that last 4 tenths of a second each. You can change this to:

$('item2').moebius({
	duration: 1, 
	interval: 2, 
	direction: horizontal
}); 

And that gets you an animation that takes 1 second to animate, changes every two seconds, and moves horizontally.

Oh, and that reminds me. If you are doing a horizontal animation, you have to set all of your pane elements created in step 5 to Float: Left.

You can have as many of these on a page as you can stand, they can animate at different intervals and in different directions.

Here’s how the trick works: The script copies the first element you added in step 5 and pastes it at the end of the strip (and adjusts the width or height of the strip to match). When the last (duplicate) element has finished scrolling into view, the strip is snapped back to 0 with no delay or animation. So the last frame (the duplicate) is only really visible while it is moving, and the moment it stops, you’re really looking at the first frame again.

Have fun with this, and if you have any ideas for controls or effects, please let me know.

Walter


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Oh Walt! Why do you do something so interesting at the start of a weekend when my wife has so many things for me to do. Me thinks she is going to be none to pleased with me.

Bryan

p.s. Thanks for your tinkering.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

tried to give it a go but struggle with a

Uncaught ReferenceError: horizontal is not defined

error.

An example set-up:

http://www.kimmich-dm.de/testings/mobiusblank.html

What di I miss?

Cheers

Thomas


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You have to quote the value ‘horizontal’ in the call to the method. Change this bit:

$('car-wrapper').moebius({
	duration: 1, 
	interval: 2, 
	direction: horizontal
});

to this:

$('car-wrapper').moebius({
	duration: 1, 
	interval: 2, 
	direction: 'horizontal'
});

Walter

On Mar 31, 2012, at 1:20 PM, Thomas Kimmich wrote:

Hi Walter,

tried to give it a go but struggle with a

Uncaught ReferenceError: horizontal is not defined

error.

An example set-up:

http://www.kimmich-dm.de/testings/mobiusblank.html

What di I miss?

Cheers

Thomas


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter - did without luck.

Cheers

Thomas


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You need to update your Protaculous Action to the latest. You are running the version appropriate for < 5.5.2.

Walter

On Mar 31, 2012, at 1:20 PM, Thomas Kimmich wrote:

Hi Walter,

tried to give it a go but struggle with a

Uncaught ReferenceError: horizontal is not defined

error.

An example set-up:

http://www.kimmich-dm.de/testings/mobiusblank.html

What di I miss?

Cheers

Thomas


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Also, you have Clear: Left set on the first pane, and that is killing the float on the last (duplicate) element, which makes it appear below the other panes (and thus invisible).

Walter

On Mar 31, 2012, at 2:31 PM, Walter Lee Davis wrote:

You need to update your Protaculous Action to the latest. You are running the version appropriate for < 5.5.2.

Walter

On Mar 31, 2012, at 1:20 PM, Thomas Kimmich wrote:

Hi Walter,

tried to give it a go but struggle with a

Uncaught ReferenceError: horizontal is not defined

error.

An example set-up:

http://www.kimmich-dm.de/testings/mobiusblank.html

What di I miss?

Cheers

Thomas


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

so much thanks and apologize:

I knew I did something wrong.

The clear:left is a typical “inline-move” I always do for the first element in a div and the update issue we’ve had these days already - arrggn.

It works and I wrapped this because I always try to do it inline. And I can confirm:

It even works here. That was my goal so the first step could be:

Draw a layered or non layered item …

http://kimmich-dm.de/testings/moebiuscarousel.html

The example above I’ll remove as a testing surrounding for the real one. And of course thanks for the little example via PM.

I knew you wanted to see pane2 and pane3 :-))))

Cheers

Thomas


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

can you show how this would work with an “onClick” event?

Thanks


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Could you say a little more about what you mean? Do you want a click on the Moebius element to do something specific, or do you want to start/stop the effect from a click on another element in the same page?

Walter

On May 8, 2012, at 12:06 AM, anthony wrote:

Hi Walter,

can you show how this would work with an “onClick” event?

Thanks


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I was thinking of using “previous” and “next” buttons to advance to the next frame.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Do you want that to stop the effect (the auto-change) when you do that, or do you want it to just jump to the next and keep on animating?

Walter

On May 8, 2012, at 8:33 PM, anthony wrote:

I was thinking of using “previous” and “next” buttons to advance to the next frame.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No auto-change, or animation - just using buttons to control the frame advances.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

Thanks for this great piece of code.

Is there a way to add navigation?

The type of nav I was thinking of was simple previous/next arrows on the slider and tabs to navigate to individual panes similar to what can be done with the Scripty Carousel Action.

Thanks again,

Ger


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I had another request for that as well. When I get a moment, I will see what it would take to do that. The issue is that we’d either need a second method for pure manual use, with this left as is for automatic use, or there would have to be some clever effect that could start out automatic and then stop the auto if a manual navigation option was pressed. And after that, then what? Do we wait a good long time for another click and failing that, start the auto back up again?

Walter

On May 16, 2012, at 4:48 AM, Ger wrote:

Hi Walter,

Thanks for this great piece of code.

Is there a way to add navigation?

The type of nav I was thinking of was simple previous/next arrows on the slider and tabs to navigate to individual panes similar to what can be done with the Scripty Carousel Action.

Thanks again,

Ger


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options