Click to open a URL

15 views
Skip to first unread message

DaveJ

unread,
Nov 26, 2008, 11:54:56 AM11/26/08
to CSS Visual Effects
Hi guys, I am very green with any sort of JS scripting, is there a way
to expand this to allow each picture to reference a URL, which will
open when clicked? I am thinking of developing a iTunes-like coverflow
using this example for my own web-based WinAmp control (yes, on a PC)
via the iPhone/iPod Touch. Not sure where I'd have to extend the code
to do this however, so any help is welcome. Cheers,

Dave

awaybbl

unread,
Nov 28, 2008, 3:57:19 PM11/28/08
to CSS Visual Effects
It wouldn't be that difficult...

The main array could be written so as to include not only the URL of
the image, but also a URL to a link, and even some text.

In the simplest form,

var html_links= Array(
["webapp/10.html"],
["webapp/20.html"],
["webapp/30.html"],
["webapp/40.html"]);

then in the click function, instead of doing the rotateX transform,
you'd do a window.location.href = html_links[i];


also it'd nice to have a piece of text that explains which flow item
is currently in focus, so another array (or a combined array) for some
text description...

var flow_item_desc= Array(
["Item 0"],
["Item 1"],
["Item 2"],
["Item 3"]);

As for implementing, perhaps the owner of the files could look into
doing something. I tried a little mock up for myself, and it seems to
work, but it's not pretty.

DaveJ

unread,
Nov 30, 2008, 11:50:46 AM11/30/08
to CSS Visual Effects

Thanks; not to hijack this thread/group and turn it into javascript
101 but I follow what you are saying, and I'm passing the html_links
array to the global.zflow function but I'm guessing the
FlowDelegate.prototype.clicked function doesn't have access to this?
This doesn't appear to work:

window.location.href = html_links[i];

in that function (when replacing "this.setTransformForCell(cell, i,
transform);"). Is there a better way to do this? Once I get this, I
think adding descriptive text to each image/link wouldn't be an issue
using the same technique.

D.

Enrico Vaccaro

unread,
Nov 30, 2008, 5:08:55 PM11/30/08
to css...@googlegroups.com
I think I put my array in the zflow.js... sorry I deleted the stuff

brente

unread,
Dec 4, 2008, 12:38:52 AM12/4/08
to CSS Visual Effects
I think these are all great ideas. I haven't heard from Charles yet
(creator of Zflow and owner of this group). i hope he hasnt been hit
by a bus or something and is just busy with the holidays or on
vacation.

Anyway, I am going to start a thread of features and try to begin to
implement some of these cool enhancements. Please feel free to chime
in and add what you can. We can upload ZIP files here and see if
Charles will give us access to the dev group so that we can properly
put these changes into SVN for versioning.

cheers, brente

awaybbl

unread,
Dec 19, 2008, 7:52:50 AM12/19/08
to CSS Visual Effects
I'm having an odd effect...

I have a list of 18 images, however, when app runs, the order of the
displayed images does not always start on image 0 of the array.


Sometime it works fine, but other times it almost looks like a random
order. I wouldn't mind a random order, but I use the image as an index
into other pages that get displayed. The order is important since it
calls the other pages based on what image is clicked.
Reply all
Reply to author
Forward
0 new messages