Chapter 4, Listing 2

Listing 2: Script of cd button "Animate"

	on mouseUp
	  if the hilite of me is TRUE then
	    set the hilite of me to FALSE
	    exit mouseUp
	  end if
	  set the hilite of me to TRUE
	  choose text tool
	  -- Überschrift erzeugen
	  set textFont to "New York"
	  set textSize to 24
	  set textStyle to outline
	  click at 75, 45
	  type "MacOpen proudly presents:"
	  wait 2 seconds
	  -- und wieder löschen
	  doMenu "Revert"
	  click at 75, 45
	  type "Animations with HyperCard"
	  wait 2 seconds
	  -- und wieder löschen
	  doMenu "Revert"
	  choose browse tool
	  -- Jetzt beginnen die Animationen:
	  put 50 into xKoord
	  put 230 into yKoord
	  put 21573 into jugg
	  repeat with i = 1 to 85
	    add 5 to xKoord
	    set the loc of bg button "Kogge" to xKoord, yKoord
	    set the icon of bg button "Juggler" to jugg + i MOD 4
	  end repeat
	  choose browse tool
	  -- alles zurücksetzen
	  set the loc of bg button "Kogge" to 50, yKoord
	  set hilite of me to FALSE
	end mouseUp

© 1997 by Jörg Kantel
Zurück zum Inhaltsverzeichnis