0
How do I make multiple buttons in my flash animation?

/t5/animate-discussions/how-do-i-make-multiple-buttons-in-my-flash-animation/td-p/985406
Jan 23, 2008
Jan 23, 2008
Copy link to clipboard
Copied
I am new to flash, and I have no training in it whatsoever. I
created a flash animation with flash CS3 for my photography
website, and I want to link each of the images to different
galleries on my site. When I created my first button it worked
fine, but when I try to create actions to link more than one image
as a button, keep getting an error that says "1021: Duplicate
function definition." How do I make each image as a separate
button?
I used the video of this tutorial as my guide to learn how to create a button:
http://www.adobe.com/designcenter/flash/articles/flacs3it_firstflash_pt1.html
I used the method shown in the tutorial I mentioned to create it (created a new layer for the button, selected the area of the image for the button,used modify -> convert to symbol
-> button, I edited it so it was an invisible button by moving it to the hit frame, gave the selected area an instance name of Hizumi_btn, inserted a new layer for actions and added the code I have attached to this post.
I assumed that I would just need to repeat this procedure for each of the other images in my animation, but when I did that I received the error.
I greatly appreciate any help you can give me.
Here is the code I used to create my first button.
I used the video of this tutorial as my guide to learn how to create a button:
http://www.adobe.com/designcenter/flash/articles/flacs3it_firstflash_pt1.html
I used the method shown in the tutorial I mentioned to create it (created a new layer for the button, selected the area of the image for the button,used modify -> convert to symbol
-> button, I edited it so it was an invisible button by moving it to the hit frame, gave the selected area an instance name of Hizumi_btn, inserted a new layer for actions and added the code I have attached to this post.
I assumed that I would just need to repeat this procedure for each of the other images in my animation, but when I did that I received the error.
I greatly appreciate any help you can give me.
Here is the code I used to create my first button.
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Participant
,
/t5/animate-discussions/how-do-i-make-multiple-buttons-in-my-flash-animation/m-p/985407#M26950
Jan 23, 2008
Jan 23, 2008
Copy link to clipboard
Copied
Hi. You need to have a different function name for each
function. They can't all be named as "buttonClickHandler".
For instance, your functions could be named as:
buttonClickHandler1
buttonClickHandler2
etc
Or you could (and should) use names that are more descriptive.
>> keep getting an error that says "1021: Duplicate function definition."
For instance, your functions could be named as:
buttonClickHandler1
buttonClickHandler2
etc
Or you could (and should) use names that are more descriptive.
>> keep getting an error that says "1021: Duplicate function definition."
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/animate-discussions/how-do-i-make-multiple-buttons-in-my-flash-animation/m-p/985408#M26951
Jan 24, 2008
Jan 24, 2008
Copy link to clipboard
Copied
Thanks for the help.
Is there anything I need to include in the function names I use, or can I call them anything I want?
Is there anything I need to include in the function names I use, or can I call them anything I want?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

