PDA

View Full Version : onClipEvent problem


fizzzzzzzzzzzy@yahoo.com
08-17-2006, 12:20 AM
i keep getting that error message that says such as such must be within on or onClipEvent handler. well, the line it says needs to be with an on/onClipEVent handler is in the form
myMovieClip.event = function() {
ive tryed it as onClipEvent and the message doesnt come up when i check the syntax then, but it comes up when i test the movie.
Some help please?

zfoley
08-17-2006, 12:34 AM
Eyah teh documentation is a bit obscure. There are a lot of clip Events. So they're using shorthand. Here are a few hand examples:
mc.onEnterFrame = function(){
mc.onPress = function(){
mc.onRelease = function(){
mc.onRollOut = function(){

etc.

senocular
08-17-2006, 12:49 AM
you have to write that while a frame is selected, not a movie clip or button or anything else on the screen - just frame selected (or nothing since that then is the frame)

fizzzzzzzzzzzy@yahoo.com
08-17-2006, 01:47 AM
umm.. i tryed putting it in the thing for the frame but it still comes up with that error message whenever i try and test the movie, though not when i check the syntax
the first line is:

boo.onMouseMove = function() {

and thats where the error's suposed to be.

zfoley
08-17-2006, 02:13 AM
it sounds like senocular is right. You've got your code attached to a clip button etc. make a blank layer in the timeline. Then cut the script from the old location and select the empty keyframe and paste the actionscript into the actions panel. A little "a" should show up in the timeline. But no black dot.

fizzzzzzzzzzzy@yahoo.com
08-17-2006, 02:37 AM
sorry to drag this on so much but i tryed that and it still doesnt work
the code is in the actions for Frame 2 of layer name layer 2, but the odd thing is
that the error message still says:

Symbol=boo, Layer=Layer 1, Frame=1: Line 1: Statement must appear within on/onClipEvent handler
_root._xmouse = mousex

zfoley
08-17-2006, 05:51 PM
Without a doubt there is still some code attached to your symbol called "boo" You must remove it. Any errors in the code will cause all the code not to run.