Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 80307

Re: Edge id's consist of the element name prefixed with Stage_. Why is this not documented?

$
0
0

Thank you for your response but it doesn't explain why it would be bad advice. If one is not interested in accessing an symbol's timeline, why can't the id be used?

 

The ability to use an element's id is powerful jquery programming functionality. For example, when working with an external javascript file, I don't have to worry about "sym" which represents the stage. I can just access an elements properties using its id.

 

I have a large project that has units with slightly different appearance but the code is the same. By using one external javascript file, code can be reused between these units. It makes the whole project much easier to maintain, build and understand.

 

For external javascript files, how would you use your answer to set the html of the “text” element within a symbol except by bootstrapping the stage or passing "sym" as a variable which makes the whole process much more complicated.


                                                       External javascript file:

Bootstrap:

AdobeEdge.bootstrapCallback(function(compId){

    mySymBoot = AdobeEdge.getComposition('symbols').getStage();

    function test(){

                mySymBoot.getSymbol("mySymbol").$("text").html('new world');

       }

});

 

passing sym:

function test(mySym){

    mySym.getSymbol("mySymbol").$("text").html('new world');

}

 

using the id:

function test(){

    $("#Stage_mySymbol_text").html('new world');

}

I would like to make sure that using Edge "Stage_" id's in programming is sanctioned by the Adobe Developers. I would hate to invest in it only to find an update to the software makes the concept obsolete.


Viewing all articles
Browse latest Browse all 80307

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>