この質問は以前に尋ねられたことを認識しており、解決策の大部分をすべて試しましたが、役に立ちませんでした。私のフラッシュ ファイルでは、goGallery フレームに外部 .swf をロードしていますが、別のフレームに移動すると、.swf ファイルがまだバックグラウンドにあります。
以下はコードです。新しいコードを配置する場所も教えていただければ、解決策をその中や周りに何度も配置しようとしたので、それは素晴らしいことです。
stop();
function listenerFunction (Event):void{
}
function goHome (e:MouseEvent):void{
gotoAndStop("Home");
}
home_btn.addEventListener(MouseEvent.CLICK, goHome);
function goAbout (e:MouseEvent):void{
gotoAndStop("About");
}
about_btn.addEventListener(MouseEvent.CLICK, goAbout);
function goHistory (e:MouseEvent):void{
gotoAndStop("History");
}
history_btn.addEventListener(MouseEvent.CLICK, goHistory);
function goEducation (e:MouseEvent):void{
gotoAndStop("Education");
}
education_btn.addEventListener(MouseEvent.CLICK, goEducation);
function goInterests (e:MouseEvent):void{
gotoAndStop("Interests");
}
interests_btn.addEventListener(MouseEvent.CLICK, goInterests);
function goGoals (e:MouseEvent):void{
gotoAndStop("Goals");
}
goals_btn.addEventListener(MouseEvent.CLICK, goGoals);
function goPuzzle (e:MouseEvent):void{
gotoAndStop("Puzzle");
}
puzzle_btn.addEventListener(MouseEvent.CLICK, goPuzzle);
function goSound (e:MouseEvent):void{
gotoAndStop("Sound");
}
sound_btn.addEventListener(MouseEvent.CLICK, goSound);
function goGallery (e:MouseEvent):void{
gotoAndStop("Gallery");
var myLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("gallery.swf");
myLoader.load(url);
addChild(myLoader);
myLoader.x = 380;
myLoader.y = 270;
myLoader.scaleX = 0.45;
myLoader.scaleY = 0.45;
}
gallery_btn.addEventListener(MouseEvent.CLICK, goGallery);