5 Replies Latest reply on Apr 27, 2010 10:48 AM by Ned Murphy

    Help with error #1034


      I'm debugging my project and was on the home stretch when Error #1034 came up. How can Ifix this?


      Attemping to launch and connect to Player using URL D:\WorkBin\Conflict Resolution\Module\conflict.swf
      [SWF] D:\WorkBin\Conflict Resolution\Module\conflict.swf - 6255838 bytes after decompression
      TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Shape@18b7b51 to flash.display.MovieClip.
          at conflict_fla::MainTimeline/onClick()[conflict_fla.MainTimeline::frame858:28]



      import gs.*;
      import gs.easing.*;


      pane1.props = {lx:24, rx:550, ind:1};
      pane2.props = {lx:54, rx:580, ind:2};
      pane3.props = {lx:84, rx:610, ind:3};
      pane4.props = {lx:114, rx:640, ind:4};
      pane5.props = {lx:144, rx:670, ind:5};


      pane1.addEventListener(MouseEvent.CLICK, onClick);
      pane2.addEventListener(MouseEvent.CLICK, onClick);
      pane3.addEventListener(MouseEvent.CLICK, onClick);
      pane4.addEventListener(MouseEvent.CLICK, onClick);
      pane5.addEventListener(MouseEvent.CLICK, onClick);


      function onClick(e:MouseEvent):void
          var clicked:MovieClip = MovieClip(e.target);
          for(var i:int=0; i<numChildren; i++)
              var mc:MovieClip = MovieClip(getChildAt(i));
              if(mc.props.ind <= clicked.props.ind)
                  TweenLite.to(mc, 1, {x:mc.props.lx, ease:Bounce.easeOut});
                  TweenLite.to(mc, 1, {x:mc.props.rx, ease:Bounce.easeOut});