> But I get error-
> variable used before assigned a value

You need to declare "global vol" at the top of each of your mouseUp
handlers.

Try:

on startMovie
    global vol
    set vol to 4
    set the soundLevel to vol
end

-- for volume [ + ]
on  mouseUp
  global vol
  if vol < 7 then
    set vol to vol + 1
    set the soundLevel to vol
  end if
end

-- for volume [ - ]
on  mouseUp
  global vol
  if vol > 0 then
    set vol to vol - 1
    set the soundLevel to vol
  end if
end

However, this doesn't update your volume icon.
Which version of Director are you using?


[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