Hi all!

Actually I'm working on a "background auto-morph" in order to make a
moving background using effect.morph. So, basically I set up one bg
and each x-time it will change to another bg. So what I have coded:

// first, my init function in order to set the background, I make it
in JS because I do not want to have a CSS conflict ;)
function init()
{
        $('top_frame').setStyle(
        {
                background:'transparent url(top_frame.jpg) no-repeat center 
top',
                width: '1000px',
                height: '275px'
        });
}

// then the "change it" functionality :)
function change()
{
        $('top_frame').morph('background: url(images/top_frame2.jpg) no-
repeat center top; width:1600px;');
        alert('change done');
}

// execute it after the DOM loaded
function bindage()
{
        init();
        alert('init done, lets change it once!');
        change();

}
Event.observe(window, 'load', bindage);

And I have one div named "top_frame" in my HTML. You can see the
example here: http://jinsa.fr/morphbg/test.html

Ok ok, so that worked in my head but don't make it in the real world
(as real that can be the Internet ^^). The effect.morph is launched
because we can see the width change but it do not switch to the other
bgimage :/

Do you have an idea how to make it work?

Thanks,

JF.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to