Dashcode Animation Code

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

  1. macrumors regular

    Joined:
    Mar 23, 2008
    #1
    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. macrumors newbie

    Joined:
    Feb 25, 2010
    Location:
    San Francisco, CA
    #2
    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