that's a bit more complicated-- if you want to reuse the array (that  
is calling Effect.Parallel more than once), you can use:

var myeffects = [
    [Effect.Appear, 'mydiv', { /* options for appear */ } ],
    [Effect.Fade, 'otherdiv', { /* options for fade */ } ]
];

and later do:

new Effect.Parallel(
   myeffects.map(function(effect){
      return new effect[0](effect[1], Object.extend(effect[2],  
{ sync: true}));
   }, {
     duration: 2.0
});

again, from the top of my head. you might also want to investigate  
the anonymous functions technique outlines by martin.

best,
thomas


Am 13.12.2006 um 15:10 schrieb Javier Martinez:

> Thanks Thomas, but I try to store the effects for use them on  
> Effect.Parallel later.
> At this time I'm making a string with the code and execute them  
> with "eval", but it's weird. There is another way to make this to  
> prepare for Effect.Parallel?
>
> Thanks again!
>
>
> 2006/12/13, Martin Bialasinski <[EMAIL PROTECTED]>:
> I would store anonymous functions in the array like
>
> var myarray = new Array();
> myarray.push(function(){ new Effect.Appear('midiv') });
>
> Then execute one of the functions like myarray[0]()
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to