Click to See Complete Forum and Search --> : A Quick Question about Lingo (Director)
DJRobThaMan
03-24-2004, 01:29 PM
Hi,
I know this is ridiculously simple but I'm in class and unsure of how to declare a global variable in lingo.
Please could somebody help me out.
Thanks,
Douglas
DJRobThaMan
03-24-2004, 01:45 PM
Okay, so I figured it out. But does anybody know why tyhis won't work?
global pixels
on startMovie
sprite(2).trails = TRUE
sprite(2).constraint = 3
pixels = 0
end
on KeyDown
case(the KeyCode) of
123: sprite(2).locH = sprite(2).locH - 1
123: pixels = pixels + 1
124: sprite(2).locH = sprite(2).locH + 1
end case
updateStage
end
Thanks again
buntine
03-25-2004, 12:15 AM
Not sure..
Mayby it would help to put an otherwise statement at the end of the case tree.
case(the KeyCode) of
123: sprite(2).locH = sprite(2).locH - 1
123: pixels = pixels + 1
124: sprite(2).locH = sprite(2).locH + 1
otherwise
-- Statement.
end case
Regards.
DJRobThaMan
03-25-2004, 12:18 AM
Thanks for the help, but I figured it out a little bit after I posted this. I know I shoulda posted and said so but wasn't really near a PC.
I just wanted the second thing I needed to happen with the keydown in another case within the function.
Thanks for replying though
Lata,
Douglas