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
hi, maybe the problem is in aObjectNames = new Array; should be aObjectNames = new Array(); On 7/26/06, G r U M P <grump604-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > 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 > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
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: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of G r U M P > Sent: Wednesday, July 26, 2006 12:54 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > 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''veactually> seen and resolved this problem before I think but for some reasontoday> its > just killing me... any help would be greatly appreciated... > > Thanks! > Owen > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Use: aObjectNames.each(function(o){$(o).setOpacity(0)}); -Thomas Am 26.07.2006 um 08:53 schrieb G r U M P:> 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 > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs-- Thomas Fuchs wollzelle http://www.wollzelle.com questentier on AIM madrobby on irc.freenode.net http://www.fluxiom.com :: online digital asset management http://script.aculo.us :: Web 2.0 JavaScript http://mir.aculo.us :: Where no web developer has gone before