dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: CS4 - Dynamic text box in a dynamically attached movieclip not working

  1. #1
    Member Manic_Man's Avatar
    Join Date
    Dec 2007
    Location
    Hastings, England
    Posts
    91

    CS4 - Dynamic text box in a dynamically attached movieclip not working

    okay. I got a Dynamic text box with a variable set. It works fine. I add text to the variable (which is _root based) and it appears.

    Now.. I attached a movieclip (via _root.attachMovie) and now, the Text box doesn't want to display the text. add a bit of code to target the text box (via _level0 cause _root doesn't wanna do it) and the text variable of the textbox does fill out, but the box doesn't want to display the text still.. the Box DOES appear though.. that is comfirmed..

    Sadly, I can't sent the fla for anyone to check.. annoying I know but still.. No masking should be being done with the text so that shouldn't do much. I've tried changing the font and colour and that does nothing. debugging shows text should be there but it's not.

    Code that targets and changes the frame of the movieclip which the textbox is in work fine so.. i'm running out of ideas..

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,784
    Hi,

    PHP Code:
    var theText:String "Text";

    _root.attachMovie("attachment","newClip",1)
    newClip._x 50,
    newClip._y 50;
    newClip.innerText.text theText
    try embedding your font via the library too if you have not already.

  3. #3
    Member Manic_Man's Avatar
    Join Date
    Dec 2007
    Location
    Hastings, England
    Posts
    91
    Thanks, and I would have replied quicker but I was away from my computer...

    for some reason.. embedding the font via the library.. did it.. I'll have to run a couple more tests first to comfirm it fully works but.. seams to.

    So for some reason.. if the movieclip is on stage, it'll work with any font.. if attached via code.. it needs embedded font.. That's.. erm.. odd

    EDIT: quick comfirm but yep.. Just needed to have the font embedded.. this is bloody odd but.. oh well ^_^; Thanks quick reply too.
    Last edited by Manic_Man; 05-31-2015 at 03:47 PM. Reason: Add information

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