I have been working on a project using some external classes to have multiple types(4 different movieClips) of fish swim around and then have them breathe out a bubble occasionally. I keep getting several errors in my compiler and I was just wondering if anyone would take a look and see if you can figure out what I am doing wrong. Thanks in advance!
Well, wasn't sure if you really needed it but I thought it would be fun to try it. I actually found your source code on line and for the code you had originally, you have placed the functions in the (move, turnaround, breathe) WITHIN the constructor function. I bet if you pulled them out and set them on the package root, your code would run fine.
However, I like to write it myself and attached you'll find my version. I built it in CS5.5, so not sure if you will be able to open the FLA file, but the .AS files should be no problem, which contains all the code. There are two sections that I removed, because I ran out of time or it was giving me a headache. I've commented those areas. So have at it.
If you can't open the FLA, this is what I changed:
- Ensured that each fish uses the Fish Class.
- Changed the link names to be Fish1, Fish2, Fish3, Fish4
- Removed all code from the timeline and placed in Main Class file
- Pointed main file to Main class file
If this works for you, can you make this thread as closed.
~hih
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.