17 Replies Latest reply on Aug 25, 2007 9:23 PM by kglad

    Changing Properties via AS3

      I'm trying to write the proper AS3 script to change the properties of a single movie clip called blueMC. I'm using input text fields that have instance names with a button next to them to trigger the change in the MC's properties. Here's my code thus far:

      yscale_btn.addEventListener(MouseEvent.CLICK, yScale);
      xscale_btn.addEventListener(MouseEvent.CLICK, xScale);
      alpha_btn.addEventListener(MouseEvent.CLICK, alphaChange);
      rotate_btn.addEventListener(MouseEvent.CLICK, rotateChange);
      xloc_btn.addEventListener(MouseEvent.CLICK, xLoc);
      yloc_btn.addEventListener(MouseEvent.CLICK, yLoc);

      function yScale(event:MouseEvent):void {
      blueMC.scaleY = yScale.text;
      function xScale(event:MouseEvent):void {
      blueMC.scaleX = xScale.text;
      function alphaChange(event:MouseEvent):void {
      blueMC.alpha = alphaChange.text;
      function rotateChange(event:MouseEvent):void {
      blueMC.rotate = rotateChange.text;
      function xLoc(event:MouseEvent):void {
      blueMC.x = xLoc.text;
      function yLoc(event:MouseEvent):void {
      blueMC.y = yLoc.text;

      When I test the movie, I get the following errors: 1023: Incompatible override and 1021: Duplicate Function Definition.

      I don't see anything duplicated in my functions, they all seem pretty unique other than the format. Can you help?