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
}
}
}
精彩评论