January 5th, 2009 Getting MC position

  • I have a question about the tween class. I'm looking for a way to get the current position of a movieclip, and fill it into a tween function.

    For example:

    var xTweenMain:Tween = new Tween(main_mc, "_x", Strong.easeOut, 0, -300, 1, true);

    Now I have a movie clip that moved on the x axis from 0 to -300. Say I have a bunch of movieclips lined up on the x axis, and I want to click a button and have it know where it's current position is. So that I don't have a bunch of if statements for every button. It's hard to explain. If I need to set up an example .fla I will.


  • var xTweenMain:Tween = new Tween(main_mc, "_x", Strong.easeOut, _root.myMc._x, -300, 1, true);

    try that


  • var xTweenMain:Tween = new Tween(main_mc, "_x", Strong.easeOut, _root.myMc._x, -300, 1, true);

    try that


    awesome...thanks...my way was horrible...lol..:thumb2:

    oh and for anyone that this may help...here is the an .fla that is a good starting point for people...

    34177


  • np;)


  • Here is an example of the application of what i'm trying to do. It's not a working example, because the only way I know how to do it is by rigging it together, which makes it pretty processor intensive. But with the visual you can get a feel for it.

    34176







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Getting MC position , Please add it free.