我是编码的新手,并且正在 Adobe Edge Animate 中开展一个项目。我创建了一个返回按钮,使用户能够在播放视频时单击它,从而关闭视频并将它们返回到主菜单。这可行,但是,视频音频继续在后台播放。
有谁知道如何让视频在返回主菜单的同时暂停播放?
这是我的代码
(function ($, Edge, compId) {
var Composition = Edge.Composition,
Symbol = Edge.Symbol; // aliases for commonly used Edge classes
//Edge symbol: 'stage'
(function (symbolName) {
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 1000, function (sym, e) {
// sym.$("name") resolves an Edge Animate element name to a DOM
// element that can be used with jQuery
var vid = sym.$("Rectangle");
vid.html('<video width="1920" height = "1080" src = "video/OurChangingWorld_AirQuality_Final_v2.mp4" type ="video/mp4" controls autoplay></video>');
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function (sym, e) {
sym.stop();
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_Button_AirQuality}", "click", function (sym, e) {
sym.play("Video 1");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_Return_button-01}", "click", function (sym, e) {
sym.play("Main");
});
//Edge binding end
})("stage");
//Edge symbol end:'stage'
})(jQuery, AdobeEdge, "EDGE-3854874");