A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Compiler error using AS2 Tween easing...

  1. #1
    Senior Member Alluvian's Avatar
    Join Date
    Jun 2006
    Posts
    967

    Compiler error using AS2 Tween easing...

    Okay, I have boiled this code down as far as I can and don't get why I am getting a compiler error.

    First, the control group.
    Empty CS4 AS2 .fla file with the one movieclip in the library "UI". Just a circle for this boiled down test. Works fine, elastic easing.

    Actionscript Code:
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    stop();

    var UI:MovieClip = _root.attachMovie("UI","UI",_root.getNextHighestDepth());
    UI._y = 10; UI._x = 50;
    UITween = new Tween(UI, "_y", Elastic.easeOut, 10, 200, 1, true);

    But I don't want elastic easing for my actual project this is being used on. Changing the ease type causes compiler error:
    "The name of this class, 'mx.transitions.easing.Strong', conflicts with the name of another class that was loaded, 'mx.transitions.easing.Strong'."
    At location: "Strong.as, Line 8"

    The only thing that has changed is replacing "Elastic" with "Strong"

    Actionscript Code:
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    stop();

    var UI:MovieClip = _root.attachMovie("UI","UI",_root.getNextHighestDepth());
    UI._y = 10; UI._x = 50;
    UITween = new Tween(UI, "_y", Strong.easeOut, 10, 200, 1, true);

    I am guessing this is something really stupid I am missing, I need a new set of eyes.

    The circle still tweens by the way, it just tweens with no easing as if I had selected None.easeNone

    I have also tried using the full path "mx.transitions.easing.Strong.easeOut" with the same result. The last time I had this problem it was me having a bogus .as file in the same directory, but I have tried compiling this in a directory all by itself and same error. I don't get it, such a tiny bit of AS2... Maybe I just need more sleep, heh.

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    I don't get any errors in my CS3, maybe your Flash setup has some weirdness.

  3. #3
    Senior Member Alluvian's Avatar
    Join Date
    Jun 2006
    Posts
    967
    Yeah, it is working fine when I compile that code on my Flash 8 at work as well, but my home flash CS4 is spitting out the error when I try to use any easing style that is NOT Elastic.*

    This makes no sense to me.

    Oh well, I am going to have to re-install CS4 when my new HD arrives to install my real copy of Windows 7. I have noticed that the release candidate is slowly turning into a pumpkin since I set the date to 1999 to avoid the constant restarting. Hopefully it all goes away with that fresh install. Until then I guess I will use tweenmax/lite. It is just for menus moving around and such, not critical.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center