将鼠标悬停在Flash CS3中的文本上时,如何显示图像? [英] How to make an image appear when hovering over text in Flash cs3?
问题描述
如何.fla有文本,当鼠标结束,文本图像显示看起来像?
我想要使文本按钮,然后添加一些脚本....
首先,您需要创建一个包含文本的MovieClip符号。
为该符号实例指定一个名称(比如 然后,隐藏图片 接下来,将MOUSE_OVER和MOUSE_OUT事件监听器添加到 最后,声明这些事件监听器并定义它们。 从 http://www.uploads.sc/download.php?file=749ce36c801a9bf18ce1b5033d8fd82f How would the .fla that has text and when mouse is over that text an image appears look like? I was thinking to make the text a button and then add some script.... This is relatively simple First, you'll need to make a MovieClip symbol containing your text. Give that symbol instance a name (say Then, import your image and create a symbol from that too. Name it (e.g. Then, hide the image Next, add the MOUSE_OVER and MOUSE_OUT event listeners to Finally, declare those event listeners and define them Download the demo file (Flash CS5) from http://www.uploads.sc/download.php?file=749ce36c801a9bf18ce1b5033d8fd82f 这篇关于将鼠标悬停在Flash CS3中的文本上时,如何显示图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! mClip1 $ c
然后,导入你的图像,并从中创建一个符号。将其命名(例如 img1
)
img1.visible = false;
mClip1
$ b $ pre $ mClip1.addEventListener(MouseEvent.MOUSE_OVER,mOver);
mClip1.addEventListener(MouseEvent.MOUSE_OUT,mOut);
函数mOver(e:MouseEvent):void {
img1.visible = true;
函数mOut(e:MouseEvent):void {
img1.visible = false;
$ b mClip1
)img1
)img1.visible=false;
mClip1
mClip1.addEventListener(MouseEvent.MOUSE_OVER, mOver);
mClip1.addEventListener(MouseEvent.MOUSE_OUT, mOut);
function mOver(e:MouseEvent):void {
img1.visible=true;
}
function mOut(e:MouseEvent):void {
img1.visible=false;
}