5 Replies Latest reply on Mar 13, 2015 8:44 AM by joel_pau

    Hit a little roadblock:

    Crin

      Trying to use a script in Edge Animation. I am not a coder, I can do it in the timeline the old fashion way, but it seems that is faster with a script on the stage. I am following Paul Traini's course on Edge Animate on Lynda.com I followed him step by step, created a script and checked it over serveral times. What I really want to do is to pull data from an external file to display on images which are moving left and right on the stage at the press of the button.

       

      For same reasons, the json file with the description does not seem to be loading, although I placed it in the same directory with the animate file as instructed.

       

      Any ideas?

       

      Thanks

        • 1. Re: Hit a little roadblock:
          joel_pau Level 5

          Hi,

           

          Well, i don't see your tutorial. Did you add a jQuery file using the panel below?

          EALibraryPanel.jpg

          • 2. Re: Hit a little roadblock:
            Crin Level 1

            Thank you Joel.

             

            I don't know if you have access to Lynda.com, but this is the url of this particular segment:  Loading text for each image from the Course Creating a Slideshow with Edge Animate

             

            I thought that the loading of the data file  is done in the script on the fifth line:

             

             

             

             

             

            //Variable

            imageCount = 2;

            displayCount = 1

             

             

            //JSON

             

             

            $.getJSON("slides.json", function(data){

             

             

              //LoadData

              function loadData(i){

              sym.$("photo").attr("src", data(i).image);

             

             

              //Using data for the text

              sym.$("title").html(data(i).title);

              sym.$("desc").html(data(i).desc);

              sym.$("countText").html(data(i).displayCount + " of " + data.length);

              }

             

             

              loadData(imageCount);

             

             

            });

             

            My understanding was that once I run this in the browser, the third picture from the json file will be loaded with its properties displayed on that slide, and the running counter.

            • 3. Re: Hit a little roadblock:
              joel_pau Level 5

              Well, i imagine your json datas are within an array. An array uses brackets: [ ].

              So, data(i) is strange.

              Could you replace data(i) by data[i]:

              sym.$("photo").attr("src", data[ i ].image);

              //Using data for the text

              sym.$("title").html( data[ i ]).title );

              sym.$("desc").html( data[ i ].desc );

              sym.$("countText").html( data[ i ].displayCount + " of " + data.length );

              • 4. Re: Hit a little roadblock:
                Crin Level 1

                You are right.

                 

                However it must be something else that is missing, the script still doesn't work.

                • 5. Re: Hit a little roadblock:
                  joel_pau Level 5

                  You can send me your edge files by a private message using a cloud tool (iCloudDrive, oneDrive, Creative Cloud Files, dropbox, box and so on...)