在 ActionScript Mobile 项目中找不到 fl.transitions.Tween
我正在为 Android 开发一个 ActionScript 移动项目。
当我添加以下导入时,编译器说找不到。
import fl.transitions.Tween;
如何在移动项目中使用 Tween?
package{
import flash.display.Sprite;
import flash.text.TextField;
import flash.events.MouseEvent;
import fl.transitions.Tween;
import fl.transitions.easing.Strong;
public class spriteButton extends Sprite
{
private var alphaOver:Tween;
private var alphaLabelOver:Tween;
private var alphaLabel:Tween;
public function spriteButton(newLabel:String)
{
myLabel.text = newLabel;
myLabelOver.text = newLabel;
myLabelOver.alpha = 0;
buttonMode = true;
mouseChildren = false;
addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, handleMouseOut);
addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
}
顺便说一句,我对 ActionScript 3.0 开发非常陌生。
我收到此错误:
The import fl could not be found.
The import Tween could not be found.
Description Resource Path Location Type
1172: Definition fl.transitions:Tween could not be found. spriteButton.as /Test01/src line 4 Flex Problem
I'm developing an ActionScript mobile project for Android.
When I add the following import, compiler says that is not found.
import fl.transitions.Tween;
How can I use Tween with mobile projects?
package{
import flash.display.Sprite;
import flash.text.TextField;
import flash.events.MouseEvent;
import fl.transitions.Tween;
import fl.transitions.easing.Strong;
public class spriteButton extends Sprite
{
private var alphaOver:Tween;
private var alphaLabelOver:Tween;
private var alphaLabel:Tween;
public function spriteButton(newLabel:String)
{
myLabel.text = newLabel;
myLabelOver.text = newLabel;
myLabelOver.alpha = 0;
buttonMode = true;
mouseChildren = false;
addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, handleMouseOut);
addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
}
By the way, I'm very new on ActionScript 3.0 development.
I get this errors:
The import fl could not be found.
The import Tween could not be found.
Description Resource Path Location Type
1172: Definition fl.transitions:Tween could not be found. spriteButton.as /Test01/src line 4 Flex Problem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您是 AS3 新手,请使用此库: http://www.greensock.com/tweenmax/ 用于补间对象。
if you are new to AS3, then use this library: http://www.greensock.com/tweenmax/ for tweenning objects.