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

Tuesday, June 26th 2012, 4:52pm

Extended textfield plugin

I have added an extended version of the default textfield.swf plugin to the fov_plugins package. Some highlights include:
  • fontsize scaling
  • editable text
  • autowidth (& autosize enhancements)
  • better control over glows and shadows

The full documentation of the added functionality can be found here:
http://fieldofview.github.com/krpano_fov…dex/plugin.html

The textfieldex.swf file and its sources are available as part of the krpano_fovplugins package on github.

Enjoy

This post has been edited 3 times, last edit by "ahoeben" (Jun 26th 2012, 5:48pm)


Tuur

Sage

Posts: 3,164

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Tuesday, June 26th 2012, 5:09pm

great Master!!!
i curious.. will test!

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

3

Tuesday, June 26th 2012, 6:24pm

That's awesome!!!
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

4

Tuesday, June 26th 2012, 6:31pm

I noticed something weird.. the input doesn't like open bracket and close bracket looks like a different character
[ ]
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

5

Tuesday, June 26th 2012, 7:05pm

I will look in to that. From the top of my head, I would say this has something to do with how you use [ instead of < and ] instead of > in code. But it might be something entirely different.

Update: Yes, it was the [] to <> conversion. I have fixed/worked around it. Download the plugin again if you downloaded it before.
In the long run, I will implement something so it is possible to use actual [ and ] characters in the text.

This post has been edited 2 times, last edit by "ahoeben" (Jun 26th 2012, 10:26pm)


Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

6

Tuesday, June 26th 2012, 10:36pm

K I'll give it a whirl. I was trying to test out the parameters of your plugin using itself and set commands. I think I will find many many uses for this! Again thanks!
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Tuur

Sage

Posts: 3,164

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

7

Wednesday, June 27th 2012, 2:23pm

hi, i made a small test.

Nice plugin Aldo!

can you give an example code how to use the following 'tags':

text /editable/ password

http://virtualtuur.com/krpano/textfieldex/


i also was wondering about mulriline.
When false it is not possible to make an extra space at the top.
Wouldn't it be nice to have also a autosizetopmargin?

Cheers
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

8

Wednesday, June 27th 2012, 5:42pm

The "editable" property is not all that useful without being able to do something with the text. Ie: you really need a way to send it to a server. The "password" property could be used to enter a password, which is then used to log in to something. Multiline="false" is also particularly useful for filling in (login-)forms.

One way to make use of editable text is in the console.xml example contained in the download.

Tuur

Sage

Posts: 3,164

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

9

Wednesday, June 27th 2012, 6:52pm

ok thanx but


i was wondering about multiline.
When false it is not possible to make an extra space at the top.
Wouldn't it be nice to have also a autosizetopmargin?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

10

Wednesday, June 27th 2012, 8:57pm

I'm sorry, I fail to see what a lack of a general margin has to do with the multiline property. Is the "amount of background-space above the text" different when multiline is false? Adding a margin all around the text could be an interesting thing to add (though sofar I have not needed it myself).

Tuur

Sage

Posts: 3,164

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

11

Wednesday, June 27th 2012, 9:17pm

Ok,

when i set multiline to false it is not possible to use <br /> before the firts text line, so i can't make a top margin..
When is set it to true. It is possible but then the autosize features don't go..
here is the exact same with multiline true.
http://virtualtuur.com/krpano/textfieldex_2/


i also tried to change the font family onover and onout.
when i do onover:

Source code

1
set(css, p{font-family:Times New Roman, Times, serif;font-size:30px;color:#336699;});

nothing works. http://virtualtuur.com/krpano/textfieldex/

when i do:

Source code

1
set(css, p{color:#336699;font-size:30px;});set(css, p{font-family:Times New Roman, Times, serif;});


color and size change but the family not..
http://virtualtuur.com/krpano/textfieldex_2/



Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 3 times, last edit by "Tuur" (Jun 27th 2012, 10:34pm)


12

Thursday, June 28th 2012, 9:51am

I see. That's a rather unsatisfying way of adding a margin...
I may have to rethink the whole margin idea (come to think of it, it should be padding...). But the current version does what I need it to do, so I will not make promises.

I don't know why the setting of the font-family is not working. If anything, it is a flash player bug, not a bug in the textfieldex plugin. I don't think its working with the standard textfield plugin either, or is it?

Tuur

Sage

Posts: 3,164

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

13

Thursday, June 28th 2012, 11:10am

Ok,
clear.

I hope you consider and will make 'just' an autosizetopmargin="20px" -ish option.
That would be most satisfying ;-)

well it's a great add anyway, but i think to make it complete, the above would be a nice add .

Cheers
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

14

Thursday, June 28th 2012, 5:08pm

I noticed some other strangeness..

krpano.call("set(plugin[commandline].css,'p{color:#FFFFFF;font-size:40px}');");
I was just playing with it.. and then it seems to stop working or working erratically.

krpano.call("set(plugin[commandline].html,'[p]hello[/p]}');");

krpano.call("set(plugin[commandline].css,'p{color:#FFFFFF;font-size:40px}');");
krpano.call("set(plugin[commandline].css,'p{color:#FFFFFF;font-size:39px}');");
krpano.call("set(plugin[commandline].css,'p{color:#FFFFFF;font-size:38px}');");
krpano.call("set(plugin[commandline].css,'p{font-size:48px}');");

It doesn't like to change or has a max px height.
I'm using your example.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

15

Thursday, June 28th 2012, 6:37pm

What's with all the krpano.call()? Are you running this in a compiled as3 swf, or are you using the console example? If you are doing the latter, the krpano.call bit does not mean anything.

Why would you want to repeatedly set the fontsize of the textfield through css? Not that I mind you playing with my version of the textfield, but the css property handling has not changed from the original textfield, so this is probably a bug/limitation in the underlying AS3 textfield class.

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

16

Thursday, June 28th 2012, 6:55pm

No, I find it easier to use the javascript console to test things out. I was using your plugin, but its easier to use the console because it has history. UP arrow, change a few characters and done.

I was comparing both the original and your textfield.
The original textfield seems to work fine. Albeit, it requires a viewchange to see the change. font color is working fine.. but size is not.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

17

Monday, July 16th 2012, 8:35pm

What's with all the krpano.call()? Are you running this in a compiled as3 swf, or are you using the console example? If you are doing the latter, the krpano.call bit does not mean anything.

Why would you want to repeatedly set the fontsize of the textfield through css? Not that I mind you playing with my version of the textfield, but the css property handling has not changed from the original textfield, so this is probably a bug/limitation in the underlying AS3 textfield class.


Looks like this is indeed a bug in the original textfield. I found the stock version also acts weird if you select some text and then change the css font-size. Some sizes simply fail.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

18

Tuesday, July 17th 2012, 12:09pm


Looks like this is indeed a bug in the original textfield. I found the stock version also acts weird if you select some text and then change the css font-size. Some sizes simply fail.


I would bet its actually a bug in the Flash Player/AS3 Textfield class ;-). Thanks for letting me know though.

19

Saturday, September 1st 2012, 11:45am

Hi Sacha,

great addition to the FOV-Plugins *thumbsup* One question though...

How do I get the typed in text and save it to a variable? I need to add an editable textfield where the user can type in a number between 0 and 100 and save this number to a var for further use.

Thanks a lot in advance and for the plugins!
Nupsi

EDIT: Got it! Awesome plugin, Sacha *thumbsup*
set(txtvar1,get(plugin[txt1].text));

This post has been edited 1 times, last edit by "Nupsi" (Sep 1st 2012, 1:13pm)


20

Saturday, September 1st 2012, 1:03pm

You can try onsubmit="copy(yourvar, text)" or onchange="copy(yourvar, text)"

Similar threads