Hi v1ru8,

Sorry, I miss the problem !

there is in the function two Effect.Opacity for the same HTML element,
that are not linked, so what's happend:
- first Effect.Opacity launch (duration of 1s on the "main" element )
- Next some AJAX, and other effects on differents elements,
- To finish, another effect on the "main" element, but previous
Effect.Opacity has normaly not already finished.

==> to resolve this problem, just try to chain all effects, try
something like that to wait launching the second effect AFTER first
one is finish.:


function moveMenuItem(item,ymove,appname){
        if(item != elementDown){

                new Effect.Move(item,{x:0, y: ymove, mode :
'relative'});
                new Effect.Opacity('main', { from: 1, to:
0 ,afterFinish:{
                       new Effect.Opacity('main', { from: 0, to: 1 });
                }});
                new Ajax.Updater('main_menu','include/'+appname+'/
menu.html');
                new Ajax.Updater('main_content','include/'+appname+'/
features.html');

                if(elementDown){
                        new Effect.Move(elementDown,{x:0, y: 0, mode :
'absolute'});
                }
                elementDown = item;

        }

}

I also change the first Effect.Move and modify the option "relative"
to "absolute" (I'm not sure that it's a very good solution but ??).
because as I say, I thought it was a positionning problem.

--
david

On 3 fév, 13:09, david <[email protected]> wrote:
> Hi V1ru8,
>
> I now see the problem. I did really know what the problem is at first
> glance.
>
> I think the problem could be around the position value of differents
> elements, but I could find exactly it.
>
> I have grab the code, and see if I can see something.
>
> --
> david.
>
> On 31 jan, 00:13, V1ru8 <[email protected]> wrote:
>
> > Hi
>
> > Sorry but I had to disable the effect. Now I've re enabled it. Can you
> > take a look now? Would be very nice.
> > Thx
>
> > On Jan 30, 12:36 pm, david <[email protected]> wrote:
>
> > > Hiv1ru8,
>
> > > I did not see anything, I'm using FF3.
> > > Is the problem still there ??
>
> > > --
> > > david
>
> > > On 27 jan, 16:45,V1ru8<[email protected]> wrote:
>
> > > > I use to following js function:
>
> > > > function moveMenuItem(item,ymove,appname){
> > > >         if(item != elementDown){
>
> > > >                 new Effect.Opacity('main', { from: 1, to: 0 });
> > > >                 new Effect.Move(item,{x:0, y: ymove, mode : 
> > > > 'relative'});
> > > >                 new 
> > > > Ajax.Updater('main_menu','include/'+appname+'/menu.html');
> > > >                 new Ajax.Updater('main_content','include/'+appname+'/
> > > > features.html');
>
> > > >                 if(elementDown){
> > > >                         new Effect.Move(elementDown,{x:0, y: 0, mode : 
> > > > 'absolute'});
> > > >                 }
> > > >                 elementDown = item;
> > > >                 new Effect.Opacity('main', { from: 0, to: 1 });
>
> > > >         }
>
> > > > }
>
> > > > to see it in action:http://apps.v1ru8.net
>
> > > > now after the Opacity has changed back to 1 the div 'main' blinks
> > > > once. What can I do to remove that?
> > > > There is an other problem with the effect. When the moved items are
> > > > moved over the currently changing 'main' div. The moving div is behind
> > > > the flushing div. After the above described blink the moved div is on
> > > > top again. But I want it always on top. how can i change that order? I
> > > > tried to set z-index on the main div to -1 but that didn't helped.
>
> > > > thanks the help
> > > > Thomas
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to