Jump to content

[SOLVED] Problem whith Flash


photo

Recommended Posts

Posted

Hello!

I can not understand how the Flash function substr(), substring() in Unigine.

 

/ / / / / / / / / / / / / Example / / / / / / / / / / / / / / / / /

var str: String = '1234567890 ';

trace (str.substr (1, 4));

 

/ / Works to swf

2345

 

/ / In Unigine does not work:

FlashVariable :: getObjectSafe (): can't run "substr" function, object is NULL

FlashInterpreter :: runActions (): can't convert string to object

indefined

 

Thank you.

Posted

Please use the following syntax:

var str: String = new String('1234567890 ');
trace (str.substr (1, 4));

×
×
  • Create New...