0 Replies Latest reply on May 29, 2015 3:54 AM by WillAnim

    Is there a way I can programatically create a composition without loading it from an _edge.js script?

    WillAnim

      I noticed _edge.js files are just closures which include some kind of blueprint for the animation (see below)

       

      Is there a way I can just pass this to EdgeAnimate programatically without having to load in an external file (eg skip the load phase and end up with an Edge Composition Object) - like new Edge.Composition() ??

       

      Cheers

       

      -------

        var im='images/',

              aud='media/',

              vid='media/',

              js='js/',

              fonts = {

                  'BEBAS': ''        },

              opts = {

                  'gAudioPreloadPreference': 'auto',

                  'gVideoPreloadPreference': 'auto'

              },

              resources = [

              ],

              scripts = [

              ],

              symbols = {

                  "stage": {

                      version: "5.0.1",

                      minimumCompatibleVersion: "5.0.0",

                      build: "5.0.1.386",

                      scaleToFit: "both",

                      centerStage: "none",

                      resizeInstances: false,

                      content: {

                          dom: [

                              {

                                  id: 'Background',

                                  type: 'rect',

                                  rect: ['0px', '0px', '1920px', '1080px', 'auto', 'auto'],

                                  fill: ["rgba(244,200,36,0.99)"],

                                  stroke: [0,"rgb(0, 0, 0)","none"]

                              },

                              {

                                  id: 'Ellipse',

                                  type: 'ellipse',

                                  rect: ['592px', '-409px', '1603px', '1888px', 'auto', 'auto'],

                                  borderRadius: ["50%", "50%", "50%", "50%"],

                                  fill: ["rgba(244,204,64,0.99)"],

                                  stroke: [0,"rgb(0, 0, 0)","none"],

                                  transform: [[],['-34']]

                              },

                              {

                                  id: 'Mask3',

                                  type: 'rect',

                                  rect: ['288px', '612px', '1362px', '328px', 'auto', 'auto'],

                                  overflow: 'hidden',

                                  fill: ["rgba(192,192,192,0)"],

                                  stroke: [1,"rgb(0, 0, 0)","none"],

                                  c: [

                                  {

                                      id: 'Text3',

                                      type: 'text',

                                      rect: ['-14px', '-268px', '1465px', '266px', 'auto', 'auto'],

                                      text: "Feature!",

                                      align: "center",

                                      font: ['BEBAS', [258, "px"], "rgba(254,252,237,1.00)", "400", "none solid rgb(0, 0, 0)", "normal", "break-word", "normal"],

                                      textStyle: ["51px", "", "251px", ""],

                                      textShadow: ["rgba(0,0,0,0.16)", 2, 6, 3]

                                  }]

                              },

                              {

                                  id: 'Mask2',

                                  type: 'rect',

                                  rect: ['269px', '376px', '1386px', '282px', 'auto', 'auto'],

                                  overflow: 'hidden',

                                  fill: ["rgba(192,192,192,0)"],

                                  stroke: [1,"rgb(0, 0, 0)","none"],

                                  c: [

                                  {

                                      id: 'Text2',

                                      type: 'text',

                                      rect: ['19px', '276px', '1396px', '266px', 'auto', 'auto'],

                                      text: "Such a good",

                                      align: "center",

                                      font: ['BEBAS', [239, "px"], "rgba(254,252,237,1.00)", "400", "none solid rgb(0, 0, 0)", "normal", "break-word", "normal"],

                                      textStyle: ["15px", "", "251px", ""],

                                      textShadow: ["rgba(0,0,0,0.16)", 2, 6, 3]

                                  }]

                              },

                              {

                                  id: 'Mask1',

                                  type: 'rect',

                                  rect: ['294px', '116px', '1373px', '282px', 'auto', 'auto'],

                                  overflow: 'hidden',

                                  opacity: '1',

                                  fill: ["rgba(192,192,192,0.00)"],

                                  stroke: [0,"rgba(0,0,0,1)","none"],

                                  c: [

                                  {

                                      id: 'Text1',

                                      type: 'text',

                                      rect: ['-26px', '-272px', '1396px', '266px', 'auto', 'auto'],

                                      text: "TEXT BLOCK IS",

                                      align: "center",

                                      font: ['BEBAS', [239, "px"], "rgba(254,252,237,1.00)", "400", "none solid rgb(0, 0, 0)", "normal", "break-word", "normal"],

                                      textStyle: ["0px", "", "251px", ""],

                                      textShadow: ["rgba(0,0,0,0.16)", 2, 6, 3]

                                  }]

                              }

                          ],

                          style: {

       

       

                          }

                      },

                      timeline: {

                          duration: 3284,

                          autoPlay: false,

                          data: [

                              [

                                  "eid54",

                                  "left",

                                  1466,

                                  0,

                                  "easeOutBack",

                                  "${Text3}",

                                  '-14px',

                                  '-14px'

                              ],

                              [

                                  "eid3",

                                  "top",

                                  128,

                                  261,

                                  "easeOutBack",

                                  "${Text1}",

                                  '-272px',

                                  '-4px'

                              ],

                              [

                                  "eid62",

                                  "top",

                                  2234,

                                  367,

                                  "easeInBack",

                                  "${Text1}",

                                  '-4px',

                                  '266px'

                              ],

                              [

                                  "eid52",

                                  "left",

                                  128,

                                  0,

                                  "linear",

                                  "${Text1}",

                                  '-26px',

                                  '-26px'

                              ],

                              [

                                  "eid53",

                                  "left",

                                  590,

                                  0,

                                  "linear",

                                  "${Text2}",

                                  '19px',

                                  '19px'

                              ],

                              [

                                  "eid9",

                                  "top",

                                  590,

                                  265,

                                  "easeOutBack",

                                  "${Text2}",

                                  '-256px',

                                  '-4px'

                              ],

                              [

                                  "eid66",

                                  "top",

                                  2601,

                                  343,

                                  "easeInBack",

                                  "${Text2}",

                                  '-4px',

                                  '276px'

                              ],

                              [

                                  "eid70",

                                  "color",

                                  389,

                                  0,

                                  "linear",

                                  "${Text1}",

                                  'rgba(254,252,237,1.00)',

                                  'rgba(254,252,237,1.00)'

                              ],

                              [

                                  "eid72",

                                  "color",

                                  389,

                                  0,

                                  "linear",

                                  "${Text3}",

                                  'rgba(254,252,237,1.00)',

                                  'rgba(254,252,237,1.00)'

                              ],

                              [

                                  "eid71",

                                  "color",

                                  389,

                                  0,

                                  "linear",

                                  "${Text2}",

                                  'rgba(254,252,237,1.00)',

                                  'rgba(254,252,237,1.00)'

                              ],

                              [

                                  "eid11",

                                  "top",

                                  1061,

                                  405,

                                  "easeOutBack",

                                  "${Text3}",

                                  '-268px',

                                  '12px'

                              ],

                              [

                                  "eid69",

                                  "top",

                                  2944,

                                  340,

                                  "easeInBack",

                                  "${Text3}",

                                  '12px',

                                  '312px'

                              ]

                          ]