From: fo_ka on
How can I create a global variable? At the beggining it will be equal with 1. Each time I press a button it will grow by 1 unit.
From: Mike Blaustein on
To make a global variable, just declare it. To make it start with a
given value, declare it in a startMovie script.

global gCounter

on startMovie
gCounter=1
end

Then, to increment it every time a button is clicked, increase it by one:

global gCounter

on mouseUp me
gCounter=gCounter+1
end

You must declare the variable as a global in every script that uses it.
From: fo_ka on
ok that worked, but I can't reset the value each time I start the movie... it keeps growing up :smile;
From: Mike Blaustein on
Make sure that the startMovie handler I gave you is a #movie script (not
a behaviour)- then it will reset every time you start it.
From: pideja on
>>Now if we can just get to knowing where it's breaking. Is anything working at
all? That would be great...
>>Does the projector start? Yes, the projector starts, but does not display
the correct images. Stays "stuck" on one or two images.
>>Any error codes? No error messages appear.

> openFile(myFile, filename, 1) -- Opens file that user selected

>>Does this line execute if it needs to (SHOWNAME and filename are void)? Yes
>>Do you see the file open dialog box? I don't usually see the box when it's
running. I don't see it even in the deffective Mac version.

> alert error(myfile,status(myfile)) -- Displays error message

>>Does your fileIO error checking throw up an alert? No alert messages.

What, exactly, is not working? When the projector starts (it does start), I
see the initial screen that provides a choice of show to see. Upon selecting a
show, spacebar should initiate the slide-show (images). What images are shown
is listed in the text file. This does not happen. That is to say that the
"action" (dissolve time. position, size) do occur, but there is no choice of
images. Could the problem reside in the actual text file?


 | 
Pages: 1
Prev: PC to Mac movie
Next: newbie in 3d, please help