You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, July 29th 2016, 8:53am

subtxt doesnt work on flash (1.19pr5)

hi klaus,

i just wanna inform you that subtxt doesn't work on flash.
this simple example works correctly in html5, but output an empty string in flash.

Source code

1
2
3
4
		set(a,"hello");
		trace(a);
		subtxt(a,a,2);
		trace(a);

2

Friday, July 29th 2016, 10:41am

Hi,

thanks for the note!

Sorry, I've missed that - the reason is that the underlying substr function has different default values for the length parameter in JS and AS3.

In JS the length parameter is optional/undefined by default:
https://developer.mozilla.org/en/docs/We…s/String/substr

and in AS3 (Flash) it's a large number by default (using there undefined as length parameter causes that problem):
http://help.adobe.com/en_EN/FlashPlatfor…g.html#substr()

That will be fixed in the next release.

Best regards,
Klaus

3

Friday, July 29th 2016, 3:22pm

easy, i just return infos to you, thats good for both :)

looking forward for the next release,
specially bc of the keyboard fix for macosx