hey everybody,

You can often see pages like e.g. http://www.heifer.org/ having a flash 'teaser' which shows animated changing images, short texts and something like a 'discover more' button at the top of the page.

This is what I'm trying to realise with drupal.

Well, I could do this with flash. But I try to make it flexible and open for changes from other users who aren't familiar with flash at all. I don't know if Flash Action Scripting could do something like this in drupal?!? Obviously it could, because http://www.mtv.co.uk (running drupal) has something like this, too. But, do you think it would be possible to do this with drupal and jquery?

I think of something like a new node-type called 'teaser' consisting of an image, maybe some text and a link to an existing node. Then something like a block should randomly select one of these nodes (could be done via PHP or views) and display it in the appropriate place. But now the problem: How do I make jquery load a new random teaser after a delay of some seconds? It's not the delay which causes the problem in this case. This could easily be done by using e.g.
$(document).ready(function() { $("#foo").fadeIn(2000).fadeTo(5000, 1).fadeOut(2000); });
http://p.karageorgakis.com/blog/jquery_simulating_a_delay_function_betwe...

But how do I load the new random teaser? Do I have to use AJAX in this case?

I searched a lot on this topic but couldn't find any existing solution. Do you think my approach to this is right or would it be easier / better to write a new module on this? Unfortunately I'm a bloody noob in module development but I'd try to read about that and learn it.

thanks for your suggestions, comments and hints on this.

greetings
Morgenstern

Comments

plato1123’s picture

I like your ideas, did you ever have any success implementing them? I'm looking for a similar solution but my flash and php knowledge is a tad limited and I know I can come up with a solution but not one worthy of sharing with the drupal community :)

danielb’s picture

I've made plenty of sites with stuff like this. Just use a bit of preprocessing in template.php to output particular nodes as XML feeds that the SWF can use to do it's thing - we've even used Views to generate the feed. The flash has to be custom built for the site by someone who knows how to use actionscript to interpret the XML.
Generally whenever I've done any content changes with jquery they have been a small amount of content, and did not use ajax, but instead just loaded everything up and hid the DIVs it wasn't using until it needed them.