Dashcode Animation Code

Discussion in 'Mac Programming' started by Avizzv92, Apr 4, 2008.

  1. Avizzv92
    Expand Collapse
    macrumors regular

    Mar 23, 2008
    I'm trying to have an object (ovalShape) to move to a right position when clicked on. I'm using the code snippet from the dashcode library. But I can't seem to get it too work.

    Here's the code, tell me if I'm doing something wrong.

    When I do click on the object I get an error "can't find variable fadeHandler"
  2. rmazz
    Expand Collapse
    macrumors newbie

    Feb 25, 2010
    San Francisco, CA
    Correction to Dashcode Animation Code

    I got caught by this one too. It is actually Apple's mistake in the last line:
    new AppleAnimator(500, 13, originalRight, moveToRightPosition, fadeHandler).start();
    should read:
    new AppleAnimator(500, 13, originalRight, moveToRightPosition, moveHandler).start();

    The moveHandler is what is defined in the line above it. Change it and it will work.

Share This Page