PDA

View Full Version : dynamic text being truncated


oatesj77
12-21-05, 10:03 PM
i have a swf that pulls data from a mysql database via php. i have been able to assign the data to individual dynamic text boxes, but when i cycle through the data, some of it comes up truncated, like the text box is only allowing a limited number of characters. i've gone back and looked at my database to see that the data isn't clipped, or any extra ampersands, and run a test in php to see how the data is output, and it all seems fine.

what bugs me is that for example, record 1 has a caption, if i copy that caption to record 2, and cycle through in my swf, it's fine for record 1, but not for record 2, but will work inrecord 3.

i'm working locally, so can't post it yet.

anyone have any ideas?

thanks

YvetteKuhns
12-22-05, 12:18 PM
what bugs me is that for example, record 1 has a caption, if i copy that caption to record 2, and cycle through in my swf, it's fine for record 1, but not for record 2, but will work inrecord 3.

Why would a caption work in record 1 and record 3 but not in record 2. You copied the same caption, so it isn't the text (or characters) or the text size that is causing the trouble. The database is okay, so look at the php or the swf.

Not enough info here to give more help. Sorry.

oatesj77
12-22-05, 04:21 PM
thanks yvette,
i did a string output in php to see what actually gets passed to the swf when it is called. there are no special characters in the data, and some of the text was cutting off the end of a word, so i don't see anything that cause it. my first two fields in the database are set to int, and varchar, but everything else is longtext, and i can see all the data through phpmyadmin, that's why this is so frusterating. oh well, it's christmas and i'll deal with it later, probably something simple.

thanks

oatesj77
12-26-05, 09:23 PM
okay, so the holidays are over, and i've still got the same problem; i finally put it online so you can see what i'm talking about; test swf (http://www.mccormick.stylepoints.net/test4.swf)
click on either of the "people" buttons, that will load a list of numbers (1+, 2+...) that correspond to the items in the database. items 1 and 2 have the same info for their captions, but when you click on 1+, then on 2+ you will see that the text gets truncated, funny thing is that 1+ and 2+ get truncated at different points, here is a screenshot of my database: screenshot (http://mccormick.stylepoints.net/database.jpg) (the 15 for the first ID has been changed to 0) you can see that the two have the same info in the caption column.

i was thinking it might be a problem with how the php page formats the data to be passed to flash, so i swapped in a $_get for so you can see what the page sends flash; formatted output (http://mccormick.stylepoints.net/sql-output.php?thisLetter=a)

each section starts with "&" and ends with "&", but i do not see any breaks or probelms with the text, especially where the copy is being cut.

it's all kinda rough now, working on the data part before the beautification part,
anyway if anyone is fealing up to it, take a look and let me know if you have any ideas.

i can post the action script if it will help, but i've looked through and the only thing that might be a problem is i use unescape/escape to remove any problems with special characters.

thanks

YvetteKuhns
1-5-06, 11:44 AM
Hey, I didn't hear anything new from you and I was kinda busy. I found your post again and thought I would ask if you solved your problem.

each section starts with "&" and ends with "&", but i do not see any breaks or probelms with the text, especially where the copy is being cut.

the only thing that might be a problem is i use unescape/escape to remove any problems with special characters.

It is possible that there are characters you don't see or know is there. Try deleting the caption for the one being truncated. Then add a simple one. Edit it to the original caption and be careful when you type it. Do NOT copy and paste it! It is possible that there was a carriage return or some strange invisible character in there that your code could not handle.

oatesj77
1-5-06, 07:26 PM
Yvette,
Didn't solve the problem, but at least identified a part of it. It looks like i can only send a certain number of characters to the swf. I started with a large caption and slowly removed bits, testing the swf between. looks like only about 70 characters can come through, though when i added a space, it removed more than one character from the other boxes.

If i find a solution elsewhere, i'll post back to let people know.

YvetteKuhns
1-5-06, 08:05 PM
http://www.actionscripts.org/tutorials/beginner/html_forms/index2.shtml
POST is preferable as it does not show the variables anywhere. POST is also preferable if you're passing more than a few hundred characters, as GET has a character limit.

oatesj77
1-5-06, 08:15 PM
yep, i just had that set up so i could quickly show what the sql output actually looks like. on the page i actually refrence i use POST, and this is just up on my server for testing.

thanks

oatesj77
1-20-06, 05:18 AM
never did figure this one out, but the client decided he didn't want captions, so out of sight, out of mind, though if anyone has any ideas i'de still like to know.