Skip to main content
talented_knowledge16B6
Participating Frequently
January 16, 2017
Answered

Error Code 1151

  • January 16, 2017
  • 1 reply
  • 1949 views

I built my website with Flash in 2010 (Action Script 2.0) and am trying to add material, now using Animate CC 2017 (which requires it to convert to AS 3.0). 

When I open the old .fla file and then run thru Control/Test Movie it comes up with the following error code message:

"1151 A conflict exists with the definition MyHoriTween in namespace internal".

In the Actions pane, the offending code reads:

____________________________________________

import mx.transitions.Tween;

import mx.transitions.easing.*;

var myHoriTween:Tween = new Tween (Logo_ON_mc,"_x",Strong.easeOut,-450,-74,2,true)

!

___________________________________________________________

And there are 3 other 1151 type errors all relating to Tweens. 

Can anyone help?

    This topic has been closed for replies.
    Correct answer kglad

    Next errors:

    Error Message:

    1172: Definition mx.transitions:Tween could not be found

    1172: Definition mx.transitions.easing could not be found

    Code:

    import mx.transitions.Tween;

    import mx.transitions.easing.*;

    var myHoriTween:Tween = new Tween (Logo_OFF_mc,"_x",Strong.easeOut,-450,-83,2,true);


    that should be:

    import fl.transitions.Tween;

    import fl.transitions.easing.*;

    (p.s when using the adobe forums, please mark helpful/correct responses, if there are any.)

    1 reply

    kglad
    Community Expert
    Community Expert
    January 16, 2017

    you shouldn't re-declare the same variable:

    var myHoriTween:Tween

    should only appear once on any one timeline/class.  it can be reused but that's not necessarily wise. using different names is more prudent:

    var tween1:Tween = whatever;

    var tween2:Tween = whatever else;

    etc.

    talented_knowledge16B6
    Participating Frequently
    January 16, 2017

    Thanks kglad.

    I think I fixed that (at least the errors went away--though it still cycles through without stopping) but now I am getting an error code regarding the Sound layer:

    1046 Type was not found or was not a compile-time constant: Void

    And this was the code line it was referencing

    var game_sound:Sound = new Sound();

    game_sound.onLoad = function(success:Boolean):Void {

    if (success) {

    trace("Sound Loaded");

    game_sound.start();

    }

    };

    game_sound.loadSound("pagechangeSFX2.mp3", false);

    Any thoughts?

    Thanks,

    Scott

    kglad
    Community Expert
    Community Expert
    January 16, 2017

    that should be void.  actionscript 3 is case-sensitive.