Hello,
In my search to redefine attachement behaviour for movie clips using a new
class definition for a Symbol1 movieclip(library), I run into a strange error.
If anyone can tell me what is wrong.....?
The following code just works right......if I do uncomment the
onClipEvent(mouseMove) method I do get error messages as shown after the
program code. I find this strange ...why can I use/define on(..) event handers
here without any problem but do I get suddenly a lot of errom essages asking
for names when using a plane old onCLipEvent(mouseMove) event handler.
Thanks a lot
=========================
class Symbol1 extends MovieClip{
var xPos:Number=0.0;
var yPos:Number=0.0;
function Symbol1(){
trace("just created a Symbol1 type instance");
}
function attachLibSymbol(lib_mc:String, inst_mc:String, level:Number ){
//this.attachMovie(lib_mc,inst_mc, level);
trace("attachLibSymbol(lib_mc:String, inst_mc:String, level:Number )
"+lib_mc);
}
function attachInstance(mc:MovieClip){
//this.attachMovie(lib_mc,inst_mc, level);
trace("just attached movie instance "+mc);
}
/*
function onClipEvent (mouseMove) {
trace("mouse moved");
}
*/
function onPress() {
startDrag(this);
}
function onRelease(){
stopDrag();
}
}
error messages when uncommented mouseMove eventHandler:
**Error** C:\Flash\Symbol1.as: Line 19: Function name expected
function onClipEvent (mouseMove) {
**Error** C:\Flash\Symbol1.as: Line 1: Statement block must be terminated by
'}'
class Symbol1 extends MovieClip{
**Error** C:\Flash\Symbol1.as: Line 31: Syntax error.
}
**Error** C:\Flash\Symbol1.as: Line 19: All member functions need to have
names.
function onClipEvent (mouseMove) {
Total ActionScript Errors: 4 Reported Errors: 4