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

trying to use reel.js - cool 360 spin

$
0
0

Hi Guys

I found this really neat open source .js script for spiing an image sequence. The  1st script below works a treat in Dreamweaver, but struggling as ever to translate it to EA.

 

<!DOCTYPE html>

  <head>

    <meta charset='utf-8' content='text/html' http-equiv='Content-type' />

 

    <script src='jquery-1.9.1.min.js' type='text/javascript'></script>

    <script src='jquery.reel-1.2.1-bundle.js' type='text/javascript'></script>

 

  </head>

  <body>

 

    <img id="image" src='fish/DSCN0691.JPG' width="210" height="186" />

    <script>

      $(function(){ // when DOM ready

 

 

        $('#image').reel({

          images:      'fish/DSCN####.JPG|691..702'

        });

 

 

      });

    </script>

 

and below is how I've tried to adapt it for Edge Animate

 

***********************

* Adobe Edge Animate Composition Actions

*

* Edit this file with caution, being careful to preserve

* function signatures and comments starting with 'Edge' to maintain the

* ability to interact with these actions from within Adobe Edge Animate

*

***********************/

(function($, Edge, compId){

var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes

 

 

   //Edge symbol: 'stage'

   (function(symbolName) {

     

     

      Symbol.bindElementAction(compId, symbolName, "document", "compositionReady", function(sym, e) {

         yepnope(

         {

             nope:[

               'JS/jquery.reel-1.2.1-bundle.js',

              ],

             complete: init

         }

         );

         function init() {

          var stage = sym.$("image");

          }

 

 

      $(function(){ // when DOM ready

 

 

        $('#image').reel({

          images:      'fish/DSCN####.JPG|691..702'

        });

 

 

      });

 

 

      });

      //Edge binding end

 

 

   })("stage");

   //Edge symbol end:'stage'

 

 

})(jQuery, AdobeEdge, "EDGE-10368737");

 

 

I have placed the first frame image on the stage and called the div "image" - although I see no reference to it in the full code in EA

 

Any ideas?

 

Cheers

Alistair


Viewing all articles
Browse latest Browse all 9897

Trending Articles