Olá pessoal, tudo bem ? Bem, estou com um problema na definição de uma classe. O compilador apresenta os seguintes erros: ...\Welcome.as(23): col: 4 Error: The private attribute may be used only on class property definitions. ...\Welcome.as(30): col: 4 Error: The public attribute can only be used inside a package. ...\Welcome.as(57): col: 4 Error: The public attribute can only be used inside a package. O código de definição segue abaixo: package screens
{
import starling.display.Button;
import starling.display.Image;
import starling.display.Sprite;
import starling.events.Event;
public class Welcome extends Sprite
{
private var bg:Image;
private var title:Image;
private var hero:Image;
private var playBtn:Button;
private var aboutBtn:Button;
public function Welcome()
{
//super();
this.addEventListener(starling.events.Event.ADDED_TO_STAGE, onAddedToStage);
private function onAddedToStage(event:Event):void
{
trace ("WelcomeScreen to initialized");
drawScreen();
}
public function drawScreen():void
{
bg = new Image(Assets.getTexture("BgWelcome"));
this.addChild(bg);
title = new Image(Assets.getTexture("WelcomeTitle"));
title.x = 440;
title.y = 20;
this.addChild(title);
hero = new Image(Assets.getTexture("WelcomeHero"));
this.addChild(hero);
hero.x = -hero.width;
hero.y = 100;
playBtn = new Button(Assets.getTexture("WelcomePlayBtn"));
this.addChild(playBtn);
playBtn.x = 500;
playBtn.y = 260;
aboutBtn = new Button(Assets.getTexture("WelcomeAboutBtn"));
this.addChild(aboutBtn);
aboutBtn.x = 410;
aboutBtn.y = 380;
}
public function initialize():void
{
this.visible = true;
hero.x = -hero.width;
hero.y = 100;
}
}
}
} Eu uso a última versão do FlashDevelop, AIR 3.2 e Flash Debug Player 11.2 ... Qual pode ser o problema? Desde já, obrigado