[comp.sys.mac.hypercard] Animate?

bmm@ssc-vax.UUCP (Bruce Mansfield) (05/24/88)

What is the recommended method for animating in hypercard.  I tried
going to successive cards in a stack, waiting a few ticks at each
card, starting from the openCard handler of the first card.  After about 6
cards, however, I get the error "Too Much Recursion".  Why do I get
this error and what does it mean?

											Bruce Mansfield
											Boeing Aerospace
											...!uw-beaver!ssc-vax!bmm

land@hpccc.HP.COM (David M. Land) (05/26/88)

>
> What is the recommended method for animating in hypercard.
> 

If you just want to pick up a piece of a card's art, write a 
script that selects the lasso tool, clicks at a point somewhere
near the edge of the object, drags around the object (this is the
hard part, if the object is complex, you have to type a lot of
drag coordinates), then clicks on the selected object, and drags
it along the animation path at whatever dragspeed is selected.
I've seen this work on a stack called "Talk Tools," available at
your friendly neighborhood BBS.  Mail me if you can't find it.

Dave Land

Disclaimer (or is it Disk-lamer?):

"I work for 'em, but I don't speak for 'em.  If questioned, they
will deny my very existence."

bobg+@andrew.cmu.edu (Robert Steven Glickstein) (05/28/88)

> *Excerpts from ext.nn.comp.sys.mac.hypercard: 26-May-88 Re: Animate? David*
> *M. Land@hpccc.HP.C (721)*

> If you just want to pick up a piece of a card's art, write a
> script that selects the lasso tool, clicks at a point somewhere
> near the edge of the object, drags around the object (this is the
> hard part, if the object is complex, you have to type a lot of
> drag coordinates), then clicks on the selected object, and drags
> it along the animation path at whatever dragspeed is selected.
> I've seen this work on a stack called "Talk Tools," available at
> your friendly neighborhood BBS.

The same technique is used in the "Frog Jumping" animation in the standard
HyperCard help stack.  It's under "HyperTalk", somewhere...

And here's a suggestion to avoid complex drag coordinates when selecting your
image.  Have a separate card for every single image you want to animate.  Lock
the screen, push the current card, go to the card with the desired image,
select the lasso tool, and drag around the four corners of the window.  Since
nothing else is on the card, this will select only the desired image.  Copy it,
pop a card, paste the image, unlock the screen, and then drag your image around.

-Bob Glickstein
-Carnegie Mellon University
-Pittsburgh, PA

julian@riacs.edu (Julian E Gomez) (05/29/88)

In article <1939@ssc-vax.UUCP> bmm@ssc-vax.UUCP (Bruce Mansfield) writes:
" What is the recommended method for animating in hypercard.  I tried
" going to successive cards in a stack, waiting a few ticks at each
" card, starting from the openCard handler of the first card.  After about 6
" cards, however, I get the error "Too Much Recursion".  Why do I get
" this error and what does it mean?

Wouldn't it be easier (admittedly more expensive) to use
the VideoWorks HyperCard driver?

-- 
"Have you ever wondered if taxation without representation was cheaper?"

	Julian "Dr. Wombat" Gomez
	julian@riacs.edu || {...decvax!}ames!riacs!julian

benjamin_kuo@pedro.UUCP (Benjamin Kuo) (05/30/88)

   
  Would you mind posting a little script code, specifically the waiting a 
few ticks, and the areas that give you "Too Much Recursion"? 
  
  It may be your structuring of the ticks.  By the way, you really don't 
need to wait for many ticks when you are animating--HyperCard takes awhile, 
even on a larger meg machine, to load in the next card. 
  

dorner@uxg.cso.uiuc.edu (05/31/88)

>going to successive cards in a stack, waiting a few ticks at each
>card, starting from the openCard handler of the first card.  After about 6
>cards, however, I get the error "Too Much Recursion".  Why do I get
>this error and what does it mean?

I assume you are using something like:

	on openCard
	    <something> -- delay a while
	    go next card
	end

If so, the openCard handlers are probably not getting closed.  The first
card's handler doesn't complete until you are at the next card; you aren't
at the next card until the openCard handler for the next card completes.
The openCard handler for the next card can't complete until you are at
the third card...

If this is indeed your problem, replace your openCard handlers with
a simple repeat loop:

	on animate
	    repeat the number of cards
		<something> -- delay a while
		go next card
	    end repeat
	end animate

This will avoid the recursion problem.
----
Steve Dorner, U of Illinois Computing Services Office
Internet: dorner@uxc.cso.uiuc.edu  UUCP: ihnp4!uiucuxc!dorner
IfUMust:  (217) 333-3339