对于大学作业,我必须在 Adobe Edge Animate 中为 Smegg 冰箱开发一个产品网站。我的问题是我希望徽标在完全不透明度和比如说 30% 之间有一个恒定的不透明度过渡,然后再回到 100%,这会一直循环。我写了一些 jQuery 代码,但它不起作用。对不起我的英语不好,这不是我的母语。这是代码:
//Edge symbol: 'stage'
(function(symbolName) {
Symbol.bindElementAction(compId, symbolName, "document", "compositionReady", function(sym, e) {
// insert code to be run when the composition is fully loaded here
var timer = $.timer(logoHandler, 1000);
function logoHandler() {
var state = true;
if ( state ) {
$( "#smegLogo" ).animate({
opacity: 0.3
}, 500 );
} else {
$( "#smegLogo" ).animate({
opacity: 1
}, 500 );
}
state = !state;
};
timer.play();
});