A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: Dynamic Text is misbehaving - help!

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    72

    Dynamic Text is misbehaving - help!

    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?

  2. #2
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Post your FUN file Doc. Let's see what's the culprit.

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    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.

  4. #4
    Registered User
    Join Date
    Feb 2006
    Posts
    72
    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
    Attached Files Attached Files
    Last edited by Dr_John; 04-05-2006 at 07:29 PM.

  5. #5
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    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.


  6. #6
    Registered User
    Join Date
    Feb 2006
    Posts
    72
    Thanks Chris for pointing that out! :-)
    Attached Files Attached Files
    Last edited by Dr_John; 04-05-2006 at 08:02 PM.

  7. #7
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    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.
    Last edited by Chris_Seahorn; 04-05-2006 at 07:45 PM.

  8. #8
    Registered User
    Join Date
    Feb 2006
    Posts
    72
    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!

  9. #9
    Registered User
    Join Date
    Feb 2006
    Posts
    72
    never mind, my girlfriend figured it out. I am not impressed with KM (maybe tomorrow is a better day)

  10. #10
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    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.

  11. #11
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    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.
    Last edited by blanius; 04-05-2006 at 09:49 PM.

  12. #12
    Registered User
    Join Date
    Feb 2006
    Posts
    72
    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 :-)

  13. #13
    Senior Member pherbrick's Avatar
    Join Date
    Jul 2004
    Location
    Los Angeles
    Posts
    291
    Quote Originally Posted by Dr_John
    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
    Attached Files Attached Files

  14. #14
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    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.

  15. #15
    Senior Member pherbrick's Avatar
    Join Date
    Jul 2004
    Location
    Los Angeles
    Posts
    291
    Hmmm... Another example of where Remus' mantra "Do it with code" is the best approach.

  16. #16
    Registered User
    Join Date
    Feb 2006
    Posts
    72
    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. :-)

  17. #17
    Junior Member
    Join Date
    Mar 2008
    Posts
    17

    Is there a fix or workaround?

    I have the same problem. Is there a fix or workaround?

    Mark

  18. #18
    That web bloke Stoke Laurie's Avatar
    Join Date
    Jan 2006
    Location
    England
    Posts
    869
    Expalin exactly the problem Mark and Im sure we can fix it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center