Flash ActionScript - Filters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jztheillest
    New Member
    • Oct 2008
    • 2

    Flash ActionScript - Filters

    Hi,
    I'm trying to control the brightness of an image through action script that would be in turn controlled by buttons.

    So, on the on(release) handler How would I attach a code that would make it brighter or darker, hopefully by controlling the color - brightness filter? via actionscript

    thanks,

    JZ
    Last edited by jztheillest; Oct 14 '08, 06:40 PM. Reason: spelling mistake
  • joedeene
    Contributor
    • Jul 2008
    • 579

    #2
    Well, a Bitmap or Graphic doesn't have the Filters enabled for them. Also, Please don't double post, it is against the Posting Guidelines.

    joedeene

    Comment

    • joedeene
      Contributor
      • Jul 2008
      • 579

      #3
      Although, if you changed it into a movie clip, you could use the MovieClip._alph a Property, and so an example of an on(event) handler would be one like this...

      Code:
      on (release) {
      	_root.image_mc._alpha = 100;
      }
      joedeene

      Comment

      • Fabez
        New Member
        • Oct 2008
        • 29

        #4
        You will need to create variables to hold the filter information, then push the dynamic filter into the filter array for your object. However a bitmap cannot have filters applied to it so you would need to place it inside a movie clip. You could also use the ._alpha variable to control the brightness as an alternative to filters.

        Comment

        Working...