Skip to main content
June 26, 2006
Answered

Tween animation in a sequence

I want to make a sequence animation for a mc in pure actionscript (not with frames)
I want to animate this mc in 3 different stages of the total animation like this sequence:

1. first mc moveTo (x,y)

2. after mc has movedTo(x,y) move mc To(another x, another y)

3.after I´ve moved mc To(anotherx, anothery) Scale mc

I´ve tried alex Uhlmann animation package and http://laco.wz.cz/tween/ but I didn´t figure
it out how I should solve the scaling part.
The only sequence I managed to was was this with 2 different parts (movements) and not with 3 (the Scaling part):

import de.alex_uhlmann.animationpackage.*;
import de.alex_uhlmann.animationpackage.animation.*;
import de.alex_uhlmann.animationpackage.drawing.*;
import de.alex_uhlmann.animationpackage.utility.*;
import com.robertpenner.easing.*;

APCore.initialize();
var myListener:Object = new Object();
APCore.addListener(myListener);

var myMove:Move = new Move(mc);
myMove.animationStyle(2000,Expo.easeInOut,"onCallback");

myListener.onCallback = function() {
myMove.run(500,200);
myMove.callback = "onCallback2";
myMove.run(100,200);
};



Anyone?
- I´ve serched and reading so my eyes are bleding - please someone out there help me!

This topic is closed to new replies. Start a new post to keep the conversation going.
Peter LorentCorrect answer
Inspiring
July 14, 2006
Thansk for following me so far

'Enable guides for 9-slice scaling'. I don’t have that on Flash8.
What’s your version?

But I know what you mean.

Instead I double-clicked the square_mc and drag the rectangle symbol so
the registration point (crosshair) now is in the upper right.
But it don’t work. he lines are still scaled too much.

But if I place the registration point in the middle, then it works and the lines
scales much thinner. (thin) The problem is that this is not the animation type I want.

'Enable guides for 9-slice scaling'. - very interesting. I’ve also searched the help with "no result"

What could possible be the problem?


'Enable guides for 9-slice scaling'. I don’t have that on Flash8.
Then your Publish Settings are for Flash Player 7. The option 'Enable guides for 9-slice scaling' is only available when you publish for Player version 8 or higher.

22 replies

July 15, 2006
No, I dont have that and my settings are when I`m export to Movie (.swf):
Flash player 8
Bottom up
Actionscript 2.0
Compress movie 80%

Anyway - I moved the crosshair by doubbleclicking the mc and drag the symbol (rectangle) so the crosshair
now is in the upper right corner.
The animaition now works fine.
Translate
Inspiring
July 6, 2006
I'm curious. Is it working out for you?
Translate
July 7, 2006
Amazing!!
What´s your background – are you God or something like that?
– your code is working great!!.

Now I´m going to try to modify the code so I can call the reverse
animation when certain statement is set to true.

The worst is that I´m only a unemployed (right now) Swedish Art Director
who’s struggling (struggle) with actionscript (for my portfolio) and has no
one to ask when I´m want to do some smooth and fine animation, which
from my point of view, is a part of the whole design.
.......................................
Something like this:
If( (_global.home == something) &&(_global.homeLoadedPopUp == true)){
Call the “Reverse the animation”.. ………
.........................
There are only a few really good actionscripters here in Sweden.
And if there are any really professional actionscripters they probably work in
Stockholm at well known agencies as Fantasy Interactvie….
The rest of them are working at small companies who’s forced (mostly young people)
to work and do the same job for a minimal wage until they are burned out.

When my portfolio is done. I´m gonna send you a message..

Thank you very much
Translate
Inspiring
July 7, 2006
If( (_global.home == something) &&(_global.homeLoadedPopUp == true)){
animateS(reverse_animation);
}

hmm, sounds like Sweden is the place for experienced actionscripters to make good money...
Have a look at http://kaledi.youki.be/
and for more info: http://www.youki.be/
It's a standard portfolio system. Well, it's an alternative to learning actionscript...
Translate
Inspiring
June 26, 2006
First break your problem and start as making routines

1. move(fromx, fromy, tox,toy)
2. calculatete(nextx, nexty)
3. doIhaveReched(targetx,targety);
4. populateNextxy();

So your problem is solved.
Translate
Inspiring
June 26, 2006
>>my eyes are bleeding
Tell me something new...

Do you specifically want to use those packages? If not, you could use the attached code. Put an mc on the stage, give it an instance name square_mc, copy/paste the code on a seperate layer on frame 1.

Translate
June 27, 2006
Thanks! great!
You´ve used Macromedias own mx.transition.tween (right spelled??)
But where can I read about it. I managed to not find anything about it.
like some tutorials and description
So therefore I use Uhlmann and Laco (Uhlmann have the most beutiful and smoot tween animation )
But anyway..
The problem is that I dont want to scale the lines around my square mc.
The lines are now 1 pixel (when not scaled), but when I´m scaling the mc the lines became
4 pixels or something like that.
Do ya also know how I solve that problem too (with linestyle or something....)
Translate