views:

22

answers:

1

For some reason I can't add ActionScript actions to a timeline frame within a Button Symbol, like I normally would with MovieClip symbols or on the stage. The Actions panel shows this message:

"In ActionScript 3.0, code cannot be placed directly on objects. Please select a frame..."

even though I definetely have a frame selected!

Any ideas?

EDIT: Screenshot as requested. As you can see, a frame is clearly selected... alt text

+1  A: 

You can't add code to the frames of buttons because they are not actually frames. The buttons you create on stage are instances of the SimpleButton class.

From the documentation of the class you can see that it does not inherit from MovieClip so it has no frames. It's just that the IDE makes it kinda look like frames. The solution is to make them MovieClips.

Allan
Thanks Allan- good to know
Yarin