Can you share the composition (zip and upload and share the link) please?
I must be more precise: The problem only occurs when i have a symbol with a very long timeline on the symbol / stage of which i want to get the duration.
Here is my test:
There is an alert with the wrong duration called from the element "DurationCaller". If you place an empty trigger on the stage timeline, the alert gives the correct duration. The reason seems to be the element TestSymbol which has a very long inner timeline.
You are getting 170454.41228624 which is correct, that many milliseconds is the duration of the stage symbol.
In the symbol "DurationCaller", you have the code :
var duration = sym.getParentSymbol().getDuration();
so sym.getParentSymbol() is referring to the stage symbol which has timeline length of 2min 50.4sec which is 170454 milliseconds.
Sorry, i do not understand your answer.
1) To me, stage timeline has a length of 5000 ms. But on the stage is a Symbol that itself has a timeline of 2min 50.4sec, to my understanding this should not extend the stages timeline length.
2) Nevertheless, placing a trigger ( like sym.stop() or even empty ) on the stage should not alter the value of the alert, but it does.
without a trigger i get 170454.41228624, with a trigger set on first frame i get 5000.
As the symbol is an element in the stage, it will add to the Stage timeline as well.
And sym.getParentSymbol().getDuration(); inside the symbol "DurationCaller" will always be 170454.
Also, sym.getDuration(); on stage as trigger will always be 170454.
Would like to upgrade your Edge animate with the patch released now, and then try things out.
The patch (EA 2014.1.1) with the fix is live now.
Please upgarde your Edge Animate to 2014.1.1
Edge Animate Team
Ok, now getDuration() gives a consistent value. ( Well, not the one i would have expected, but OK thats life :-)
Comming from Flash, it feels strange that the timeline of a symbol is extended by the longer timeline of a child symbol. However, know i understand.