Javascript in Edge

I am no expert in javascript, but in trying to move some of what I have created over and understand the new Edge features I can't figure out how these things quite equate to what the code input field is telling me. Maybe someone can reccommend a good tutorial if they know of one, but I can't find any triggers such as 'onload', and all the functions start with 'sym'.
Is it possible to get code to load right from the initial load and work on just one image layer? Or is this a little much?
I found this code that waves an image like a flag, and I can get it to work and load just fine on a page I just code by hand, but I cannot get it to load in the program and work at all. I have tried removing the entier first part of the script and using defined variables to simplify, but I feel I am just missing something here.
Thank you in advance for any help.
<script type="text/javascript">
var h = new Image;
h.onload = function(){
          var flag = document.getElementById('flag');
          var amp = 20;
          flag.width  = h.width;
          flag.height = h.height + amp*2;
          flag.getContext('2d').drawImage(h,0,amp,h.width,h.height);
          flag.style.marginLeft = -(flag.width/2)+'px';
          flag.style.marginTop  = -(flag.height/2)+'px';
          var timer = waveFlag( flag, h.width/10, amp );
h.src = '\image01.jpg';
function waveFlag( canvas, wavelength, amplitude, period, shading, squeeze ){
          if (!squeeze)    squeeze    = 0;
          if (!shading)    shading    = 100;
          if (!period)     period     = 200;
          if (!amplitude)  amplitude  = 10;
          if (!wavelength) wavelength = canvas.width/10;
          var fps = 30;
          var ctx = canvas.getContext('2d');
          var   w = canvas.width, h = canvas.height;
          var  od = ctx.getImageData(0,0,w,h).data;
          // var ct = 0, st=new Date;
          return setInterval(function(){
                    var id = ctx.getImageData(0,0,w,h);
                    var  d = id.data;
                    var now = (new Date)/period;
                    for (var y=0;y<h;++y){
                              var lastO=0,shade=0;
                              var sq = (y-h/2)*squeeze;
                              for (var x=0;x<w;++x){
                                        var px  = (y*w + x)*4;
                                        var pct = x/w;
                                        var o   = Math.sin(x/wavelength-now)*amplitude*pct;
                                        var y2  = y + (o+sq*pct)<<0;
                                        var opx = (y2*w + x)*4;
                                        shade = (o-lastO)*shading;
                                        d[px  ] = od[opx  ]+shade;
                                        d[px+1] = od[opx+1]+shade;
                                        d[px+2] = od[opx+2]+shade;
                                        d[px+3] = od[opx+3];
                                        lastO = o;
                    ctx.putImageData(id,0,0);
                    // if ((++ct)%100 == 0) console.log( 1000 * ct / (new Date - st));
          },1000/fps);
</script>

you can create you'r only file and made a call in Composition Complete
like this
// Load All-in-One (in creationComplete)
yepnope({
    load: "http://cdn.edgecommons.org/an/1.0.0/js/min/EdgeCommons.js",
complete: function() {
EC.debug("Ready to go!");
SEIF

Similar Messages

  • Coding with javascript in EDGE tutorials/samples from start to finish

    Hi
    I realize the forum is good sourc for javascript tips. But for us un-whiz kids that take advantage of all the gifts you geniuses at Adobe create, could there be a javascripting for Edge workshop? Coding from start to finish. If one does not know how to implement the code, that ONE is at a loss. I know that I could take EDge and fly with it visually but when it comes to the level of interactivity and animation, Istumble and come to an abrupt stop.
    Is the javascript workshop/tutorials a posibilty?
    Thanks so much,
    Angelique

    Hi Angelique!
    I am in something of the same boat as You. I have found this forum to be very informative & the knowledgeable folks here are very generous with their time... but the information is all over the place and lacks the collimated immediacy of a thorough (indexed!) manual. Ditto the very helpful Animate videos & tutorials on the Internet which, while valuable, are often time consumming to track down specific information.
    When learning a new discipline I do best with cogent printed manuals featuring a methodical presentation - which are also a snap to reference. Along these lines two books have caught my eye and I will be ordering... they might be of interest to You:
    Adobe Edge Animate: The Missing Manual by Chris Grover (O'Reilly Media) - Pages: 306
    Print: $24.99; e-Book: $19.99 (both for $27.49)
    http://shop.oreilly.com/product/0636920027553.do
    The Missing Manual series has always proved a provident guide for what ever program I was seeking to learn. This book looks like it follows suit. In the example on-line files I perused Chris struck me as an elegant scripter.
    Learning Adobe Edge Animate by Joseph Labrecque (Packt) - Pages: 368
    Print (eBook included in price) $44.99; eBook only $22.94
    http://www.packtpub.com/learning-to-create-engaging-motion-rich-interactivity-with-adobe-e dge/book
    Joseph pulls a few shifts on Adobe TV's Animate tutorials & is excerpted in the edge_animate_reference.pdf. I like how he writes (and~or has a great editor)... concise explanations.
    These books appear to offer info on a plethora of topics with valuable Javascript examples. Though no doubt there will be considerable overlap of subject matter I think these two books feature enough different material to make both worth purchasing.

  • How to include javascript in Edge?

    I am new to jQuery and Edge.
    I want to add some "Drag" functions to my project and I browsed the forum and found a javascript plugin. So I downloaded the js files and placed them in my project folder (the folder containing .an and .html)
    I searched the forum and found a way to include javascript which is adding the following code in compositonReady event
    $("<script type='text/javascript' charset='utf-8' src='myjs.js'>").appendTo("#Stage");
    and I replaced "myjs.js" with the plugin file name but it seems not working. When I view the html code there is only "MyProject_edgePreload.js" in it. Thanks for guiding me what's wrong here.

    Better tools are available: yepnope() and $.getScript().
    1) About yepnope(): you can download samples file here.
    2) $.getScript() is a jQuery function :  $.getScript("js fileName", function(){ your code });

  • Adding own javascript to edge animate

    I'm having a bit of trouble adding my own javascipt to an edge animate project. I created a website that has javascipt in it. I am trying to recreate it using edge animate because I was interested in using edge animate to take the site up a notch... basically I have a template of what I need the site to do with the existing javascipt I have, but I haven't gotten it to work integrated into edge animated yet.
    I imported all of the images I have from the existing website into edge animate and then relabled all of the instances on the stage to reflect what I have called them in the javascript. I've tried importing my javascript file into the "scripts" section and then just linking to the source in the main html page that edge generates but the javascript doesn't work. Then I've tried putting parts of the script into the CompositionReady panel and onto the button I want clicked directly in the elements.... this works ok, except I have to change the syntax a little (not too much of a pain except when I don't think the edge animate javascript has the same functions).....I'll post below and see if someone can help me get this working either by just linking to the file directly from the html or making the script campatable in edge syntax and posting it in the appropriate element panel. Here is the seperate script from the outside javascript... show I change the syntax and put it directly on the"checkbutton" button in the elements (if so, how?) or should I just link to the file (if so, how come when I put a simple link in the header that it doesn't work: <script type="text/javascript" charset="utf-8" src="js/myscript.js"></script>
    script from myscript.js:
    //sym.$("pic1a").hide(); //edge animate syntax when in animate panels.... does my external js sheet have to keep this syntax?
    var carArrayX = [140,140,330,460,650,765];
    var carArrayXcounter = 0;
    var carArrayY = [ 440,440,405,390,390,390];
    var carArrayYcounter = 0;
    $( '#blueCar' ).addClass( "hidden" );
    var counterBox = 0;
        $('#checkButton').click(function(){
         if (counterBox == 0)
             alert("Please choose an answer");
         else if (counterBox > 1)
             alert("Please choose only one answer");
         else if (counterBox == 1)
             $(this).css('background-image', 'url(button_down.png)');
             $("#pic2a").unbind("click");
             $("#pic2b").unbind("click");
             $("#pic2c").unbind("click");
             $("#pic2d").unbind("click");
             $("#pic2e").unbind("click");
             $("#pic2f").unbind("click");
               if($("#pic2a").hasClass("hidden")){
               $("#words_correct").removeClass("hidden");          
               $( '#pic3a' ).removeClass( "hidden" ); //correct answer
               $( '#pic1a' ).addClass( "hidden" );
               $( '#blueCar' ).removeClass( "hidden" );
               $('#blueCar').animate({
                left:carArrayX[carArrayXcounter] + "px",
                top:carArrayY[carArrayYcounter] + "px"
               carArrayXcounter ++;
               carArrayYcounter ++;
               var cookieXcounter = carArrayXcounter;
               var cookieYcounter = carArrayYcounter;
               //console.log(cookieXcounter);
               //console.log(cookieYcounter);
               $.cookie('mycookieX',cookieXcounter,{expires:7,path:'/'});
               $.cookie('mycookieY',cookieYcounter,{expires:7,path:'/'});
               console.log($.cookie('mycookieX'));
               $( '#pic1b' ).addClass( "hidden" );
               $( '#pic1c' ).addClass( "hidden" );
               $( '#pic1d' ).addClass( "hidden" );
              else if($("#pic2b").hasClass("hidden")){
               $("#words_wrong").removeClass("hidden");
               $( '#pic4b' ).removeClass("hidden");//incorrect answer
               $( '#pic1b' ).addClass( "hidden" );
               $( '#pic1a' ).addClass( "hidden" );
               $( '#pic1c' ).addClass( "hidden" );
               $( '#pic1d' ).addClass( "hidden" );;
              else if($("#pic2c").hasClass("hidden")){
               $("#words_wrong").removeClass("hidden");          
               $( '#pic4c' ).removeClass( "hidden" );//incorrect answer
               $( '#pic1c' ).addClass( "hidden" );
               $( '#pic1a' ).addClass( "hidden" );
               $( '#pic1b' ).addClass( "hidden" );
               $( '#pic1d' ).addClass( "hidden" );;
              else if($("#pic2d").hasClass("hidden")){
               $("#words_wrong").removeClass("hidden");        
               $( '#pic4d' ).removeClass( "hidden" );//incorrect answer
               $( '#pic1d' ).addClass( "hidden" );
               $( '#pic1a' ).addClass( "hidden" );
               $( '#pic1b' ).addClass( "hidden" );
               $( '#pic1c' ).addClass( "hidden" );;
        $('#pic2a').click(function(){
          $( '#pic1a' ).removeClass( "hidden" );
          $( '#pic2a' ).addClass( "hidden" );
          counterBox++;
        $('#pic2b').click(function(){
          $( '#pic1b' ).removeClass( "hidden" );
          $( '#pic2b' ).addClass( "hidden" );
          counterBox++;
        $('#pic2c').click(function(){
          $( '#pic1c' ).removeClass( "hidden" );
          $( '#pic2c' ).addClass( "hidden" );
          counterBox++;
        $('#pic2d').click(function(){
          $( '#pic1d' ).removeClass( "hidden" );
          $( '#pic2d' ).addClass( "hidden" );
          counterBox++;
        $('#pic2e').click(function(){
          $( '#pic1e' ).removeClass( "hidden" );
          $( '#pic2e' ).addClass( "hidden" );
          counterBox++;
        $('#pic2f').click(function(){
          $( '#pic1f' ).removeClass( "hidden" );
          $( '#pic2f' ).addClass( "hidden" );
          counterBox++;
        $('#pic1a').click(function(){
          $( '#pic2a' ).removeClass( "hidden" );
          $( '#pic1a' ).addClass( "hidden" );
          counterBox--;
        $('#pic1b').click(function(){
          $( '#pic2b' ).removeClass( "hidden" );
          $( '#pic1b' ).addClass( "hidden" );
          counterBox--;
        $('#pic1c').click(function(){
          $( '#pic2c' ).removeClass( "hidden" );
          $( '#pic1c' ).addClass( "hidden" );
          counterBox--;
        $('#pic1d').click(function(){
          $( '#pic2d' ).removeClass( "hidden" );
          $( '#pic1d' ).addClass( "hidden" );
          counterBox--;
        $('#pic1e').click(function(){
          $( '#pic2e' ).removeClass( "hidden" );
          $( '#pic1e' ).addClass( "hidden" ); 
          counterBox--;
        $('#pic1f').click(function(){
          $( '#pic2f' ).removeClass( "hidden" );
          $( '#pic1f' ).addClass( "hidden" );
          counterBox--;

    I also had the problem of wanting to use custom javascript that I could call from an Edge Animate Composition.
    The solution I found (from a post by hemanth kumar r https://forums.adobe.com/thread/1479495) was to make variables and functions properties of AdobeEdge.
    So in the external .js document a variable is declared and given a value:
    AdobeEdge.myVariableName = "The variable value";
    To use it in a symbol/element:
    alert(AdobeEdge.myVariableName);
    And a function is declared:
    AdobeEdge.myFunctionName(param){...function code...} //param optional
    To call these in a symbol/element:
    AdobeEdge.myFunctionName(param);
    To test this out I created a button on my stage that called a function in my custom .js file that simply called an alert. Once the function works you can expand it to do anything you want (I used it to go to a new html page).
    Peter Small

  • Targeting Edge from external javascript file

    Is it possible to target adobe edge build from an external Javascript file? For instance, I click a button outside of the edge animate project and javascript tells Edge animate to "play()". What would that syntax be?

    Yes, it is.  Read this post for some background information and a sample.
    http://forums.adobe.com/message/5289458#5289458
    -Elaine

  • What is the difference between Edge Animate CC, Edge Code CC (Preview), and Edge Reflow CC (Preview)?

    Also, what does the (Preview) mean?  Does it mean that a newer version will become available soon?

    Hi All,
    Preview releases means that our team acknowledges the limited functionality of the application. Our goal is to provide community members an opportunity to try out the application and we encourage everyone to provide us with feedback.
    Edge Animate lets web designers create interactive HTML animations for web, digital publishing, rich media advertising and more, reaching both desktop and mobile with ease.
    Edge Animate FAQ
    Edge Reflow allows responsive designs faster and create high-fidelity prototypes through media query breakpoints, precise CSS layouts, grouping and more. Edge Reflow now connects directly to Photoshop CC, allowing you to go from static design to responsive comp in just one-click.
    Edge Reflow FAQ
    Edge Code is a lightweight code editor for web developers and designers working with HTML, CSS, and JavaScript. Edge Code is built to work with browsers, speeding up development time by displaying changes to the code directly on the screen.
    HTML, JavaScript, CSS editor | Download free Adobe Edge Code CC (Preview) trial
    Regards,
    Devendra

  • Java script button only works once?

    I am a novice with JavaScript, but Edge Animate seems like it might be a tool that I can work with. I have created pages using symbols with simple in/out slide animations using  JavaScript.  They are triggered on the buttons with the following code:
    sym.stop(4000);
    var current = sym.getVariable("current");
    if (current != "") {
       sym.getSymbol(current).play("out");
    sym.getSymbol("testimPg").play("in");
    sym.setVariable("current", "testimPg");
    The stage action for compositionready is this;
    sym.setVariable("current", "baseAnim");
    every page works fine except my testimonial page (testimPg)
    The animations work fine for all the other buttons but on the testimonial page it only fire correctly once!?
    If you click on other pages and then go back to the testimonial button, it no longer functions properly —the symbol is no longer visible when the testimonial button is clicked!?
    Can anybody figure out why this is happening.
    here is a link to the page:
    http://whelanartdesign.com/web/WhelartDesign0714v4.html
    Any help would be grateful
    thanks

    Thanks for the reply kglad. I've deleted all the button layers in every scenes and created a button layer from frame 1 until the last frame, but I still got this output here that I don't really understand what it means.

  • Play / stop methods

    Hi,
    I have a basic animation with two bindTimelineAction, one listening on "play" and the other on "stop".
    I was not able to figure why, when my animation starts, I can see that both listeners are called, even if my animation isn't in autoplay mode.
    I have dig into the edge javascript file (edge.1.5.0.js) and find that there is a «this.stop();» in the play method.
    d.extend(a.prototype, n.prototype, {constructor: a,play: function(a) {
                this.notifyObservers("play");
                this.stop();
                this.sort();
                this.playing = !0;
                if (this.context)
                    this.context.playDirection = void 0, this.context.executeTriggers = void 0;
                var b = this.getContext(a);
                b.timeline = this;
    There is a good reason for that I guess, anyone ?
    Thanks.

    Using a package, I set up a public class to hold global variables. Once the variable could be accessed from any MC in the movie, I used AS to write/overwrite an array with the names of the clips currently playing.
    Unlike Javascript, the instance name is not enough to access an MC. You must also have the path from where the AS event occurred (in my case, the main timeline).
    I decided that it would be a waste of time to go through and manually figure out the correct information to put into the array. Just navigating the file to implement the test on the first clip change took more time than I would like to admit.
    Plus, I am still not 100% sure it would have worked correctly. Wouldn't it be horrible to test the button between every clip change?
    Instead of continuing with a programmatic solution, I decided to restructure the file. I believe that it was worth my time. Changes are easier, AS works as Adobe intended, and general organization has been restored.

  • New JS publishing files with 2014.1.1

    Hi all,
    This is more a comment rather than a question.
    I noticed that with newer version of Animate (2014.1.1 I am using), when publishing Animate does not export the core jQuery.js file it used to, and instead now it adds a single Edge.5.0.1.js
    So may I assume that exporting jQuery mobile JS file is no longer needed?
    I found some trouble adapting some already made Edge Animate files to the new situation, as I used to add some other external JS files (like jQueryUI) that rely on jQuery, and now they don't work unless I add jQuery library manually. Is that correct? Is it the best way to proceed now?
    Thanks!

    Yes you are correct in your discovery.
    The 5.0 run time is now an Edge Animate exclusive run time with a small subset of matching, jquery equivalent methods. See the API Adobe Edge Animate CC JavaScript API 'Edge Animate Runtime & jQuery' section for a list. Any methods outside of this list will require a manual add of the jquery .js library.
    hope this helps
    Darrell

  • Why does the new update add a jquery-2.0.3.min.js file?

    So I updated adobe edge and instead of getting improvements I got problems. Whenever I publish my file it ads a jquery-2.0.3.min.js file that is so heavy that now my file is more 60kb.
    My file used to be 17kb.
    How can I change the publish settings so that I only have 3 javascript files=  edge.js, edgeActions.js, and an edgePreload.js
    Which were the original javascript files. It doesn't even publish a preloader anymore.
    What can I do?

    The old runtime used to depend on jQuery, however the new one does not. That's why on upgrade, jQuery is added as a dependency in the upgraded project as it might be used in the scripts. There are two options available:
    1. If you are not really using jQuery, then you can delete jQuery from the scripts section, preview and test the movie and publish. It will not have any jQuery dependency in this case. Please note that the new runtime has the support for basic selectors and some basic jQuery APIs (Adobe Edge Animate CC JavaScript API), if your use of jQuery is limited to these, then also you can get rid of jQuery dependency from the upgraded project.
    2. If you are using jQuery, then you have the option of using jQuery from the CDN. You can remove the local jQuery dependency and add a dependency by specifying a CDN URL for jQuery. We are looking for options to make this flow easier.
    Let us know if you need any other help.
    -Dharmendra

  • Are video navigation points via buttons still unsupported in DPS?

    Are video navigation points via buttons still unsupported in DPS? i'd like a video to play but have buttons to the side the give the user the option to play the video from certain points.

    This guy has done a nice job :-)
    http://chrisgannon.wordpress.com/2012/04/06/greensock-javascript-adobe-edge/

  • How to pass javascript variables into an Edge Animate project from HTML

    I have just about got the basics nailed for Edge Animate now - coming from a Flash background it's been fairly straight forward, nice work so far (but more on that later)
    I have had to build a "promoted items" slider for the homepage on one of our sites....previously this would have been a flash animation but, hey ho .
    I originally built it as a jQuery extension/plugin but found it too time consuming to make minor alterations - that's where Edge came in and SEEMED to fill the job pretty well.
    Now for the moment i'll put on hold the whole issue about how we NEED to be able to work with dom-level elements directly on the page (eg, animating divs and images within a ul-li structure which is how these things usually work) and concentrate on the Edge specific issue...
    I've seen a few people asking this same question, but none of the answers either a) work at all for me , or b) are good enough for what I need to do.
    see previous solutions here http://support.muse.adobe.com/message/4658175 and here : http://forums.adobe.com/thread/1065343
    My project uses an internal array of data, and while in "preview" mode it works reasonably well.
    in the Stage creationComplete event i have Edge code like, for example :
       var imagesArray = ["images/img1.jpg", "images/img2.jpg", "images/img3.jpg"];
       var headlinesArray = ["product 1", "product 2", "product 3"];
       var subTxtArray = ["lovely widgets", "smelly doo-dads", "purple whatchamacallits"];
       var linksArray = ["http://www.adobe.com", "http://www.adobe.co.uk", "http://www.adobe.net"];
       //variables set to full internal scope, used immediately after this and called from sub-elements afterwards
       sym.getComposition().getStage().setVariable("imagesArrayData", imagesArray);
    this code obviously needs to be changed via the HTML page that is calling it.
    IDEALLY i would have these elements already on the page ( <div><h1>Product 1</h1><img src="....  etc ) and then jquery it to hell to make it look funky. This is how we NEED to be doing it in the future...that way our content is still searchable and findable by search bots etc. Edge will output a "static" version of the page, i tried that, but it won't work for dynamically built objects. There's no way i've found of building an array of Symbols based on the existing DOM structure like you can do in jQuery itself.
    however, in the meantime i'll settle for being able to set a javascript call up somewhere - like the old flashvars solution (which was horrible fudge, but worked as a way to get data into a project )
    i'd REALLY rather not use an internal jSon call .... it's adding uneccessary bandwidth and additional server processing when the data it needs has already been retrieved from the database when the HTML page is drawn - AND it means i need to make sure that the json producing web service gets ported accross to any other projects that use this same "slider"
    i've tried removing the internal declaration and changing my HTML to :
    <script>
    var imagesArray = ["images/img1.jpg", "images/img2.jpg", "images/img3.jpg"];
       var headlinesArray = ["product 1", "product 2", "product 3"];
       var subTxtArray = ["lovely widgets", "smelly doo-dads", "purple whatchamacallits"];
       var linksArray = ["http://www.adobe.com", "http://www.adobe.co.uk", "http://www.adobe.net"];
    </script>
    <!--Adobe Edge Runtime-->
         <script type="text/javascript" charset="utf-8" src="index_edgePreload.js"></script>
    etc
    but this hasn't worked.
    i'm going to attempt the solution using
    AdobeEdge.bootstrapCallback(function(compId) { ....
    as found on http://forums.adobe.com/thread/1065343
    but this doesnt explain how to set up Stage level variables, rather than targeting a specific Edge property
    Anyone got any ideas? Or do I just scrap the project?
    IMHO : Adobe need to be careful of falling into the same mindset that most of the anti-flash brigade have.
    Please remember that Flash is used for WAY more than just adverts.
    At the moment, Edge will work great as a way to put a simple animation onto the page with REALLY basic interactivity - suitable for a basic advert - but we need our HTML5 animations and scripts to be fully dynamic, data-driven, and portable, and preferably using existing DOM elements.
    One last thing, any chance of a feature to say "my page already uses jQuery, don't import Edge's own outdated version"
    Message was edited by: j1mp

    I have just about got the basics nailed for Edge Animate now - coming from a Flash background it's been fairly straight forward, nice work so far (but more on that later)
    I have had to build a "promoted items" slider for the homepage on one of our sites....previously this would have been a flash animation but, hey ho .
    I originally built it as a jQuery extension/plugin but found it too time consuming to make minor alterations - that's where Edge came in and SEEMED to fill the job pretty well.
    Now for the moment i'll put on hold the whole issue about how we NEED to be able to work with dom-level elements directly on the page (eg, animating divs and images within a ul-li structure which is how these things usually work) and concentrate on the Edge specific issue...
    I've seen a few people asking this same question, but none of the answers either a) work at all for me , or b) are good enough for what I need to do.
    see previous solutions here http://support.muse.adobe.com/message/4658175 and here : http://forums.adobe.com/thread/1065343
    My project uses an internal array of data, and while in "preview" mode it works reasonably well.
    in the Stage creationComplete event i have Edge code like, for example :
       var imagesArray = ["images/img1.jpg", "images/img2.jpg", "images/img3.jpg"];
       var headlinesArray = ["product 1", "product 2", "product 3"];
       var subTxtArray = ["lovely widgets", "smelly doo-dads", "purple whatchamacallits"];
       var linksArray = ["http://www.adobe.com", "http://www.adobe.co.uk", "http://www.adobe.net"];
       //variables set to full internal scope, used immediately after this and called from sub-elements afterwards
       sym.getComposition().getStage().setVariable("imagesArrayData", imagesArray);
    this code obviously needs to be changed via the HTML page that is calling it.
    IDEALLY i would have these elements already on the page ( <div><h1>Product 1</h1><img src="....  etc ) and then jquery it to hell to make it look funky. This is how we NEED to be doing it in the future...that way our content is still searchable and findable by search bots etc. Edge will output a "static" version of the page, i tried that, but it won't work for dynamically built objects. There's no way i've found of building an array of Symbols based on the existing DOM structure like you can do in jQuery itself.
    however, in the meantime i'll settle for being able to set a javascript call up somewhere - like the old flashvars solution (which was horrible fudge, but worked as a way to get data into a project )
    i'd REALLY rather not use an internal jSon call .... it's adding uneccessary bandwidth and additional server processing when the data it needs has already been retrieved from the database when the HTML page is drawn - AND it means i need to make sure that the json producing web service gets ported accross to any other projects that use this same "slider"
    i've tried removing the internal declaration and changing my HTML to :
    <script>
    var imagesArray = ["images/img1.jpg", "images/img2.jpg", "images/img3.jpg"];
       var headlinesArray = ["product 1", "product 2", "product 3"];
       var subTxtArray = ["lovely widgets", "smelly doo-dads", "purple whatchamacallits"];
       var linksArray = ["http://www.adobe.com", "http://www.adobe.co.uk", "http://www.adobe.net"];
    </script>
    <!--Adobe Edge Runtime-->
         <script type="text/javascript" charset="utf-8" src="index_edgePreload.js"></script>
    etc
    but this hasn't worked.
    i'm going to attempt the solution using
    AdobeEdge.bootstrapCallback(function(compId) { ....
    as found on http://forums.adobe.com/thread/1065343
    but this doesnt explain how to set up Stage level variables, rather than targeting a specific Edge property
    Anyone got any ideas? Or do I just scrap the project?
    IMHO : Adobe need to be careful of falling into the same mindset that most of the anti-flash brigade have.
    Please remember that Flash is used for WAY more than just adverts.
    At the moment, Edge will work great as a way to put a simple animation onto the page with REALLY basic interactivity - suitable for a basic advert - but we need our HTML5 animations and scripts to be fully dynamic, data-driven, and portable, and preferably using existing DOM elements.
    One last thing, any chance of a feature to say "my page already uses jQuery, don't import Edge's own outdated version"
    Message was edited by: j1mp

  • Adobe Edge Animate JavaScript Coding issues/page load time speeds

    To let you have an idea of my skill set I have a background in animation and design and have been taking classes in web development. My question is about how to create an interactive website that loads various animation depending on the user's choice and current place within the Adobe Edge Animate timeline. The website I developed for a client @ www.goshowpro.com works but loads slower than I want and doesn't format properly on my client's Macbook (I believe he needs to update his browsers but that is something else.)
    So as you can see from looking at my website I used a multitude of HTML files to create my vision of an interactive website based off of a theatrical stage. I know this is not an ideal method. I would prefer to have it all on one page but I am having trouble with my javascript coding. I was wondering if there would be away to expedite my current site's load time and if not if you could look at my NEW coding. (This IS NOT the current coding on the site.)
    if = "hstop" "chomstop" "shomstop" "phomstop"
    {sym.play("hporstart")};
    else = "hconstop" "sconstop" "pconstop"
    {sym.play("cporstart")};
    else = "hserstop" "cserstop" "pserstop"
    {sym.play("sporstart")};
    It looks crappy but I'm trying to learn so don't laugh too much. Thanks again.
    Michael

    Hi, Marlene-
    We currently bundle jQuery 1.7.1 with the Animate runtime.  In order to call fadeOut() on the element newSquare, you would do the following:
    sym.$("newSquare").fadeOut();
    OR
    sym.getSymbol("newSquare").getSymbolElement().fadeOut();
    Hope that helps!
    -Elaine

  • Need help with adjusting Javascript code to work in Adobe Edge (Countdown)

    Hello
    Im a newbie when it comes to working with Javascript and Adobe Edge and need a bit of help with adjusting some javascript code to work with Adobe Edge. A friend of mine helped me with making this javascript code: Edit fiddle - JSFiddle
    Its a simple countdown which counts down to a certain time at a certain date. What I aim to do is to add this code as a trigger on a text-element called "countdown" (within a symbol called "count").
    I have tried to do this as the code is, but it does not work. Anyone have any suggestions?
    Thanks!
    Mvh,
    Øyvind Hermans

    Hello again
    I have stumbled upon a problem with these animations; They crash the browser after viewing them a little while, usually less than 30 seconds in.
    Is this problem also occuring when you watch the animations?
    Is the countdown-code to much for the browsers to handle?
    Thanks in advance for your answers.
    Sincerely,
    Øyvind Hermans

  • Playing a symbol timeline in Edge from Javascript function in an exteranl web page

    All-
    I have a javascript function in an external web page.  i want to use this function to call a symbol timeline inside an edge file.
    i've read about bootstrapping but i'm unsure how to use it in my project
    any ideas?
    Z

    Hi again Elaine,
    I actually had some success after many attempts with using your code. I can control the .stop() and .play() of the "NamePlate_sym" symbol. Yet, I am still having trouble doing anything else with it. I cannot .hide() it, nor use .html("Change text") on another element on the stage called"Rectangle". If I can accomplish that and all a global function on the stage, I'm in good shape.
    I placed the following script in the header of the .html file that gets loaded into the iFrame within the Edge composition:
      <script type="text/javascript">
       window.parent.AdobeEdge.bootstrapCallback(function(compId) {
       comp = window.parent.AdobeEdge.getComposition(compId).getStage();
       alert("CompID is "+compId);
       var symbol = document.createElement('div');
       symbol.innerHTML = 'Rotate';
       symbol.style.cssText = 'background-color:#fea; width: 50px; text-align: center;';
       symbol.style.cursor = 'pointer';
       symbol.onclick = function() {
        if (comp.getSymbol("NamePlate_sym").isPlaying()) {
         comp.getSymbol("NamePlate_sym").stop();
        else {
         comp.getSymbol("NamePlate_sym").play();
       window.parent.document.body.appendChild(symbol);
            </script>
    Once I put window.parent. in the first two lines of code and the last, my test worked. As I mentioned earlier though, I still can't get the syntax correct to .hide() an element (i.e. comp.getSymbol("NamePlate_sym").hide(); does not work), or more importantly, change the innerHTML value of an element on the stage. The code either does nothing or freezes.
    Thanks... Tommy

Maybe you are looking for

  • Transaction Data Estimates

    This may come off as a very generic request, but can anyone point me in the direction of somewhere to research the amount of transactional data created by Enterprises (across any/all industries)?  I am looking for information that helps to breakdown

  • Delete folder in a particular scenario using batch file

    How to achieve this using a batch file? The batch file should check if inside this folder "c:\test\", a directory named "temp1" only is present. If so then delete the folder test, but if the folder test contains more directories and files other than

  • AE CS4 crashes on startup (Mac OSX 10.5.5)

    After Effects CS4 refuses to start on my Macbook Pro (osx 10.5.5 with 4gb ram). It gets as far as 'Initializing MediaCore' on the splash-screen then crashes. Interestingly After Effects CS3 works perfectly. Premier CS4 does the same as well as Encore

  • Where to download the JAVA component for BS2005 and SAP XI ?

    Dear all,    When I install the ECC6 in Linux, system reminder me that the JAVA package is not correct. I wonder where to get the right JAVA component for BS2005? Btw, where to download the SAP XI Component for installation? Tks. Regards Jialin

  • Risk analysis failed in CUP

    Hi, We have same connector name in CUP and RAR but risk analysis failed and throws error "Risk analysis failed: ExceptionRisk Analysis failed" have a look on detailed log as follows. 2012-01-03 17:54:54,044 [SAPEngine_Application_Thread[impl:3]_7] ER