Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

bindTriggerAction Post Update (10/7/14)

$
0
0

Before updating to the new Edge version, I would systematically go through the various labels and add timeline based triggers via:

if (sym.timelines["Default Timeline"].labels) {    $.each(sym.timelines["Default Timeline"].labels, $.proxy(function(label, pos) {        if (label.indexOf("trigger_") === 0) {            modified = true;            modFunc = $.proxy(function() {                this.trigger({                    name: "symbolEvent",                    label: label.substr(8)                });            }, this);            modSym.bindings.push(modFunc);            AdobeEdge.Symbol.bindTriggerAction(GPA.compId, sym.options.data.typeName, "Default Timeline", pos, modFunc);        }    }, this));
}

 

The new way of doing this is nearly identical, yet somehow fails to bind all but the last of requested bindings:

var symLabels = sym.data[symName].timeline.labels,    modSym = {        bindings: [],        sym: sym    },    modified = false,    i, listLength, label, modFunc,    subSyms = sym.ci;


if (symLabels) {
    $.each(symLabels, $.proxy(function(label, pos) {        if (label.indexOf("trigger_") === 0) {            modified = true;            modFunc = $.proxy(function() {                this.trigger({                    name: "symbolEvent",                    label: label.substr(8)                });            }, this);            modSym.bindings.push(modFunc);            AdobeEdge.Symbol.bindTriggerAction(GPA.compId, symName, "Default Timeline", pos, modFunc);        }    }, this));
}

 

The results should be the same, but none of the bindings seem to fire, and worse, any bindings put on via the timeline in Edge seem to be removed entirely.


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>