;

PDA

Click to See Complete Forum and Search --> : Dynamic Text is misbehaving - help!


Dr_John
04-04-2006, 07:34 PM
Hi - I'm adding a dynamic text field, place text in it and all is well.
When I add a second one, place different text in it all is not well.
Say I convert the second dyn text into a button, go to the states and make small (color only) adjustments. On mouse over it displays different text then on relese.
Can someone take a look and tell me if I'm doing something wrong or if it is .... dare I say it ... a bug?

Chris_Seahorn
04-04-2006, 08:46 PM
Post your FUN file Doc. Let's see what's the culprit.

blanius
04-04-2006, 10:33 PM
I can't seem to repeat the error. Wierd I had to figure out how to convert a editbox to a button first. Never done that before.

Post source Please Also what version of KM are you using check your About page to verify As I recall there was a problem with Dynamic text in an earlier version.

Dr_John
04-05-2006, 08:14 PM
The buttons are just simple squares with dyn text for a label. (otherwise the writing is not crisp enough).
When I convert the square and dynamic text to a button all is well but as soon as I go to the button states and change the color arrangement, all hell brakes loose.
See buttons one and two for an example.

Can this be fixed and if not, can swishmax do this? I really need to get this done today and don't have time to mess around any longer.

Thanks guys :)

Chris_Seahorn
04-05-2006, 08:25 PM
Getting a dead link Doc. Attach your FUN file using the "Manage Attachments" button below the submit button to browse for your local file. Bret had Flashkit add the FUN extension.

http://sandbox.blogdns.com/examples/Attachinforum.jpg

Dr_John
04-05-2006, 08:30 PM
Thanks Chris for pointing that out! :-)

Chris_Seahorn
04-05-2006, 08:31 PM
Alright Doc, you either don't particularly like me or would rather someone else help because no file is attached. Good luck to you in your project.

Dr_John
04-05-2006, 09:00 PM
noooooooooooooooooo I love everybody

did I do soemthing wrong?? I can download the file from the post. Please try again and let me know if .... you know :)


uuuups, I just saw that ... I attached the file in the post way above!

Dr_John
04-05-2006, 09:17 PM
never mind, my girlfriend figured it out. I am not impressed with KM (maybe tomorrow is a better day)

blanius
04-05-2006, 10:36 PM
Looks like a bug to me. Apparently copy and pasting a dynamic text in a button state doesn't work right. Also it seems to be an issue of the text box names being the same.

blanius
04-05-2006, 10:40 PM
Can this be fixed and if not, can swishmax do this? I really need to get this done today and don't have time to mess around any longer.

Wow not in a hurry are we? If you really must have it today don't use dynamic text. (the sharpness issues is a problem on all flash programs as far as I know)

Or don't use buttons. I almost never do. Make a button library item with a movie clip.

Dr_John
04-05-2006, 10:52 PM
Bret,
I changed the dyn txt names but still no go. This is also bugging me because I need to have 2 or more dyn txt fields to explain the music theory for each step. There too I experience the mix up of text and we aren't even talking buttons.

Sooooooooo .... I'm swishin' it. See how that goes.

ciao for now :-)

pherbrick
04-10-2006, 02:10 AM
Bret,
I changed the dyn txt names but still no go. Hi Dr John,

As usual, I'm responding too late to be of any practical use :(. Sorry, been busy. Maybe Bob will get something out of the following.

I did some experimenting with your fun file and found that in the event that the movie has dynamic text (DT) boxes with identical names in different buttons, the text boxes in the over or down state will display the value of the DT box in the up state (in your case, the duplicate named up state boxes were in Lessons 2 and 3). So even though a naming conflict error isn't generated, for the over and down state DT values displayed to be accurate, the DT box names need to be unique for the movie, not just the button.

You had the Export Setting "For backward compatibility, make the variable name of a dynamic text object its object name" checked - this is a good idea, because when I unchecked this and started copying DT boxes from button to button, the textvar name no longer was based on the box name (which I was manually changing) but remained the same as the source object, and this caused the new DT box to display the source object's value instead of what had been typed into the DT box (because both DT boxes now had the same textvar name, I guess).

I tried seeing if it was possible to populate the DT boxes dynamically w/ ActionScript from the root level, but couldn't get that to work :(. Anyway, attached file shows that DT in buttons can be done, but it is very tedious.

(Caveat on the above results - I'm working w/ 5.3 beta, but I don't think that should make a difference in this case.)

Anyway, Bret probably had the right idea about using movie clips - I don't think the DT box dupe names would have been an issue as, when they are embedded in movie clips they would have unique paths modifying their names. I hope this helps in your future projects.

Peter

w.brants
04-10-2006, 07:35 AM
The whole problem is caused by the variable names of the dynamic textfields.

If KM would allow to delete the variable name and export it as null when empty (not the string null) it would have worked fine. When you create a dynamic textfield using actionscript the variable is always null by default.

If you are creating a new appication it's always best to turn off the backward compatibility and use myTextField.text to assign text. Text variables can cause a lot of problems.

pherbrick
04-10-2006, 11:04 AM
Hmmm... Another example of where Remus' mantra "Do it with code" is the best approach.

Dr_John
04-10-2006, 01:50 PM
Thanks guys for all the input but because of time reasons, I'm doing the apps in Mediator and the online demos I hack in swish from now on.

Thanks for helping me with all the stuff, it was fun and I learned a thing or two. :-)

markpotts
03-28-2008, 08:55 PM
I have the same problem. Is there a fix or workaround?

Mark

Stoke Laurie
03-29-2008, 05:46 AM
Expalin exactly the problem Mark and Im sure we can fix it.