Keep an array of your movie clips and then loop through the array to set the properties. Also, keep the setting of specific movie clip properties (lor_mc ._xscale= frc_mc._xscale) separate from the setting of generic movie clips (mc._xscale = 300;). Those should be two separate functions.
Also, why is it called getScale if it doesn't "get" anything? Jason Merrill Bank of America Learning & Organization Effectiveness - Technology Solutions >>-----Original Message----- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Laurent CUCHET >>Sent: Monday, September 25, 2006 8:13 AM >>To: Flashcoders mailing list >>Subject: [Flashcoders] >> Simplify >> >>How can I simplify this ? >> >>Thak you >> >>function getScale(mc:MovieClip) { >> al_mc._xscale = >>lor_mc._xscale=frc_mc._xscale=cha_mc._xscale=npc_mc._xscale=pic_mc._xs cale >>=r >>ho_mc._xscale=pro_mc._xscale=bou_mc._xscale=lan_mc._xscale=auv_mc._xsc ale >>=mi >>d_mc._xscale=aqu_mc._xscale=lim_mc._xscale=poi_mc._xscale=cen_mc._xsca le=i >>df >>_mc._xscale=han_mc._xscale=ban_mc._xscale=pad_mc._xscale=bre_mc._xscal e=1 >>00; >> // >> al_mc._yscale = >>lor_mc._yscale=frc_mc._yscale=cha_mc._yscale=npc_mc._yscale=pic_mc._ys cale >>=r >>ho_mc._yscale=pro_mc._yscale=bou_mc._yscale=lan_mc._yscale=auv_mc._ysc ale >>=mi >>d_mc._yscale=aqu_mc._yscale=lim_mc._yscale=poi_mc._yscale=cen_mc._ysca le=i >>df >>_mc._yscale=han_mc._yscale=ban_mc._yscale=pad_mc._yscale=bre_mc._yscal e=1 >>00; >> // >> al_mc._alpha = >>lor_mc._alpha=frc_mc._alpha=cha_mc._alpha=npc_mc._alpha=pic_mc._alpha= rho >>_mc >>._alpha=pro_mc._alpha=bou_mc._alpha=lan_mc._alpha=auv_mc._alpha=mid_mc . >>_alph >>a=aqu_mc._alpha=lim_mc._alpha=poi_mc._alpha=cen_mc._alpha=idf_mc._alph a= >>han_ >>mc._alpha=ban_mc._alpha=pad_mc._alpha=bre_mc._alpha=0; >> // >> al_mc.enabled = >>lor_mc.enabled=frc_mc.enabled=cha_mc.enabled=npc_mc.enabled=pic_mc.ena bl >>ed=r >>ho_mc.enabled=pro_mc.enabled=bou_mc.enabled=lan_mc.enabled=auv_mc.enab l >>ed=mi >>d_mc.enabled=aqu_mc.enabled=lim_mc.enabled=poi_mc.enabled=cen_mc.enabl e >>d=idf >>_mc.enabled=han_mc.enabled=ban_mc.enabled=pad_mc.enabled=bre_mc.enable >>d=fals >>e; >> // >> mc._yscale = 300; >> mc._xscale = 300; >> mc._alpha = 100; >> // mc.enabled = true; >> mc._x = (550-mc._x)/2; >> mc._y = 0; >>} >>_______________________________________________ >>Flashcoders@chattyfig.figleaf.com >>To change your subscription options or search the archive: >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >>Brought to you by Fig Leaf Software >>Premier Authorized Adobe Consulting and Training >>http://www.figleaf.com >>http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com