CreateTextField and _height: Problem with Placement of Text Fields

I'm using createTextField to create several text fields
dynamically. I'm also using an external XML file and a style sheet
to populate the text fields.
My problem is that I'm trying to position the various text
fields on the page so that they are spaced evenly on the page
(regardless of how much content they might contain). I'm trying to
use _height of the prior text fields to place subsequent text
fields, but I'm getting very inconsistent results. When I trace the
value of _height, I get differing results, even if I don't actually
change any of the parameters. So, the question is...is there a way
for Flash to get the height of a dynamically created text field
that's populated via an exteral XML file and using CSS? I know
that's asking a lot, but I'm trying to avoid using scroll bars if
at all possible.
Thanks for any pointers.
Bill

i assume you're using multiline textifields with a fixed
width and autoSize="left".
flash will report the correct _height of your textfields IF
you access the _height property after your htmlText has been
assigned to your textfield. ie, you're probably seeing inconsistant
results because you're not waiting until all data needed to
populate your textfield has loaded.

Similar Messages

  • Problem with characters in text field

    hi all
    i am missing a few characters, once i load text into a dynamic text field. chars are not missing per say; they are being replaced with empty squares.
    characters like the euro sign and accentuated german a letter.
    whats is weird is that other accentuated german letters do appear. so only a few selected are missing.
    How ive set up the fla:
    1) i've added 4 text fields to the stage in the font im using, Arial, one for each font style: normal, italic, bold and bold italic, and in all 4 fields ive embedded all latin characters (to include the german accentuaded characters and im guessing it's in the punctuation group that holds the euro sign, so that one is also embedded), besides lowercase, uppercase, numerical, and all the default groupd to include basic text.
    2) i've got a dynamic text field, created with createTextField, and setup the following ActionScript (2):
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "Arial";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = false;
    T_text.textColor = "0x666666";
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setNewTextFormat(myFmt);
    now, im calling text from a database.
    when calling the text from the browser  url bar, there's no chars missing.
    its just when i make this call from flash and load the text into the dynamic text field, that characters go missing.
    below is a link to a print screen of the faulty text that is displayed in flash's dynamic text field.
    http://img210.imageshack.us/img210/340/utf8.png
    any ideas? i mean, it seems that the arial font is missing a few accentuated characters! because the code i have setup loads other accentuated characters.
    anyone has seen this issue before and know how to solve it?
    regards

    no.
    you assigned your embedFonts property to be false.
    look, you can test if you've embedded fonts correctly by using:
    T_text._rotation=3;
    if you see no text, you're not embedding fonts correctly.
    so, use:
    T_text.embedFonts=true;
    and then test.  if you see no text, use:
    click on the upper right of your library panel > new Font > select Arial and tick the symbols you need to embed > tick export for actionscript and assign a linkage id (eg, ArialID). click ok.  then use:
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "ArialID";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = true;
    T_text.textColor = 0x666666;  // no quotes here.  this is a number
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setTextFormat(myFmt);  // to format the above text, use setTextFormat().  if you want to format text added after this line, use setNewTextFormat()

  • Mail and iPhoto Problems with sending photos.

    Mail and iPhoto Problems with sending photos.
    I have this problem that started a while ago and seems to be getting worse.
    Here are the different scenarios.
    -If I try to share a photo to email within iPhoto, it will insert the image file name in the mail message, but no image icon or opened image. In iPhoto Preferences under General I have chosen to use Email Photos using Mail.
    -If I choose to use iPhoto to send the photo, it will compose the message and the photo is viewable. If I send the message i can view the photo within the email I sent to myself. Nothing happens when I double click on the photo in the Mail message. Nothing happens when i control click on the photo in the mail message. Nothing happens when I try to drag the photo to the desktop from the mail message. When I try to save attachments from the email and choose a place to save it, the save button is grayed out and it cannot be saved. When I check the mail message it says there is an attachemnt but there is no file size listed.
    -If I use the stationary within Mail app I cannot drag a photo into the placeholder, I get a circle with a line through it symbol when I try. It happens if I try to drag a photo from the desktop or from the media browser within Mail app.
    -If I drag the photo to the desktop from iPhoto, I can double click it on the desktop and it will open in Preview.
    -If I then control click on the same photo on the desktop and scroll to share/email, the generic photo icon will be inserted in the mail message. If i double click the photo icon in the mail message  I get a message it can't be opened because it is empty.
    -If I drag that same image to the mail message body the same thing happens.
    -If I send that email to someone they cannot open the image file.
    What I can do:
    - I can drag that same image file on the desktop to my dropbox folder and  it will upload. From there I can go on my iPad and download the photo and send it through email just fine.
    -I can open the same image file on my desktop in Preview, I can copy and paste it into a mail message and the image will be viewable in the mail message by me and by the recipient.
    -I can drag that same image on the desktop to my safari browser window and it will be viewable in the page. i can then copy and paste that image into a mail message and it is viewable in the message.  I can then send that email message to myself and i can control click on the image and get all my options. It also shows as an attachment with the size of the image file in the mail message.
    I can send that message to someone and they can see the photo and open it fine.
    -If I send that same email to me I can see the photo within the mail.  If I then drag that photo to the desktop I cannot use it again to put in an email as the same problem happens again.
    I have tried all scenarios in my user account, another users account and in a guest account. The same happens in all. I am guessing because of this it is not a corrupt preference file, unless all of the preference files are corrupt. The guest user account I added a new email account so it was brand new and still had the problem.
    I am stumped, all and any help is appreciated.

    Another problem that may be related….
    I have Snapz Pro. I used to be able to save the snaps to my desktop or a folder. Now when I take a screenshot and try to save the file to my desktop or a folder on my desktop I get this message  "Files cannot be created in the selected location. You do not have permission to write to the selected location.   Please choose a different location."  I have found that i can only save the file to the clipboard.   I have repaired permissions many times and still I have this problem.

  • Problems with the Widget "Text Ticker"

    Hello, I have a problem with the widget "Text ticker". I tried to put more then one text ticker on my site, but it doesn't work, when I look in Muse it looks like this:
    and when I look in the preview only the first text ticker works...maybe it is not possible to have more then one text ticker on one site?
    Thank you.

    It seems you are using the same name for all the ticker instances on page.
    You need to have unique names for each of the ticker you want on a single page. Tickers with duplicate names will not work.
    Cheers,
    Vikas

  • [svn:fx-trunk] 8452: - Fix flicker problem with constraint bound text that is being autoSized.

    Revision: 8452
    Author:   [email protected]
    Date:     2009-07-08 08:38:32 -0700 (Wed, 08 Jul 2009)
    Log Message:
    - Fix flicker problem with constraint bound text that is being autoSized.  If the remeasure is done in a 2nd pass you will see a flicker as all the objects are moved to accommodate the reflowed text.
    - Fix data binding issue with text setter.
    - Rework measure() to accommodate implicit autoSize.
    If explicitWidth or widthInChars specified and explicitHeight or heightInLines specified, or for now, blockProgression != "tb", the text has fixed dimensions and is not auto-sized.
    If no text and width specified, but no height, start at specified width and one line high and grow taller.
    If no text and height specified, start at 1 char wide with the specified height and grow wider.
    If neither width nor height specified, and toFit lineBreaks, start at explicitMaxWidth, or default maxWidth of 160, and grow taller.
    If neither width nor height specified, and explicit lineBreaks width is unlimited and can grow taller.
    These are further constrained by min/max Width and Height except in the case that explicitWidth or explicitHeight are specified.
    - Change default maxWidth for RichText and SimpleText to 160 to match RET.  Previously it was 10000.  This is used for
    text with toFit lineBreaks if a width isn't specified.
    QA Notes: 12 or so TextGraphic tests fail because of the new default maxWidth.
    Doc Notes:SDK-22014, SDK-21837
    Reviewers: Gordon
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22014
        http://bugs.adobe.com/jira/browse/SDK-21837
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicEleme nt.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/RichEditable TextContainerManager.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicE lement.as
    Added Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/RichEditable TextEditManager.as

    You have used elements like header, footer, footer1 and nav without using the correct DOCTYPE declaration. Replace the first line of your code with
    <!doctype html>
    Also have a look here for other problems http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fhome.surewest.net%2Fstorytales%2F test%2Fforposting.html
    After the above has been fixed, please come back here to fix the remaining problem(s)
    Gramps

  • I have bought Adobe Photoshop Elements 10 last August 2013 and having problems with installing it on Windows 8.1?

    I have bought Adobe Photoshop Elements 10 last August 2013 and having problems with installing it on Windows 8.1.  Why am I having this problem?

    You can check you Adobe account online to see if the serial number is registered under your account.  If not then your only option will likely be to contact Adobe Support directly thru chat to see if they can provide you with a/the serial number. For them to do so will require you being able to prove ownership.
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • I have Iphoon 4 and ihave problem with speaker what i have to do?

    I have Iphoon 4 and ihave problem with speaker what i have to do?My problem is no body can heir me.
    I have got my IPhoon from London U.K. Now i'm in Saudia Arabia

    If it's happening on all the apps that you've downloaded from the App Store, but not the Apple built-in ones, then try downloading any free app from the store (as that appears to reset something) and then re-try them - the free app can then be deleted.
    If it's happening on all apps then try closing them all completely and then see if they work when you re-open them : from the home screen (i.e.not with any app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of each app to close them, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • I have ipad 2 and facing problem with programs swtching off

    I have ipad 2 and facing problem with programs it's swtching off while working and turn to home page. Am using ios 5

    If it's happening on all the apps that you've downloaded from the App Store, but not the Apple built-in ones, then try downloading any free app from the store (as that appears to reset something) and then re-try them - the free app can then be deleted.
    If it's happening on all apps then try closing them all completely and then see if they work when you re-open them : from the home screen (i.e.not with any app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of each app to close them, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • I have an iMac OS X 10.6.8 and have problems with the backup Disk for Time Machine disconnecting itself with the message that I ejected it improperly.. It ejected itself - why?

    I have an iMac OS X 10.6.8 and have problems with the backup drive to Time Machine ejecting itself and so does not automatically backup the way it is meant to do. It is connected with an USB cable to my iMac. What could cause this - malfuntioning drive?

    The "iLife" apps are not part of any Mac operating system install and are a separate purchase.
    Once you get past 10.6.6 you can purchase and download iPhoto, GarageBand and iMovie. iWeb and iDVD have been discontinued.
    Snow Leopard 10.6.6 and higher include the App Store application which is what you use to purchase Lion.

  • Just purchased Wndows Vista and having problems with the port for Palm 125

    I just purchased a Windows Vista computer and having problems with getting my Palm 125 to sync with the desktop.  I get an error message saying:  "Com1 not available"  What do I do?
    Thanks,
    Frustrated
    Post relates to: Palm m125
    This question was solved.
    View Solution.

    Sorry, that didn't work.  I get no drop down menu from the Hot Sync Manager for the Serial Port.  What comes up often is:  "The selected port, COM1, is not available at this time.  Hot Sync Manager will open the port when it becomes available." 
    Could it be the Norton Antivirus Firewall that is preventing the Hot Sync Manager to open the Serial Port?  Just a thought.  Thanks for your help.
    Post relates to: Palm m125

  • Scanner and fax problems with the Officejet 7410 AIO

    Hi
    I have Windows 7 SP1 Ultimate 64 bit and I installed the basic drivers for the network of the Officejet 7410 AIO printer and I checked that all its functions worked properly.
    Now, the functionality of the scanner and fax do not work more as in the "Devices and Printers" not appear more their relative icons. How come? How do I install them manually?
    Thanks
    Bye
    balubeto

    Hi balubeto,
    Welcome to the HP Forums!
    I see that you are having scanning, and faxing problems with your HP Officejet 7410 on Windows 7 SP1.
    I would recommend the following:
    Run the HP Print and Scan Doctor, to diagnose the issue.
    Uninstall the software. Uninstalling the Printer Software.
    Re-install the software using the HP Printer Install Wizard for Windows.
     Hope this helps, and have a great day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • MacBook will not start. I have restarted with original CD. I have used Utilities and "no problem" with hard drive. I have reset PRAM. I have tried safe boot. Nothing is work. Gray screen with Apple logo and rotating wheel. Thanks for any suggestions!

    MacBook will not start. I have restarted with original CD. I have used Utilities and "no problem" with hard drive. I have reset PRAM. I have tried safe boot. Nothing is work. Gray screen with Apple logo and rotating wheel. Thanks for any suggestions!

    Snow Leopard is a Mac OS X version. You say that it's the version you have in your Mac (10.6.8). Do a back up of your files, format the hard drive (using Disk Utility) and reinstall again

  • I bought an iPad in June 2012 and have it worked fine, but after 2 weeks of purchase, he began to hang up, then the sound disappeared and the screen became black. I updated all through itunes, but the sound is still absent, and still problem with sound an

    I bought an iPad in June 2012 and have it worked fine, but after 2 weeks of purchase, he began to hang up, then the sound disappeared and the screen became black. I updated all through iTunes, but the sound is still absent, and still problem with sound and iPad still doesnt work.

    Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • Pixelated video and upscaling problems with ringing artifacts on Youtube since Flash player 10.3

    Pixelated video and upscaling problems with ringing artifacts on Youtube since Flash player 10.3. Flash palyer 10.2 was the last version without the listed problems.
    For anyone interested you may see here what 'ringing artifacts' means : http://en.wikipedia.org/wiki/Ringing_artifact
    More about Image artifacts/errors related to video scaling here :  http://en.wikipedia.org/wiki/Video_scaler
    Test configuration :
    Windows 7 x64
    Intel HD Graphics with lastest available drivers from manufacturer.
    Any solution from Adobe?

    Could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.
    Thanks,
    Chris

  • Power and Sync problems with Zen Vision:M

    )Power and Sync problems with Zen Vision:MX Lately, my Vision M is having problems that when I plug it into the USB port on any PC to charge it, it lights up for a moment and then goes blank.
    When I unplug it and reseat the usb cable, nothing happens. When I try to turn it on, it's dead. This happens even though it's not fully depleted of battery energy.
    Pressing the reset button does not do anything. The only thing that I've found that will work is to open it up and unplug the battery. But even that is starting to not work.
    This doesn't happen every time I use it, but it is happening quite a bit. It's gotten to the point today that I can't even charge the battery at all.
    Any suggestions? I don't think it's the battery, as it does charge when I don't have these issues, but I'm not really positi've of that either.

    The connector on the motherboard check it . It may need to be resoldered. The last time I ran into those symptoms that was the solution.

Maybe you are looking for

  • Error while navigating planning 9.3.1 through workspace/ need info on cpx,

    Hi all Hey I installed the planning 9.3.1 and also I created the application name, using planning address. but the problem is I am unable to navigate through workspace. I am getting three dialog boxes.... " invalid or could not find module configurat

  • Goods Receipt at 2 levels

    Hi Guys, We have a unique requirement for our client. They normally imort their goods from China. In the legacy system they recognize the goods receipt in two stages. When the goods are received at the Frieght Forwarder, they post a goods receipt whe

  • Can't open my project in CS5.5

    Help!!!!! I've just exported my old cs5 project in flash builder but it won't open in cs5.5 becaus of an error. I'm not a programer so have no idea what this means. src\Main.mxml (995): Unexpected child: "swfcontroller1". Expected a compatible visual

  • Itunes won't open. continual error message

    Itunes 8 won't open. I click to try to open it and I get "itunes has encountered a problem and needs to close." I've tried plugging in Ipod to see if it will help in opening itunes. it won't. I've uninstalled and reinstalled. I've tried taking itunes

  • Central Monitoring

    I am trying to configure Central Monitoring for our environment and having problems getting the auto reactions to work on the satalite systems.  I've installed the CCMS agent on the satalite but when the events occur that should trigger the auto reac