开发者

How to Prevent SWF File from Loading Again After Button Click

开发者 https://www.devze.com 2023-01-19 02:02 出处:网络
I\'m programing in ActionScript 3, and loading a swf file. I want to know how to prevent an already loaded swf file from loading again after clicking on a button. (ie. I click on the About button, whi

I'm programing in ActionScript 3, and loading a swf file. I want to know how to prevent an already loaded swf file from loading again after clicking on a button. (ie. I click on the About button, which loads the swf file called "about". I click on the About button again, and the About swf file doesn't load, because its already loaded) This is what I'm t开发者_如何学Pythonrying to achieve.

Thanks in advance for your help.

Sid.


...
public class MainClass extends MovieClip
{
   .... 
   private var aboutDlg:AboutClass = null;


  private function onAboutClick(e:Event):void
  {
     if (null != aboutDlg)
     {
        aboutDlg.visible = true;
     }
     else
     {
         // load dialog and assign aboutDlg to it
     }
  }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消