This content has been marked as final. Show 4 replies
So make your aquarium a movieclip and make each of your fish beside the aquarium a movieclip and give each fish an onRelease function. Make sure the fish have library linkages you can later use for attaching. onRelease of each fish should attach a copy of that fish from the library to the aquarium clip.
Do the fish need to swim?
Yes the fish have to move around, but the tails do not have to move.
In that case, make each edge of the aquarium (sides, top and bottom) movie clips too and have your fish move and reverse direction on hitTest with those clips. If the fish only have to swim left and right and not up and down, it is a little easier.
I'll probably get in trouble for this but I didn't like the hitTest.
This is AS2. You will have to make enough changes that, by the time you get finished with it, you will understand it.
Thank you for your help so far.
I am just a beginner and that coding went way over my head. I have created a movie clip for each fish and I have added the buttons to the aquarium. I have created the linkage for the movie clips in my library. I am having problems attaching the clip to the button. In all of the examples I have seen I have to include the instance name. How do I give a clip that is not on the stage an instance name?
Can you please help?