Flash AS3切换可见

我有一个脚本,一旦点击(按钮)一些其他东西隐藏然后再次点击它重新显示.问题是一旦隐藏它永远不再显示这里是脚本:

menu_start.addEventListener(MouseEvent.CLICK,myClickFunction);


function myClickFunction(event:MouseEvent) {

      // Hide the first and show the next here
      if (menu_menu.visible == true){
      menu_menu.visible = false;

      } 
      if (menu_menu.visible == false) {
          menu_menu.visible == true;
      }

}

非常感谢.

解决方法

The reason is when you click on the
button,it does hide but again when
you click on the same button it does
not show back

如果我在上述陈述中错了,请纠正我.

现在尝试一下我说的话,有两个按钮隐藏和显示.创建两个新函数并尝试一下,如果这样有效,那么你的逻辑中就会缺少一些东西,如果这不起作用那么请告诉我们.

也试试这个.

function myClickFunction(event:MouseEvent) {

      // Hide the first and show the next here
      if (menu_menu.visible){
      menu_menu.visible = false;

      } else {
         menu_menu.visible = true;
      }

}

另一个问题可能是,当你点击按钮可能是它没有再次获取menu_menu属性作为其隐藏或销毁.它是在同一个组件内还是从其他地方调用?

相关文章

  译序:JWMediaPlayer是开源的网页使用的Flash播放器。本...
    Flash编程原理都是只能将1写为0,而不能将0写成1.所...
 上传setenvgatewayip192.168.1.1;setenvserverip192.168.1...
Error:FlashDownloadFailed-"Cortex-M3"出现一般有...
jPlayer是一个用于控制和播放mp3文件的jQuery插件。它在后台...
#ifndef__FONTUPD_H__#define__FONTUPD_H__#include"sy...