You haven't declared 'vol' as a global in the scripts for the volume up and
volume down.

You can also shorten your scripts like so:

For volume [+]

on mouseUp me
global vol

vol = max(7, vol + 1)
the soundLevel = vol
end mouseUp me



For volume [-]

on mouseUp me
global vol

vol = min(0, vol - 1)
the soundLevel = vol
end mouseUp me

HTH

Cordially,
Pranav Negandhi
New Media Applications.
Learnet India Limited, Mumbai.
Phone: 91-22-859 8042 Ext: 410



<snip>
I am very new to Director and lingo especially so bear with me please.
I have a volume icon and a plus and a minus sprite and i want to make
the volume go up incrementally on clicking plus and doown clicking minus

I've put these scripts in:....
...set the soundLevel to 7
end if
end

for volume [ - ]

on  mouseUp
if the soundLevel > 0 then
    set vol to soundLevel
    set vol to vol-1
    set the soundLevel to vol
else
    set the soundLevel to 0
end if
end

But I get error-
variable used before assigned a value

Can anyone please set me straight? Thanks
<snip>




[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!]

Reply via email to