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.
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.
Copy link to clipboard
Copied
use:
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;public class startScreen extends MovieClip
{
// public var startScreen: MovieClippublic 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;
}
}}