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

Error 5001 Help in Flash CC 2015

New Here ,
Feb 04, 2016 Feb 04, 2016

Copy link to clipboard

Copied

I'm trying to make a start screen for my game using a tutorial on Youtube. This is the only error so far: C:\Users\5620604825\Desktop\Flash Games\TB RPG\startScreen.as, Line 1, Column 1 5001: The name of package 'startScreen' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:\Users\5620604825\Desktop\Flash Games\TB RPG\startScreen.as.

Any way to fix this? I can't seem to find help here as the topics on the board are from earlier versions.

TOPICS
ActionScript

Views

582

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 ,
Feb 04, 2016 Feb 04, 2016

Copy link to clipboard

Copied

package startScreen
{
import flash.display.MovieClip;
import flash.events.MouseEvent;

public class startScreen extends MovieClip
{
  public var startScreen: MovieClip

  public function startScreen()
  {
   startScreen.buttonMode = true;
   startScreen.addEventListener(MouseEvent.CLICK, startClick)
  }

  private function startClick(e: MouseEvent): void
  {
   dispatchEvent(new Event("Start_Game"));
  }

  public function hideScreen(): void
  {
   this.visible = false;
  }

  public function showScreen(): void
  {
   this.visible = true;
  }


}

}

There's the 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
Community Expert ,
Feb 05, 2016 Feb 05, 2016

Copy link to clipboard

Copied

LATEST

use:


package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;

public class startScreen extends MovieClip
{
// public var startScreen: MovieClip

  public function startScreen()
  {
   this.buttonMode = true;
this.addEventListener(MouseEvent.CLICK, startClick)
  }

  private function startClick(e: MouseEvent): void
  {
   dispatchEvent(new Event("Start_Game"));
  }

  public function hideScreen(): void
  {
   this.visible = false;
  }

  public function showScreen(): void
  {
   this.visible = 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