开发者

Adding Actions to Button Symbol frames in Flash CS5

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...

Adding Actions to Button Symbol frames in Flash CS5


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜