5 Replies Latest reply on Jul 22, 2013 1:22 AM by robboerman

    Loading external fiels (json, images) using oam?

    Granny&Smith

      Hey there,

       

       

      i have build an edge animate animation/application and want to embed it with it's "oam" file into a muse website. .. So far this isn't really a problem, BUT i am using external json data and images in my project...

       

      After exporting to the oam-file and embedding it to muse i'm not able to load these files anymore... I've tried several folders and so on but nothing works out :/

       

       

       


      Any idea how to solve this?

       

       

       

      Best,
      Nico

        • 1. Re: Loading external fiels (json, images) using oam?
          robboerman Level 4

          publish the muse project and see if the json and images are in the edgeanimate_assets folder.

          if not, manualy put the images and json file in that folder.

          • 2. Re: Loading external fiels (json, images) using oam?
            Granny&Smith Level 1

            I am always getting this error:

             

            Origin null is not allowed by Access-Control-Allow-Origin. ?

            • 3. Re: Loading external fiels (json, images) using oam?
              robboerman Level 4

              what code did you use for the json files? ( at stage ready)

              • 4. Re: Loading external fiels (json, images) using oam?
                Granny&Smith Level 1

                function loadJSON() {

                                    jsonDATA = [];

                                    $.getJSON('source.json', function(data) {

                                              refCount = data.images.length;

                 

                 

                                              // Global Path for Images

                                              imageGlobalPath = data.global_path;

                 

                 

                                              // Loop through each reference

                                              for ( var i=0; i < refCount; i++){

                                               var o = data.images[i];                               

                                                jsonDATA.push(

                                                                  {

                                                                            "id":i,

                                                                            "img_sw":o.img_sw,

                                                                            "img_clr":o.img_color,

                                                                            "url":o.url,

                                                                            "title":o.headtitle,

                                                                            "description":o.description,

                                                                  }

                                                );                               

                                              }

                                              createBoxes();

                                    });

                 

                }

                 

                 

                That's the code

                • 5. Re: Loading external fiels (json, images) using oam?
                  robboerman Level 4

                  did you test it in other browsers like firefox?

                   

                  because i think its an error of json caused by the chrome security