New to action script need some urgent Help

hi i m new to action script 3.0
the problem which i m facing is that in action script 2.0 we can directly click the button on stage and place the scrip in it.
but in script 3.0 i m not able to put the particular script on the button it is coming on the frame instead of button
what to do