No announcement yet.

odd problem with "set opacity"

  • Filter
  • Time
  • Show
Clear All
new posts

  • odd problem with "set opacity"

    On my project I thought I would set an opacity to an image to show it's inactive.

    I have set up a test .apz to show whats going on.

    I have a button which switches the opacity between 100 and 10. Works perfectly.

    I have set up a file browse which sets an input and a paragraph to the files location and name.

    when it starts the button switches the opacity but once the file search has happened the opacity button gets errors.

    No idea where I am going wrong..

    Can somebody have a look for me please


    Odd Problem.apz

  • #2
    you use the variable Image twice , once when browse button clicked but also with your on/off button eg Image.GetOpacity

    [COLOR=#e74c3c]sImage[/COLOR] = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", false, false);
    for i,sFilePath in pairs([COLOR=#e74c3c]sImage[/COLOR]) do


    • #3
      Ohhh man. I never spotted that.

      Thanks colc....

      It makes things a lot clearer. I have looked at many examples from the forums, on many different topics and I have often seen many scripts with things like "sImage" and wondered why add an extra letter.
      Now I get it. It's to stop any conflicts. The type I have just encountered.

      Thanks again. I feel I may need to go back to the drawing board and re-write some of my scripts in my current project, just to make sure there are no other conflicts which I have not come across yet....