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

How to fix warnings 1082 (migration issue) and 1008 in Adobe Animate CC AS3?

New Here ,
Nov 15, 2016 Nov 15, 2016

Copy link to clipboard

Copied

Hello everyone! When I debug the project, I got received 222 warnings and it contain only two warnings:

Warning: 1082: Migration issue: Method %s will behave differently in ActionScript 3.0 due to the change in scoping for the this keyword. See the entry for warning 1083 for additional information.

And the another one:

Warning: 1008: return value for function '%s' has no type declaration

Here's my screenshot of warnings (it's too many):

ss.JPG

And here's my code in AS file:

package {

  
import flash.display.*;
  
import flash.text.*;
  
import flash.events.Event;
  
import flash.display.MovieClip;
  
import flash.events.MouseEvent;

  
public class Main extends MovieClip {
  
public var mainmenu: MainMenu = new MainMenu();
  
public var scrollinstructwin: ScrollInstructWin = new ScrollInstructWin();
  
public var startopt: StartOpt = new StartOpt();
  
public var learnopt: LearnOpt = new LearnOpt();
  
public var newload: NewLoad = new NewLoad();
  
public var propocon: PropoCon = new PropoCon();
  
public var setcon: SetCon = new SetCon();
  
public var relationcon: RelationCon = new RelationCon();
  
public var scrollstorywin: ScrollStoryWin = new ScrollStoryWin();

  
public function Main() {
  
super();
  addChild
(mainmenu);

  mainmenu
.x = 350;
  mainmenu
.y = 290;

  mainmenu
.btnStart.addEventListener(MouseEvent.CLICK, start);//warning 1082
  mainmenu
.btnInstruct.addEventListener(MouseEvent.CLICK, instruct);
  
}
  
public function start(event: MouseEvent) {//warning 1008
  removeChild
(mainmenu);
  addChild
(startopt);

  startopt
.x = 350;
  startopt
.y = 290;

  startopt
.btnLearn.addEventListener(MouseEvent.CLICK, learn);
  startopt
.btnPlay.addEventListener(MouseEvent.CLICK, laro);
  startopt
.btnBack.addEventListener(MouseEvent.CLICK, back);
  
}
  
public function instruct(event: MouseEvent) {
  removeChild
(mainmenu);
  addChild
(scrollinstructwin);

  scrollinstructwin
.x = 36.20;
  scrollinstructwin
.y = 21.50;

  scrollinstructwin
.btnGi.addEventListener(MouseEvent.CLICK, gi);
  
}
  
public function gi(event: MouseEvent) {
  removeChild
(scrollinstructwin);
  addChild
(mainmenu);
  
}
  
public function back(event: MouseEvent) {
  removeChild
(startopt);
  addChild
(mainmenu);
  
}
  
public function learn(event: MouseEvent) {
  removeChild
(startopt);
  addChild
(learnopt);

  learnopt
.x = 350;
  learnopt
.y = 290;

  learnopt
.btnPropo.addEventListener(MouseEvent.CLICK, propo);
  learnopt
.btnSets.addEventListener(MouseEvent.CLICK, sets);
  learnopt
.btnRelations.addEventListener(MouseEvent.CLICK, relations);
  learnopt
.btnBack3.addEventListener(MouseEvent.CLICK, backo);
  
}
  
public function laro(event: MouseEvent) {
  removeChild
(startopt);
  addChild
(newload);

  newload
.x = 350;
  newload
.y = 290;

  newload
.btnNew.addEventListener(MouseEvent.CLICK, neww);
  newload
.btnBack2.addEventListener(MouseEvent.CLICK, backu);
  
}
  
public function backo(event: MouseEvent) {
  removeChild
(learnopt);
  addChild
(startopt);
  
}
  
public function neww(event: MouseEvent) {
  removeChild
(learnopt);
  addChild
(scrollstorywin);

  scrollstorywin
.x = 51.15;
  scrollstorywin
.y = 30.05;
  
}
  
public function backu(event: MouseEvent) {
  removeChild
(newload);
  addChild
(startopt);
  
}
  
public function propo(event: MouseEvent) {
  removeChild
(learnopt);
  propocon
.gotoAndStop(1);
  addChild
(propocon);

  propocon
.x = 414.80;
  propocon
.y = 218.60;

  propocon
.btnExit.addEventListener(MouseEvent.CLICK, byeol);
  
}
  
public function byeol(event: MouseEvent) {
  removeChild
(propocon);
  addChild
(learnopt);
  
}
  
/*propocon.btnBtm.addEventListener(MouseEvent.CLICK, byl);
  public function byl(event: MouseEvent) {
  removeChild(propocon);
  addChild(learnopt);
  }*/


  
public function sets(event: MouseEvent) {
  removeChild
(learnopt);
  addChild
(setcon);

  setcon
.x = 412.45;
  setcon
.y = 225.00;
  
}
  
public function relations(event: MouseEvent) {
  removeChild
(learnopt);
  addChild
(relationcon);

  relationcon
.x = 400.00;
  relationcon
.y = 225.00;
  
}
  
}
}

I'm finding a solution of it esp Warning: 1082: Migration issue but unfortunately, I found nothing. I read about Warning: 1082: Migration issueand it says that the codes import from AS2 to AS3, but in my case, I NEVER using AS2. And yes, I'm importing code from the another file, but in AS3, too. How can I fix these errors? Any ideas on how to solve it? Any suggestions or help will be appreciated. Thanks!

Views

1.6K

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 , Nov 15, 2016 Nov 15, 2016

remove super()

Votes

Translate

Translate
Community Expert ,
Nov 15, 2016 Nov 15, 2016

Copy link to clipboard

Copied

remove super()

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 ,
Nov 15, 2016 Nov 15, 2016

Copy link to clipboard

Copied

Alright! No more errors appear, just super() is the problem. Thanks!

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 ,
Nov 16, 2016 Nov 16, 2016

Copy link to clipboard

Copied

you're welcome.

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 ,
Dec 14, 2019 Dec 14, 2019

Copy link to clipboard

Copied

LATEST

can i know how to remove super() because im having the same problem. i dont even know why the warning appear : (

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