A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Adjusting brightness via actionscript

  1. #1
    Senior Member
    Join Date
    Aug 2002
    Location
    New York
    Posts
    599

    Adjusting brightness via actionscript

    Hi,

    I've attached a file with a really nice actionscript rollover effect effect.

    I'm trying to figure out a way to set the brightness of each rectangle to 50% in the actionscript so that when a user rolls over a square, the brightness increases to 100% ... on rollout, the brightness returns to 50%.

    Also, there are four links on top. How can I apply this rollover action to so that it occurs on rolling over the links rather than the images?

    Any takers?

    cheers!!
    jen

  2. #2
    Senior Member
    Join Date
    Aug 2002
    Location
    New York
    Posts
    599
    see below...
    Last edited by JennySpade; 04-26-2004 at 09:52 PM.

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Zip it up!

    Also do you really mean brightness or simply alpha?

  4. #4
    Senior Member
    Join Date
    Aug 2002
    Location
    New York
    Posts
    599
    hi,

    strange phenomenon... when I "save as" rather than "save" the fla, it suddenly drops in size from 320k to 32k, and compresses to 8kb.

    anyway... here it is!!!
    Attached Files Attached Files

  5. #5
    Senior Member
    Join Date
    Aug 2002
    Location
    New York
    Posts
    599
    I mean brightness. I originally tried alpha - but I quickly realized that the clips under the other clips would then become visible... I'm basically just going for a pale to rich color effect.

  6. #6
    Senior Member
    Join Date
    Aug 2002
    Location
    New York
    Posts
    599
    hi...

    still stuck on this one. anyone able to figure this out?

    jen

  7. #7
    Senior Member devnull_2k's Avatar
    Join Date
    Oct 2001
    Location
    Limehouse, Ontario - Never heard of it? Not surprised.
    Posts
    785
    Well, I think you're going to have to figure out exactly what you mean by "brightness", in terms of what Flash can do.

    Might I suggest looking at the Color object as a place to start. It's setTransform() method is quite powerful.
    The future belongs to those who prepare for it today.

  8. #8
    Senior Member
    Join Date
    Aug 2002
    Location
    New York
    Posts
    599
    hi,

    thanks for the suggestion. If I'm being too vague, I'll try to clarify...

    I basically want to adjust the actionscript so that all the shapes (eventually they'll be jpegs) look pale. When you roll over a shape, it tweens to its normal appearance.

    I'm suggesting "brightness" primarily because by increasing a symbol's brightness to +30%, it's appearance takes on the effect I'm looking for (get's paler). This would be the same as if I was dropping the alpha against a white background. The way this file works, alpha isn't an option because the transparency destroys the effect.

    ok... maybe someone smarter than me will have an answer...

    cheers
    jen

  9. #9
    Untitled-1.fla strille's Avatar
    Join Date
    Mar 2001
    Location
    Sweden
    Posts
    1,626
    In this thread you'll find a method which adjusts brightness:
    http://www.flashkit.com/board/showth...hreadid=537338

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center