Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Created July 22, 2013 07:31
Show Gist options
  • Save TLMcode/6051941 to your computer and use it in GitHub Desktop.
Save TLMcode/6051941 to your computer and use it in GitHub Desktop.
EdgeCompClasses.jqr
(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", 0, function(sym, e) {
// Lookup the Edge Animate Symbol Javascript Object from an element that is
// an instance of a symbol. The symbol object can be used to invoke
// symbol functions like play, stop etc.
var nav = sym.getSymbol("nav_bar");
nav.play();
var incr3 = sym.getSymbol("incr3");
incr3.play();
});
//Edge binding end
Symbol.bindSymbolAction(compId, symbolName, "creationComplete", function(sym, e) {
sym.setVariable("test",bcnt=0);
sym.$("incr").html(bcnt);
sym.$("incr2").html(bcnt);
// sym.setVariable("myVariableName", "variableValue");
});
//Edge binding end
})("stage");
//Edge symbol end:'stage'
//=========================================================
//Edge symbol: 'nav_bar'
(function(symbolName) {
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 4000, function(sym, e) {
sym.stop();
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 1750, function(sym, e) {
// insert code here
sym.stop();
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 2250, function(sym, e) {
// insert code here
sym.stop();
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 2500, function(sym, e) {
// insert code here
sym.play("inend");
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3000, function(sym, e) {
// insert code here
sym.stop();
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3750, function(sym, e) {
// insert code here
sym.stop();
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 3250, function(sym, e) {
// insert code here
sym.play("inend");
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 4000, function(sym, e) {
// insert code here
sym.play("inend");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtAbout}", "mouseover", function(sym, e) {
sym.play("about");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtAbout}", "mouseout", function(sym, e) {
sym.play("about_");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtServices}", "mouseover", function(sym, e) {
sym.play("services");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtServices}", "mouseout", function(sym, e) {
sym.play("services_");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtGallery}", "mouseover", function(sym, e) {
sym.play("gallery");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtGallery}", "mouseout", function(sym, e) {
sym.play("gallery_");
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 4500, function(sym, e) {
// insert code here
sym.stop();
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 4750, function(sym, e) {
// insert code here
sym.play("inend");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtContacts}", "mouseover", function(sym, e) {
sym.play("contacts");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtContacts}", "mouseout", function(sym, e) {
sym.play("contacts_");
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtAbout}", "click", function(sym, e) {
// Create instance to main stage.
var MainSym = sym.getComposition().getStage();
// Get variable value from symbol on stage.
var myVariable = MainSym.getVariable("test");
// Change symbol variable value on the main stage.
MainSym.setVariable("test",myVariable+=1);
MainSym.$("incr").html(myVariable);
// Get value from symbol, change the text in stage text box.
var ssym = MainSym.getSymbol("ssmb").getVariable("sstst");
MainSym.$("incr2").html(ssym);
});
//Edge binding end
Symbol.bindElementAction(compId, symbolName, "${_txtServices}", "click", function(sym, e) {
var MainSym = sym.getComposition().getStage();
});
//Edge binding end
})("nav_bar");
//Edge symbol end:'nav_bar'
//=========================================================
//Edge symbol: 'ssymb'
(function(symbolName) {
Symbol.bindSymbolAction(compId, symbolName, "creationComplete", function(sym, e) {
sym.setVariable("sstst",2)
});
//Edge binding end
})("ssymb");
//Edge symbol end:'ssymb'
//Edge symbol: 'incr3'
(function(symbolName) {
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) {
var OSym = sym.getComposition().getStage();
// var dcnt = OSym.getVariable("test");
var dcnt = OSym.getVariable("test");
// alert( myVariable );
sym.$("TextG").html(dcnt);
});
//Edge binding end
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 1750, function(sym, e) {
sym.play(0);
});
//Edge binding end
})("incr3");
//Edge symbol end:'incr3'
})(jQuery, AdobeEdge, "EDGE-216240949");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment