I think I understand what you're trying to do. I can forsee several obstacles that you're going to encounter using the technique that I think you're employing.
It's good that you installed MC Tween. A lot of people are confused by the fact that it's actually an extention that you have to install and not a native Flash class. Have you also included it at the top of your ActionScript?
Before you begin to use MC Tween, you have to declare an invocation to the class to tell Flash to pull that tool out of the toolkit. You do this by adding the following to the top of your ActionScript:
Code:
#include "mc_tween2.as"
I'm not sure what mc_tween1 was, but regardless...this is the include call.
Next, your syntax isn't actually "exactly" how it appears in the documentation. I can see where you made the mistake. The syntax guidelines in the documentation use a different kind of notation to specify optional parameters (using the square bracket).
If you look at the actual examples you the same page, you'll see the bracket removed. So, the correct way to write what you've written above would be:
Code:
image1.resizeTo(200, 100, 1, "linear");
Notice that the square brackets are gone and that the animation type is in quotes. Just so that you're clear what you're doing with the above code it says: resize the image1 movieclip to the 200px by 100px over 1 seconds using "linear" animation. If that's what you want...that's what you'll get. It should work.
A word of advice, though. I tend to not like using resizeTo in most instances. I'm not sure about your setup and this might not apply but using scaleTo is a bit more flexible. Say you have imges of varying sizes. Resizing these to 200 x 100 might not yeild the best results. Using scale to, you maintain the aspect ratios because you specify a percetage increase instead of hard coding a value.
Using scaleTo() would give you something like this:
Code:
#include "mc_tween2.as"
image1.scaleTo(120, 1, "linear");
There are also the xScaleTo() and yScaleTo() methods if you only want to increase one axis.
Since you're just beginning, I suggest you study the animation types in the MC Tween documentation really well. Choosing the right animation type is key! For example, when creating something like what I'm imaging you're creating, I usually use easeOutQuad. It's a very smooth motion with easing applied towards the end of the animation. This creates a nice transition. Using linear animation at times can be abrupt, though there are certainly uses for it -- perpetual motion, for example.
Using easeOutQuad would look something like this. Sources are included with that, feel free to play around.
I've probably given you more information that you need. Hope that helped.
Bookmarks