Results 1 to 5 of 5

Thread: Simple Tween Question...

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Simple Tween Question...

    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?
    Code:
    onClipEvent (load) {
    	this.originalY = this._y; //stores original position
    	this.tween("_y", this.originalY - 200, 1.5, "easeOutBack", 2);
    }

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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:

    Code:
    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

    Code:
    onClipEvent(enterFrame){
    When I get to work in a couple hours I will get it to work
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You're too good! That was correct it making it this._y! So do I still need the first line?

  4. #4
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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...

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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

    <edit> Did I say "there" enough times in this post? </edit>
    Last edited by BLiZZaRD; 03-11-2007 at 02:11 PM.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •