Actionscript 2 if 语句错误

发布于 2024-12-09 02:05:36 字数 491 浏览 3 评论 0原文

我正在尝试创建一个 if 语句,但出现此 compolor 错误:

')' expected
Unexpected '}' encountered

我的函数:

function hideThumbs():Void {
    contentHolder.thumbHolder._visible = false;
        if (contentHolder.testerHolder._visible = true;) {
        contentHolder.testerHolder._visible = false;
    } else {
        }
    //contentHolder.thumbHolder.alphaTo(0, buttonTime, menuTween, 0, function(){ moveThumbs("out"); });
    //thumbsHidden = true;
}

I am trying to create a if statement, but I get this compolor error:

')' expected
Unexpected '}' encountered

My function:

function hideThumbs():Void {
    contentHolder.thumbHolder._visible = false;
        if (contentHolder.testerHolder._visible = true;) {
        contentHolder.testerHolder._visible = false;
    } else {
        }
    //contentHolder.thumbHolder.alphaTo(0, buttonTime, menuTween, 0, function(){ moveThumbs("out"); });
    //thumbsHidden = true;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼眸印温柔 2024-12-16 02:05:36

您是否尝试过:

if (contentHolder.testerHolder._visible == true) {

分号在那里没有任何作用,并且您需要在那里使用比较运算符,而不是赋值。

Did you try:

if (contentHolder.testerHolder._visible == true) {

The semicolon has nothing to do there, and you want a comparison operator in there, not an assignment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文