Fuse Troubles

I know that many are moving to AS3 but I’m still wrapping my head around AS2 (even though I’m now using Flash CS3).

Anyway, I have set a challenge for myself involving Fuse. I’ve made some mods to a script that deals with a button array (see ButtonTest1.swf attached). The code for that is below. All works as expected.

ButtonTest2.swf does not. That code is the same as below except the commented out sections are put in. The trouble is that when the user clicks on a button, it scales down and even sometimes pulses. I don’t understand how a simple colorTo can mess up the scaleTo’s?

import com.mosesSupposes.fuse.*;
// set up zigoEngine
ZigoEngine.simpleSetup(Shortcuts);

// declare the variable that will be the button that is clicked (MovieClip)
var buttonClicked:MovieClip;

// create the array to hold all the names of the movieClips
var myButtonsArray:Array = new Array(this["myButton0"], this["myButton1"], this["myButton2"]);

//
myButton0.onRelease = function():Void  {
 // set the buttonClicked to this
 buttonClicked = this;
 // run the scale buttons down function
 scaleButtonsDown(exception);
  // create the variriable that we pass into the scaleButtonDown func
 var exception = this;
};
//
myButton0.onRollOver = function():Void  {
 // run scale buttons up func and pass in this
 scaleButtonsUp(this);
};

//
myButton0.onRollOut = function():Void  {
 // run scale buttons down function
 scaleButtonsDown();
};
//
myButton1.onRelease = function():Void  {
 buttonClicked = this;
 var exception = this;
 scaleButtonsDown(exception);
};
//
myButton1.onRollOver = function():Void  {
 scaleButtonsUp(this);
};
//
myButton1.onRollOut = function():Void  {
 scaleButtonsDown(null);
};
//
myButton2.onRelease = function():Void  {
 buttonClicked = this;
 var exception = this;
 scaleButtonsDown(exception);
};
//
myButton2.onRollOver = function():Void  {
 scaleButtonsUp(this);
};
//
myButton2.onRollOut = function():Void  {
 scaleButtonsDown(null);
};

// scale buttons down function
scaleButtonsDown = function ():Void {
 // loop through myButtonsArray
 for (var i:Number = 0; i<myButtonsArray.length; i++) {
  // scale all buttons down over a .5 second period
  myButtonsArray*.scalerCrc.scaleTo(100, .5);
  myButtonsArray*.scalerTtl.scaleTo(100, .5);
//myButtonsArray*.scalerCrc.colorTo(0xFFCCCC,.5);
//color change over .5 seconds
  
// make the buttonClicked scale to 100 over .5 seconds
  }
 buttonClicked.scalerCrc.scaleTo(150, 0);
 buttonClicked.scalerTtl.scaleTo(200, 0);
//buttonClicked.scalerCrc.colorTo(0xFF0033);
};

// scale buttons up function
scaleButtonsUp = function (args):Void {
 // scale the args (remember the button passed in this) to 200/150 over .5 seconds
 args.scalerCrc.scaleTo(150, .5);
 args.scalerTtl.scaleTo(200, .5);
//args.scalerCrc.colorTo(0xFF0033,.5);
//color change over .5 seconds
};

// scale all buttons down at start of movie
scaleButtonsDown();

Any help, would be greatly appreciated :slight_smile: