Sie sind nicht angemeldet.

1

Dienstag, 26. Juni 2012, 16:52

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

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »ahoeben« (26. Juni 2012, 17:48)


Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

2

Dienstag, 26. Juni 2012, 17:09

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

Tuur *thumbsup*

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

3

Dienstag, 26. Juni 2012, 18:24

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

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

4

Dienstag, 26. Juni 2012, 18:31

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

Dienstag, 26. Juni 2012, 19:05

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.

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »ahoeben« (26. Juni 2012, 22:26)


Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

6

Dienstag, 26. Juni 2012, 22:36

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

7

Mittwoch, 27. Juni 2012, 14:23

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*

8

Mittwoch, 27. Juni 2012, 17:42

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

9

Mittwoch, 27. Juni 2012, 18:52

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*

10

Mittwoch, 27. Juni 2012, 20:57

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

11

Mittwoch, 27. Juni 2012, 21:17

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:

Quellcode

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:

Quellcode

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*

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »Tuur« (27. Juni 2012, 22:34)


12

Donnerstag, 28. Juni 2012, 09:51

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

13

Donnerstag, 28. Juni 2012, 11:10

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*

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

14

Donnerstag, 28. Juni 2012, 17:08

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

Donnerstag, 28. Juni 2012, 18:37

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.

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

16

Donnerstag, 28. Juni 2012, 18:55

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

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

17

Montag, 16. Juli 2012, 20:35

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

Dienstag, 17. Juli 2012, 12:09


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

Samstag, 1. September 2012, 11:45

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));

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Nupsi« (1. September 2012, 13:13)


20

Samstag, 1. September 2012, 13:03

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

Ähnliche Themen