![]() |
|
#1
|
|||
|
|||
|
Title pretty much says it all... have a delimited .txt file and would like to dynamically load the text fields from it... should be simple enouph... no? Anybody done this before?
|
|
#2
|
|||
|
|||
|
Hey Panorado:
Hmmm -- dynamically load the text into what? How is it delimited? Sounds like something needing to have an XML format wrapped around it...
__________________
Patrick http://cheathamlane.net -- Tutorials: Embed Pano 101, Pano auto-presentation |
|
#3
|
|||
|
|||
|
"dynamically load the text into what?"
Strait onto the screen of the Pano Window. For Example... If I have thumbnails of the next tour, I would like to have 'text' labels ontop of them that comes from the .txt file. "How is it delimited?" Well, could be anything... commas... whatever but I use '&' because that's what works with SwishMax File is pretty simple... just regular old .txt Smith,Brown,702-111-1111,sb@yahoo.com like that. Actually... I prefer not to use .xml I love .xml but the database I use (Alpha 5) does not have a good .xml exporter. The file would have to be 'loaded' separately from the .xml I think... with a 'plugin' maybe... OR... if the pano .xml could support dynamically loaded text at hotspots that would be great! I guess I could write a little program to swap in out my .txt data in the .xml file. Oh man... I have to learn PHP and MySQL... enough with this local stuff... everthing is dynamic online these days! |
|
#4
|
|||
|
|||
|
Hi
I have been asked by a client if it is possible to dynamically load text from a database. The idea is to have all hotspots show different text taken from the database. Is this possible. If so could I see a sample and the code? Many thanks |
|
#5
|
||||
|
||||
|
Panorado,
with the help of Trevor White, I have been testing a couple of solutions for providing a text box in FPP. I can't say I've come all the way yet, but at least they are working. First, there is a plain text box plugin. The text in this box can be provided in two ways:
Both are handled with the same textbox.swf plugin, but if you want to use option 2 you also have to load the texts.swf plugin which handles the text collection file. Of course you can set options as font, size, color, bgcolor, border and a few other things. Secondly, I wrote a HTML plugin, htmlbox.swf, which can show a box containing the (pretty limited) HTML supported by the Adobe textField component. Here you also have two choices when providing the box content:
I have some test pages here: simple text box, texts loaded from file and a HTML box Zip files (with plugin and documentation): textbox.swf, texts.swf, htmlbox.swf XML files: simple text box, texts loaded from file, HTML box Text file HTML file Any form of constructive critizism would be received gratefully! Regards, Tommy Last edited by allSaints; 12-07-2008 at 12:08 PM. |
|
#6
|
||||
|
||||
|
Hey allSaints,
wow, this really looks very promising! Thanks so much for sharing! Unfortunately, I don't have the time to give it a try and investigate all of its possibilities, but I surely will as soon as I have a chance to do so... Thanks again! Philipp |
|
#7
|
||||
|
||||
|
aS,
just GREAT GREAT GREAT! Thanks for sharing too!!! Igor |
|
#8
|
|||
|
|||
|
Hi Tommy,
first of all thanks for sharing. I am asking you, is possible use <box> instead of <spot>? If yes please can make basic example. Thanks for interest. Bruno Napoli |
|
#9
|
||||
|
||||
|
@allSaints: I gave it a short go now and want to thank you again! It's really simple and straight forward.
The only problem I've realised is: If one uses either a comma (",") or a semicolon (";") in the texts, the text cuts up at the very position the character is used. Is there a way to have it also parse commas? Also, it simply does not parse special characters like the German umlauts ("ä,ö,ü,ß") for example, although I tried setting "utf-8". EDIT: Setting "charSet=iso-8859-1", "ä,ö,ü and ß" are parsed perfectly :-) But I still could find no solution for commas and semicolons... And I have a second suggestion/question: Could it be possible to use percentage values instead of absolute pixel values for width and height? This would be awesome for fluid design panos like in lightboxes and so on where you don't know the pano's dimensions... Again, thanks a lot for sharing! Philipp Last edited by phberlin; 12-08-2008 at 04:16 PM. |
|
#10
|
||||
|
||||
|
Thank you guys for your being so quick to respond!
Some bugs that you can't find yourself always sneak into the code, so I might as well let you find them. ![]() Philipp: The texts from the text file always pass thru FPP, so that's why the comma and semicolon characters acts as delimiters. I should have thought of that! Well, it's fixed now - new zip files are uploaded. Regarding the "åäöü" problem - I noticed your EDIT - fine, because I couldn't find any problems myself. Here is a link to a test page with utf-8 characters. I'm not sure how you imagine setting width and height with a percentage. Maybe it's possible to get a resize event to wake up the plugin, get the pano size and resize the text box accordingly, but that would not change the size of the text font. Please tell me if I misunderstood your suggestion. Bruno: A <box> works just as well with the plugin. Here is a test page. I included the "editor.swf" plugin so you can play with the settings. Just choose the "mytext" object in the editor. Regards, Tommy |
![]() |
| Thread Tools | |
| Display Modes | |
|
|