私はフラッシュが初めてで、残念ながら私たちの先生はトランジションの仕方を教えてくれませんでした。調べてみたところ、何百通りもあるようです。私の場合、有効な方法が見つかりませんでした。ロード中の画像間のトランジションを挿入するにはどうすればよいですか?
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.MouseEvent;
import fl.transitions.*;
import fl.transitions.easing.*;
home_btn.addEventListener(MouseEvent.CLICK, takeToHomeZerg);
sarahkerrigan_btn.addEventListener(MouseEvent.CLICK, addsarahkerrigan);
izsha_btn.addEventListener(MouseEvent.CLICK, addizsha);
abathur_btn.addEventListener(MouseEvent.CLICK, addabathur);
var sarahkerriganAdd:Loader = new Loader();
var izshaAdd:Loader = new Loader();
var abathurAdd:Loader = new Loader();
var sarahkerrigan:URLRequest = new URLRequest("zerg/sarahkerrigan.jpg");
var izsha:URLRequest = new URLRequest("zerg/izsha.jpg");
var abathur:URLRequest = new URLRequest("zerg/abathur.jpg");
sarahkerriganAdd.visible = false;
izshaAdd.visible = false;
abathurAdd.visible = false;
addChild(sarahkerriganAdd);
addChild(izshaAdd);
addChild (abathurAdd);
function takeToHomeZerg (evt:MouseEvent):void{
gotoAndStop(1);
removeChild(sarahkerriganAdd);
removeChild(izshaAdd);
removeChild (abathurAdd);
}
function addsarahkerrigan (evt:MouseEvent):void{
sarahkerriganAdd.load(sarahkerrigan);
sarahkerriganAdd.x = 275;
sarahkerriganAdd.y = 32;
sarahkerriganAdd.scaleX = .2618;
sarahkerriganAdd.scaleY = .28;
sarahkerriganAdd.visible = true;
izshaAdd.visible = false;
abathurAdd.visible = false;
}
function addizsha (evt:MouseEvent):void{
izshaAdd.load(izsha);
izshaAdd.x = 275;
izshaAdd.y = 32;
izshaAdd.scaleX = .2618;
izshaAdd.scaleY = .28;
izshaAdd.visible = true;
sarahkerriganAdd.visible = false;
abathurAdd.visible = false;
}
function addabathur (evt:MouseEvent):void{
abathurAdd.load(abathur);
abathurAdd.x = 275;
abathurAdd.y = 32;
abathurAdd.scaleX = .2618;
abathurAdd.scaleY = .28;
abathurAdd.visible = true;
izshaAdd.visible = false;
sarahkerriganAdd.visible = false;
}