A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: N00b requiring assistance

  1. #1
    Junior Member
    Join Date
    Aug 2005
    Posts
    2

    N00b requiring assistance

    I only recently started doing AS in flash, and i am having some trouble with the code.

    Basically what I want to do is make the buttons fade out onRollOver and fade in onRollOut. All my buttons are on different layers and are buttons.

    The code I have on the buttons is:

    on (rollOver)
    {
    _alpha = 50
    }

    on (rollOut)
    {
    _alpha = 100
    }

    Now when I go to preview the whole page fades out and fades in rather than just the button. Can someone please help?

  2. #2
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    Just put this code on your buttons
    PHP Code:
    on (rollOver) { 
        
    this._alpha 50 
    }

    on (rollOut) { 
        
    this._alpha 100


  3. #3
    Senior Member
    Join Date
    Aug 2005
    Posts
    158
    ahhh theres a much much much easya way, graphical infact!

    double click on the button, and you will see in the timeline 4 'chunked up' frames

    from memory (you will see for yourself anyway), the first frame is normal, the 2nd frame is when the mouse is over it, the 3rd frame is when the mouse is clickin, and the 4th frame is what happens on click (i find the 4th pretty useless)

    so in the 1st frame the alpha is 100, 2nd frame is 50. simple.

    let me know how you went!

  4. #4
    Senior Member
    Join Date
    Aug 2005
    Posts
    158
    damn wattsup you beet me by a few seconds lol. well furiku anyway is good.

  5. #5

  6. #6
    Senior Member
    Join Date
    Aug 2005
    Posts
    158
    we will see what way he chooses.... but prob your way coz it's just a matter of copying and pasting

    lol

  7. #7
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    lazy programmers always find the easy way to do things!

  8. #8
    Senior Member
    Join Date
    Aug 2005
    Posts
    158
    yup lol.... but that means i'm a hippokrit (however you spell it im 13 for god sake lol) haha

  9. #9

  10. #10
    Junior Member
    Join Date
    Aug 2005
    Posts
    2
    I finally fixed it. I had some stupid coding on the frame and the right coding on the button, and coding on the frame is what caused the error messages. I fixed it.
    Thanks for the help.

  11. #11
    Senior Member
    Join Date
    Aug 2005
    Posts
    158
    lol for arguments sake which one of our ideas was better for you to understand???

    just saying in my way you can do way more then just alpha.....

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