我一直试图进行测验,但我收到一堆错误,说:公共属性只能在包内使用。
package
{
import flash.display.Sprite;
import flash.events.Event;
/**
* ...
* @author Ilija
*/
public class Main extends Sprite
{
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
private var ButtonI:Loader = new Loader();
我收到所有这些变量的错误 private var ButtonI2:Loader = new Loader(); private var ButtonI3:Loader = new Loader(); private var Button1:Sprite = new Sprite(); private var Button2:Sprite = new Sprite(); private var Button3:Sprite = new Sprite();
private var QuestionText:TextField = new TextField();
private var A1Text:TextField = new TextField();
private var A2Text:TextField = new TextField();
private var A3Text:TextField = new TextField();
private var pointText:TextField = new TextField();
private var point:int = 0;
private var _questions:Questions;
public function Main():void
答案 0 :(得分:0)
当你{没有匹配}
时,我看到了这个错误确保你有一个带有大括号的开口......