You can name you boutons a gneric name: btn_0, btn_1, btn_2, etc

then you have a loop:
for( i = 0; i < buttonNumber; i ++){
   var mc:MovieClip = this["btn_" + i];
   mc.onhoverMC  do something with it

this code is in the buttons container.

Ibrahim Y a écrit :
Now, the question is

   1. how can I loop through all movie clip by code?
   2. how can I change the on hover effect only?


On Mon, Mar 31, 2008 at 4:59 AM, Pedro Taranto <[EMAIL PROTECTED]> wrote:

laurent wrote:
If I remember right you must create a Color object for your mac, then
use color method setRGB to change the mc's tint to the hexadecimal you

var c:Color = new Color( yourMC );
c.setRGB( "0xff0000" );


Ibrahim Y a écrit :
Hello folks,
I have the following case,
I have a lot of movie clips, they have a lot of effect separately (i.e.
each movieclip has it's own effect on hover, on press ...etc) most
implemented in design not in code.
what I want to ask about, most movie clips have on hover effect that
it's color to orange, is there a way in code that can change this
to red for example instead change this effect for each movie clip.

Color class is deprecated, you should use ColorTransform and Tranform


var myTransform : Transform = new Transform(myMc);
var myColor : ColorTransform = new ColorTransform();
myColor.rgb = 0x262626;

//apply the color
myMc.colorTransform = myColor;

Pedro Taranto
Flashcoders mailing list

Flashcoders mailing list

Flashcoders mailing list

Reply via email to