I need to create an invisible button for a web page to cover the majority of the page and in order to complete the task I need to include actions to the button. I have gotten the button to be where it is needed and it hold throughout the timeline. It works correctly in that it does not show up on the screen unless you mouse over it but when you do the mouse pointer becomes active. My problem is that I need to add an event listener to the button and even though I have converted it to a button symbol and given it an instance name the actions panel will not recognize the instance name and so any code I write for it does not work!!:icon_cry:
I am using Actionscript 3.0 on Flash CS4 and running it on Windows Vista Home Premium 64 bit. This is the actionscript I am trying to attach to the button:
stop();
//...script for inviso button...\\
inv_link.addEventListener(MouseEvent.CLICK, inviso);
function inviso(event.MouseEvent) :void{
gotoAndPlay (56);
}
which seems simple enough when you look at it but when I check the code I get this error:
Scene 1, Layer 'actions', Frame 1, Line 5 1084:Syntax error: expecting righparen before dot. function inviso(event.MouseEvent):void{
I am not sure exactly what this means but from reading it I would assume there is a parenthesis missing somewhere near line 5.:icon_eek:
Any advice on how to work through this issue would be wonderful, I will await any replies!!:icon_cheesygrin:
for the record I did not mean to put a smiley in the error message that just happened when I previewed the post. It should say Syntax error: instead of 1084:Syntax error!!:icon_cry: