在Adobe边缘显示隐藏符号 [英] Show hide symbol in Adobe Edge

查看:308
本文介绍了在Adobe边缘显示隐藏符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是试图让我周围的Adobe边缘的头。我想实现听起来简单,但其真正的麻烦。我有一个按钮元素,当鼠标悬停时,显示的动画符号我。

Just trying to get my head around Adobe Edge. What I want to achieve sounds simple but having real trouble. I have a button element, that when mouseover, displays an animated symbol I have.

目前我的code,按钮是鼠标移开:

Currently my code,on the button is Mouseout:

sym.$("pgicatext2").hide();

和鼠标悬停:

sym.$("pgicatext2").show();

这似乎并不奏效。我能达到的结果,如果,我关掉电影符号,并使用此code按钮

This doesn't seem to be working. I can achieve the result if, I turn off the movie symbol, and use this code on the button

sym.$("pgicatext2").toggle();

麻烦的是它当然不会每次都在重新播放动画你的鼠标,和所有它隐藏​​了,而它的播放动画。

The trouble is of course it doesn't replay the animation every time you mouse over, and all the while it's hidden it's playing the animation.

推荐答案

请通过以下步骤获得:


  1. 检查按钮超过其他所有可见图层('元素'
    标签)。也许设定光标指针将帮助检查一下。

  1. Check if the button is over all other visible layers ('Elements' tab). Maybe setting cursor to 'pointer' will help to check it.

使用的MouseEnter 鼠标离开而不是鼠标悬停和
    鼠标移开。所不同的是这里解释

Use 'Mouseenter' and 'Mouseleave' instead of 'Mouseover' and 'Mouseout'. The difference is explained here.

请确保您的动画符号的自动播放选项关闭。如果
    你没有勾选它关闭在创建符号,只需设置播放
    到时间轴的舞台上停止在一开始

Make sure that your animated symbols 'autoplay' option is off. If you did not tick it off while creating the symbol, just set Playback to 'Stop' on Stage at the very beginning of the timeline

让我们做一些编码。让我们假设你的动画符号的名字是
    电影。您需要执行以下操作设置为您的按钮元素

Lets do some coding. Lets assume that your animated symbols name is "film". You need to set following actions to your button element:

的MouseEnter:

sym.$("film").show();
sym.getSymbol("film").play();

这基本上说明你的'电影'的元素并播放电影的符号

this basically shows up your 'film' element and plays 'film' symbol

鼠标离开:

sym.$("film").hide();
sym.getSymbol("film").stop(0);

这个隐藏你的'电影'的元素并停止'电影'的符号是在动画开始(0毫秒)

this one hides your 'film' element and stops 'film' symbol at the beginning of animation (0ms)

享受!

这篇关于在Adobe边缘显示隐藏符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆