0 Replies Latest reply on Nov 23, 2008 8:30 AM by Vmlweb

    Converting script

    Vmlweb
      Hi,

      I am trying to convert a piece of script from GML to Action-script
      Can someone please help me


      How it works:
      Global.******** = Variable
      get_string("***","***") = input string
      string_length(str) = Returns the number of characters in the string.
      name_list = array (GML defines it automatically)
      string_char_at(str,index) = Returns the character in str at position index.
      ord(str) = Returns the asci code of the first character in str.
      for = foor-loop (I reckon its the same in action-script)


      global.Regoutput=0
      global.Reginput_name=get_string("Name","")

      for (i=0; i<=string_length(global.Reginput_name); i+=1){
      name_list =string_char_at(global.Reginput_name,i)
      }

      for (i=0; i<=string_length(global.Reginput_name); i+=1){
      global.Regoutput=global.Regoutput*128+ord(name_list
      )
      }


      Any help would be great.

      Thanks
      Victor