Not sure why that breaks; nothing is screaming at me.  However, you may
just want to use Element.setOpacity if you don't want it to be a fade
effect.  It just immediately sets the opacity to the desired setting.  I
believe this is how you'd write it:

Element.setOpacity(aObjectnames[i], 0);

Greg

> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:rails-spinoffs-
> [EMAIL PROTECTED] On Behalf Of G r U M P
> Sent: Wednesday, July 26, 2006 12:54 AM
> To: [email protected]
> Subject: [Rails-spinoffs] Silly little bug... should be an easy one...
> 
> Hi everyone... thanks in advance for the help...
> 
> // THE CODE
> aObjectNames = new Array;
> for(i=0;i<35;i++){
>       aObjectNames[i] = 'press_icon'+i;
> }
> 
> for(i=0;i<aObjectNames.length;i++){
>       new Effect.Opacity(aObjectNames[i],{duration: 0,transition:
> Effect.Transitions.linear,from: 1.0, to: 0.0});
> }
> 
> // THE PROBLEM
> The array is populated with the right values... I can also insert the
> value
> directly into the Effect.Opacity statement like:
> 
> new Effect.Opacity('press_icon15', {...
> 
> But if I use it as above with the array value it breaks... I've
actually
> seen and resolved this problem before I think but for some reason
today
> its
> just killing me... any help would be greatly appreciated...
> 
> Thanks!
> Owen
> 
> 
> _______________________________________________
> Rails-spinoffs mailing list
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to