flash - 在Flash/AS3中扩展SimpleButton类时出现错误1017

标签 flash actionscript-3 actionscript compiler-errors

尝试在AS3中扩展SimpleButton类时,收到以下编译时错误:

1017:找不到基类SimpleButton的定义

和代码:

package com.shakti.gameState{

import flash.display.SimpleButton.SimpleButton;

public class buttonTile extends SimpleButton {

    public var id:int;
    public var quizId:int;
    public var subjectId:int;
    public var points:int;
    public var questionTxt:String;
    public var order:int;
    public var option:Array;

    public function buttonTile(newId:int, newQuizId:int, newSubId:int, newPoints:int, qtxt:String, newOrder:int, newOption:Array) {
        this.id=newId;
        this.quizId=newQuizId;
        this.subjectId=newSubId;
        this.points=newPoints;
        this.questionTxt=qtxt;
        this.order=newOrder;
        this.option=newOption;
    }
}}

这是在Flash中开发的 ActionScript 3文件。

谢谢你的帮助!
凯文

最佳答案

导入类(class)。

 import flash.display.SimpleButton

我总是从复制和粘贴中得到:)

关于flash - 在Flash/AS3中扩展SimpleButton类时出现错误1017,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6229760/

相关文章:

actionscript-3 - AS3 在特定框架上移动物体

c++ - 我有一个 wxwidgets,我想添加一些很酷的效果。使用 GDI 会非常困难。我可以使用闪光灯或其他东西吗?

flash - OOP 问题 : Extending a class, 覆盖函数和类似 jQuery 的语法

actionscript-3 - 在 AS3 中包含图像比嵌入更好的方法?

c# - 如何在 C# 和 Flex 之间共享代码?

java - Java 可以读取基于 Adob​​e Flash 的游戏中发生的情况吗?

apache-flex - 保护应用程序的某些部分

actionscript-3 - AS3 TextField 和 TextFormat 内存泄漏 "other bitmap memory"

c# - 简单 3d 应用程序的最简单方法

java - 映射 Java ArrayList<CustomClass> 和 Flex ArrayCollection