I have been running some eductional apps that I built for students for years in D8 and D10. I upgraded to 11.5 two years ago, but could not get my apps to work and have not had the time to figure out why, so I don't use it. Unfortunately now, Apple has dropped Rosetta in Lion and so my projectors produced on Windows will not work on the latest Mac. Here is an example of some code from one of my apps that has problems. The first is a frame script that controls a basic dialog. The students clicks a sentence on the stage (sprite 2) and the program responds with an answer above in "FAResponse" field. I used to use an on mouseUp handler in the frame script but that stopped working in D5 or D6 (I can't remember) and someone here told me to use a behavior script under my sprite 2 called dialogEngine, which is supposed to return the number of the sprite clicked. It used to work. Now it returns VOID to the frame script. Why is that happening now? Before I could click on sprite 2, 3 or 4 and the behavior script would return the sprite number clicked to my frame script. How do I fix this?
The second problem is where I set the text of field "FAResponse" = " to the response to the question clicked. They used to show in white over a black background. Now nothing shows up. I spent hours trying to figure out why and figured out that I now need an updateStage before setting text in the response field. Why do I have to do this now? I have several lines in the program that send text to the response field. I tried placing the updateStage in the on Loop handler (since I only need one updateStage) which waits for a SPACE to continue the discussion but that doesn't work. Is there a way to get the text to appear in the FAResponse filed without updatStage or a way to update without having to do it before hundreds of places in the program? This was not easy to explain. I hope someone can help, thanks!
go to the frame
on dialogEngine me, spriteNumber
global gPam1Response1, gPam1Response2, gPam1Response3, gNumTicks, gTalkedManager1
put spriteNumber -- I checked to see what my behavior script under sprite was returning and found it to be VOID
if spriteNumber = 2 and gPam1Response1 = 0 then
set the foreColor of member 8 to 0
set the text of field "FAResponse" = "Great, first you need to familiarize yourself with the company."
gNumTicks = 4.8*60
set the text of field "FAResponse" = ""
else if spriteNumber = 2 and gPam1Response2 = 0 then
dialogEngine behavior for above frame script:
on mouseUp me
-- simply tell the frame script that this sprite was clicked
put "dialog behavior executed"
movie script handlers for frame script above:
repeat while the timer < gNumTicks
put "on loop executed"
if gToggle = "space" then
repeat while the keypressed <> SPACE