Let me start by saying that I'm completely new to Flash, so I will not be at all offended if you phrase your response as though I were eight years old. In fact, I'd quite likely appreciate it.
I'm trying to recreate a simple Flash animation that someone made for me in the past. I thought I had a handle on what was going on in it, but it seems there's a piece I'm missing. Basically, there are three images (actually movie clips) covered by buttons (also movie clips). When a button is clicked, the image beneath it fades into view. There are also three other buttons, one per image, that cause this same thing to happen.
So, I recreated the original file using new images. I created each instance of each movie clip that was present in the original file, and named each of them the same, and set the properties to match. I then copied the ActionScript code from the original to the new one, and ran the debugger. The code is as follows:
var xScaleT:Tween = new Tween(exp1, "_alpha", Strong.easeOut, 100, 0, 2, true);
var xScaleT:Tween = new Tween(txt1, "_alpha", Strong.easeOut, 0, 100, 2, true);
var xScaleT:Tween = new Tween(exp2, "_alpha", Strong.easeOut, 100, 0, 2, true);
var xScaleT:Tween = new Tween(txt2, "_alpha", Strong.easeOut, 0, 100, 2, true);
var xScaleT:Tween = new Tween(exp3, "_alpha", Strong.easeOut, 100, 0, 2, true);
var xScaleT:Tween = new Tween(txt3, "_alpha", Strong.easeOut, 0, 100, 2, true);
When I ran this movie, I received five of the error "A conflict exists with definition xScaleT in namespace internal".
Googling this error led me to believe that it was due to all the declarations having the same name (notwithstanding that this same error doesn't pop up when the original movie is run), so I changed them to xScaleT1, xScaleT2, etc. Doing that got rid of the "conflict exists" errors, but I now get:
1172: Definition mx.transitions:Tween could not be found.
1172: Definition mx.transition:easing could not be found.
...and then a bunch of type and property not found errors that I assume stem off its inability to find the above two definitions.
Why doesn't this happen when I run the original movie, and how do I go about fixing it? Is there some declaration or class code I missed copying from the original? Any advice is appreciated. Thanks.
Make sure your Publish Settings are set for AS2 and not AS3.
Oh, for...well now I feel silly having typed all that up.
You rock, Ned. Many thanks.
For future reference, there are usually two good indicators that you are using AS3 settings when you shouldn't be... the first would be the error messages you got regarding what you know to be AS2 code not being recognized. The second, sometimes more subtle clue, is that you are getting error messages, especially error messages with error code numbers... AS2 is just not that sophisticated/helpful when it comes to errors.