1 Reply Latest reply on Apr 22, 2014 10:30 PM by Sudeshnasarkar27

    Actionscript 3 usage in Edge Animate

    stevegershen Level 1

      Ok so our company has been using flash for the past 10 years. This year I have mentioned about Adobe Edge and what the capabilities are.  Amazed to say the least.  I did download the 30 day trial for edge trying to do the same things I had done in flash/AS3.  I have stubbled on a issue that I cant seem to get right.  Works in flash AS3 But I cant figure out if it works in edge. only because its new to me. 

       

      I have exsisting actionscript 3: below

      pbjack.text =  formatAsDollars(Number(root.loaderInfo.parameters.winner_amount)/1000000, 0);

       

      Breakdown:

      pbjack = Instance name (dynamic text field)

      root.loaderInfo.parameters.winner_amount = a paramater name in xml stored on computer



       

      above is the actionscript code that pulls in the value based on the paramater name "winner_amount"

      I am trying to get the same information in Adobe Edge using the same code to pull in the same value.  I have been searching videos that show you can use actionscript but its not working for me.

      Can someone assit me on how to translate the flash AScode above to Adobe edge output (html5)

       

      Before we make this transition to adobe edge I have to test everything that is currently out there in production & this is the only piece that I am stumped on.

       

       

      thank you in advance

        • 1. Re: Actionscript 3 usage in Edge Animate
          Sudeshnasarkar27 Adobe Employee

          Hi ,

           

          Since pbjack is the same of the text field , you can set the value of the text using this snippet in Edge Animate :

           

          var newText = sym.getVariable("winner_amount");

          sym.$("pbjack ").html(newText);

           

          This winner_amount variable needs to be set at stage composition ready function as :

           

          sym.setVariable("winner_amount" , "");

          You need to set this variable depending on the value you get from the xml.(However, not sure from where you are accessing this value)

           

          Later when you get the value you store it in this variable and then retrive it from the same variable using getVarible.

           

          Attached a sample for reference.

           

          Let me know if you need any other info.

           

          Thanks and Regards,

          Sudeshna Sarkar

          1 person found this helpful