Flash CS5 & AS2: Can't add actionscript to a button

659 Views Asked by At

I am having trouble adding actionscript inside of a button. The publish settings are set to AS2. The actionscript window doesn't let me type anything inside of it. The window says "Current selection cannot have actions applied to it." Any ideas why it won't let me do this?

1

There are 1 best solutions below

0
On

Its not a good idea to add script directly onto an object even though AS2 still allows it; it can get really hairy to troubleshoot. With that said, if you're using an AS2 component button (as opposed to a MovieClip, or user-created Button type) and had it selected you'd be disallowed from adding code to it.

Better to give your button an instance name, add a layer above your button and put your code in there referencing the name if you're dead-set on having code in the timeline.