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:

//...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:

6 Years
Discussion Span
Last Post by JasonHippy

The signature of your 'inviso' function is wrong.
try this:

function inviso(e:MouseEvent):void

Oh and for future reference. To stop smilies from appearing in your post, if you use the 'advanced editor' you have the option to 'disable smilies in text'. That will stop smilies from being rendered in your text after you post!

:) <<--- See, posted with smilies disabled!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.