View Full Version : Simple Tween Question...
tomyknoker
03-11-2007, 09:36 AM
Hi all, I am using a simple tween, which basically tells my movie clip to remember it's original _y position and then from there move back -200, this works really smoothly. Once it plays it goes to a stop. The issue is after the stop I again tell the movie clip to move back -200, but it still uses the original _y position... Anyone know hoe to make it use the _y position the first animation ends on?
onClipEvent (load) {
this.originalY = this._y; //stores original position
this.tween("_y", this.originalY - 200, 1.5, "easeOutBack", 2);
}
BLiZZaRD
03-11-2007, 11:16 AM
Can't test now as I am on my work laptop, but if memory serves, your code is close, but you are naming and renaming, then not using the renames :)
try something like:
onClipEvent (load) {
this.originalY = this._y; //stores original position
this.tween("_y", this._y - 200, 1.5, "easeOutBack", 2);
}
Could also be one of the instances where you need to use enterFrame instead of load
onClipEvent(enterFrame){
When I get to work in a couple hours I will get it to work :)
tomyknoker
03-11-2007, 11:20 AM
You're too good! That was correct it making it this._y! So do I still need the first line?
tomyknoker
03-11-2007, 11:23 AM
Hey Blizz! I hope I'm not in breach of cross posting! But have you ever seen anything similar to this? I'm trying to create something similar... http://www.veuve-clicquot.com/en/?sA...ge=&country=au, It should be a menu system...
BLiZZaRD
03-11-2007, 11:28 AM
Yes you need the first line. That is telling the code that the current _y is being updated/renamed as _y whenever it stops.
I saw the other post, but I have to get ready to go to work now. When things get settled there, I will boot up my computer there and see what I can do to help you out there :D
<edit> Did I say "there" enough times in this post? </edit>
Powered by vBulletin® Version 4.2.2 Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.