views:

12

answers:

1

Hi. 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 trying to achieve.

Thanks in advance for your help.

Sid.

A: 
...
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
     }
  }
}
a1ex07