Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I make multiple buttons in my flash animation?

Guest
Jan 23, 2008 Jan 23, 2008
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.

TOPICS
ActionScript
837
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 23, 2008 Jan 23, 2008
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."
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 24, 2008 Jan 24, 2008
LATEST
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?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines