RE: [Flashcoders] >> MC not pressed
Untested but what about something like this: [as] var btns = new Array(mc0_btn, mc1_btn, mc2_btn, mc3_btn, mc4_btn, mc5_btn); function scaleUp(mc) { mc._xscale = mc._yscale=150; } function scaleDown(mc) { mc._xscale = mc._yscale=50; } function hiliteButton(btn_num, transFuncOn, transFuncOff) { var l = btns.length; for (var i = 0; i -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Laurent CUCHET > Sent: 20 September 2006 18:03 > To: Flashcoders mailing list > Subject: [Flashcoders] >> MC not pressed > > There is a lot of mc but I take to explain the case : > They are name A_mc, B_mc and C_mc > > If I press one clip its scale get 300. > How can I do in the same time get 50 to the other not pressed ? > > A_mc.onPress = B_mc.onPress = C_mc.onPress = function() { > this._xscale = this._yscale = 300; > }; > > Thank you very much > ___ > 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
Re: [Flashcoders] >> MC not pressed
What I usually do is two steps: Step 1: go through all the clips and scale them to 50. Step 2: scale the pressed clip back to 300. If you have a lot of clips, you should put them in an array. If they're all nested in a parent clip, with nothing else in that clip, you can use a for...in function to create the array for you: var pressableClips = new Array(); for (i in parentClipName) { pressableClips.push (parentClipName[i]); } Now you can just cycle through the array to scale everything to 50, and then scale the pressed clip to 300. Sorry I haven't tested this so the syntax may not be perfect. Marc At 10:03 AM 9/20/2006, you wrote: There is a lot of mc but I take to explain the case : They are name A_mc, B_mc and C_mc If I press one clip its scale get 300. How can I do in the same time get 50 to the other not pressed ? A_mc.onPress = B_mc.onPress = C_mc.onPress = function() { this._xscale = this._yscale = 300; }; Thank you very much ___ 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
Re: [Flashcoders] >> MC not pressed
Laurent CUCHET escreveu: There is a lot of mc but I take to explain the case : They are name A_mc, B_mc and C_mc If I press one clip its scale get 300. How can I do in the same time get 50 to the other not pressed ? A_mc.onPress = B_mc.onPress = C_mc.onPress = function() { this._xscale = this._yscale = 300; }; Thank you very much ___ 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 function getScale(mc:MovieClip) { A_mc._xscale = B_mc._xscale = C_mc._xscale = 50; A_mc._yscale = B_mc._yscale = C_mc._yscale = 50; // here the secret mc._yscale = 300; mc._xscale = 300; } A_mc.onPress = B_mc.onPress = C_mc.onPress = function() { getScale(this); }; test and show if was this what you want []´s -- Gustavo Teider ( gugateider ) www.gugateider.com Curitiba - PR ___ 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] >> MC not pressed
There is a lot of mc but I take to explain the case : They are name A_mc, B_mc and C_mc If I press one clip its scale get 300. How can I do in the same time get 50 to the other not pressed ? A_mc.onPress = B_mc.onPress = C_mc.onPress = function() { this._xscale = this._yscale = 300; }; Thank you very much ___ 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