我需要对嵌入图像进行简单的淡入淡出效果,但我似乎无法弄清楚。“淡入淡出”和“补间”根本不起作用。似乎 animate 是在最新的 Flex SDK 中使用的效果。
我现在拥有的:
[Embed(source="assets/Back.png")]
private static const fullScreen:Class;
private var fullScreenButton:Image;
fullScreenButton = new Image();
fullScreenButton.source = fullScreen;
fullScreenButton.verticalAlign = "top";
fullScreenButton.horizontalAlign = "left";
fullScreenButton.visible = false;
private var animate:Animate
animate = new Animate();
// function is activated when video is loaded.
animate.duration = 2000;
animate.startDelay = 1000;
fullScreenButton.visible = true;
animate.target = fullScreenButton;
animate.play();
使用此代码没有任何效果。我究竟做错了什么?(这很可能是错误的做法,所以不要假设 animate 是我要专门使用的方法)。