I am having some strange problems with property scope. I have a Multiuser
Server ping behaviour which I attach to an offstage sprite. My properties
are declared outside of any handlers in the behaviour so that they can all
"see" them. My exitFrame and beginSprite handlers work fine and have the
properties in their scope, but both of my MUS message handlers do not. Is
their something I'm missing. When I change the properties to global they are
in the scope of the handlers and everything works fine.
Any ideas or suggestions would be much appreciated.
Ryan
Here is some of the code..
-- Declare properties
property pPlayerList
property pNextPing
property pPingInterval
on beginSprite me
-- set up initial values for properties
pPingInterval = 60 * 20
pNextPing = the timer + pPingInterval
pPlayerList = []
end
on exitFrame me
if the timer > pNextPing then
-- do some stuff when you get pinged, properties are in scope
end if
end
on pingHit me
-- properties are no longer in scope in this handler???
end
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]