• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Error Code 1151

New Here ,
Jan 15, 2017 Jan 15, 2017

Copy link to clipboard

Copied

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?

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 16, 2017 Jan 16, 2017

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

Votes

Translate

Translate
Community Expert ,
Jan 15, 2017 Jan 15, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

More error codes:

1120 Access of undefined property percent

Here is the code block it is referencing:

percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);

loadingPercent.text = percent + " %";

Also,

1180 Call to an undefined method getbytestloaded

Code:

percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);

loadingPercent.text = percent + " %";

Also,

1120 Access of undefined property progressBar_mc

Code:

//create clips to hold your content

this.createEmptyMovieClip("progressBar_mc", 0);

progressBar_mc.createEmptyMovieClip("bar_mc", 1);

progressBar_mc.createEmptyMovieClip("stroke_mc", 2);

//use drawing methods to create a progress bar

with (progressBar_mc.stroke_mc) {

lineStyle(0, 0x000000);

moveTo(0, 0);

lineTo(100, 0);

lineTo(100, 10);

lineTo(0, 10);

lineTo(0, 0);

}

with (progressBar_mc.bar_mc) {

beginFill(0xFF0000, 100);

moveTo(0, 0);

lineTo(100, 0);

lineTo(100, 10);

lineTo(0, 10);

lineTo(0, 0);

endFill();

_xscale = 0;

}

progressBar_mc._x = 2;

progressBar_mc._y = 1143;

// load progress

var mclListener:Object = new Object();

mclListener.onLoadStart = function(target_mc:MovieClip) {

progressBar_mc.bar_mc._xscale = 0;

};

mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {

progressBar_mc.bar_mc._xscale = Math.round(bytesLoaded/bytesTotal*100);

};

mclListener.onLoadComplete = function(target_mc:MovieClip) {

progressBar_mc.removeMovieClip();

};

mclListener.onLoadInit = function(target_mc:MovieClip) {

target_mc._height = 500;

target_mc._width = 700;

};

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

to solve that percent error, use:

var percent:Number = Math.floor(this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal*100);

for your progressBar_mc error, you need to define progressBar_mc either on stage or in code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

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);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

Thanks, kglad!

Here is the next issue:

Error Message:

1067: Implicit coercion of a value of type int to an unrelated type string

Code:

if (percent ==100){

gotoAndPlay("animation",1);

}else{

gotoAndPlay(1);

}

Also, kglad I would be interested in paying you to clean up all the code on this website if you are interested.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2017 Jan 16, 2017

Copy link to clipboard

Copied

LATEST

Thanks, kglad!

Here is my next issue:

Error Message:

1067: Implicit coercion of a value of type int to an unrelated type string

Code:

if (percent ==100){

gotoAndPlay("animation",1);

}else{

gotoAndPlay(1);

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines