FORUMS: list search recent posts

ActionScript Error Message

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Salima Nesbitt
ActionScript Error Message
on Jun 16, 2009 at 3:29:42 pm

Hi I created a button that I'm using for a Back Button on my web page. I have action script on it, but when I go to publish the file I get an error. I also checked the action script in the action script box and it says they are no errors.
The error messages reads as follows;

**Error** Scene=Scene 1, layer=back button, frame=2:Line 1: Mouse events are permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1

Any suggestion??
Thanks



Return to posts index

Pieter Helsen
Re: ActionScript Error Message
on Jun 16, 2009 at 7:21:55 pm

You placed another piece of actionscript onto the frame, rather than onto the button.

To use on(release){}; select the button and then go to the actions panel, if you want to place the actionscript on the timeline (i.e. on one of the frames) you have to give your button an instance name (for instance my_btn) and then use my_btn.onRelease = function() { };

Kind regards,
Pieter

General notice: from now on, I would like to ask everyone to put [AS2] or [AS3] (corresponding to the version of actionscript you are using on your project) in front of their post titles when the question is actionscript related! Please help us help you faster. Thank you.


Return to posts index

Salima Nesbitt
Re: ActionScript Error Message
on Jun 16, 2009 at 8:20:55 pm

Thanks a lot it worked.. I had the script on the button and the frame on the timeline.
Once again THANKS!!



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]