0 Replies Latest reply on Sep 6, 2015 6:59 AM by whyme777x

    Can I affect HTML text on the Stage level from inside a Symbol animation?

    whyme777x Level 1

      Okay, so I got score counter working on my Stage timeline. The text element that displays the score is "txt_score" and in the Stage's compositionReady I put...

         sym.score = 360;

         sym.txt_score = sym.$("txt_score");


      And I managed to make buttons that add or subtract the score. In each element's click I put...

         sym.score += 7;


      And that all seems to work fine.

      Buuut, now I've created Symbol animations, inside which I need to affect the "txt_score" that is on the Stage.

      Unfortunately, just that bit of code didn't seem to work on the buttons inside the Symbol (let's call it "branch1" for the sake of the question).

      So, what would I add to the click of a button inside "branch1" so that it would affect the "txt_score" on the Stage?

      After note, also tried and failed...

         sym.getStage().getVariable(score += 7);



      Can you tell I have no clue? XD Please assist <3


      EDIT: I used the url below to cobble this small bit together

      Tutorial: Building A Game In Edge Animate (Offender)

      And I did about 3 days worth of googling before I left this question here :\


      EDIT again: I found Targeting a nested symbol's timeline? but I think... my question is sorta the opposite? Or would the mechanics be the same? Either way what I gleamed from this still didn't work


      EDIT again x2: Now I found Targeting the stage from within a nested symbol which seems to be exactly what I'm looking for So I developed this...

         sym.getComposition().getStage().txt_score.html(sym.score +=7);

      Except now it makes the score disappear. The bounding box is plenty larger than the text, so it's not like the value became to large for the box (not that 367 is that much wider than 360 anyway). Assist? ^^;