problem of getCharBoundaries in the AIR

Hello

I try to use getCharBoundaries in the AIR and get the wrong values for the returen rect (all x, y, width, height values are less than 1).

When I take the same code and put it in a non-AIRLINE project, the values are correct.

The code is:

--------------------------------------------------------------------------- start code

var tf:TextField = new TextField();

TF. Text = "Hello!";

var limit: Rectangle = tf.getCharBoundaries (0);

trace (bound.x, bound.y, bound.width, bound.height);

--------------------------------------------------------------------------- end code

the out put in a NON air project: 2 2 6 15

in a draft of air output: 0.1 0.1 0.3 0.75

Is this a known bug? is there a solution?

Hello

I think you need to add the TextFiled object as a child to a DisplayObjectContainer object, using the addChild() method, then you can get the correct values in the AIR.

For example:

If the container class is the Sprite (or inherited Sprite), you can use the following code:

var tf:TextField = new TextField();
TF. Text = "Hello!";
   addChild (tf);
var limit: Rectangle = tf.getCharBoundaries (0);
trace (bound.x, bound.y, bound.width, bound.height);

Thank you

Yang

Tags: Adobe AIR

Similar Questions

  • I bought two licenses adobe and I can't use them because they are expired, expiring 2017/03. I had this problem and solution still has the air of 15 days!

    I bought two licenses adobe and I can't use them because they are expired, expiring 2017/03. I had this problem and solution still has the air of 15 days!

    [Moved from the endorsement, general, all Adobe forums Lounge for a specific product - Mod support forum]

    Hi Eugenio,.

    It seems to be a problem of implementation.

    Try wearing the same query in the General Photoshop Discussion where experts can help you.

    Kind regards

    Sheena

  • problem in the air mode application full screen

    Hi all

    I am facing a problem in creating an air application. I used modepleinecran. FULL_SCREEN_INTERACTIVE to maximize the window when loading the application has been successful to some extent. But there is only one bar at the bottom a problem happens right under the window. can someone help me please. I enclose with this preview.

    Thanks and greetingsUntitled-1.jpg

    I need the code of the project to check because lack me the images.xml file and the file descriptor-app.

    In the file descriptor to be sure of the value none systemChrome and transparent for real.

    Then in your WindowedApplication tag, after the backgroundImage, for example, add ShowStatusBar is stored = "false". That should fix your problem of background-space.

  • HP Photosmart 6520 and problems with the air IPAD using IOS 8.0.2

    Used APPLE IOS 7. No problem with printing to the 6520. Now, I've updated to version 8.0.2. now, to get a message on the IPAD, saying: 'no printer not found '. No printing from laptop to printer and no problem shows on laptop as the printer selected in the folder devices and printers. Y at - it an update of software of HP to run version 8.0.2. .

    JERENDS, thanks for your response. I had already tried the "hard restart" at the suggestion of the Apple Tech Help, but that doesn't seem to help. But late last night after posting my question Imtried print again and IPAD are my printer without problem. Why he couldn't find yesterday morning but has been able to find it later in the day is one of the mysteries of life, I guess.

  • SHIFT key does not work on the bluetooth keyboard connected to the Air ipad on ios 10

    the ipad reboots when we use the uppercase key on the air of the iPad. And in some cases, it shows the changing language selection when the SHIFT key is pressed. The keyboard is perfectly fine and works with ipads o

    I also have the same problem.

    I use 2 keyboards, Bluetooth,

    A wireless Apple keyboard - I mean Magic Keyboard

    The other is universal foldable keyboard from Microsoft

    After updating iOS 10.0.1, Caps Lock does not work, but change language or restart the iPad or it's like restarting the application (kick out of the home screen),

    I thought it happened to MS only the product, but when I connected my Apple Magic Keyboard, the same thing happens!

    Difficulty please, Apple!

  • How can I recharge my sim data in the air of the ipad 2 and activate?

    How can I recharge my sim data in the air of the ipad 2 and activate?

    Hi asherfromqatar,

    The resources below explains how to activate cellular data on your iPad 2 Air service.

    Activate the service of cellular data on your iPad iPad, iPad 2 Air and Pro 3 mini or later

    Check or change your cellular data plan

    To check the status of your cellular data or make changes to your plan, go to settings > cellular data.

    To add another data plan to your iPad, tap Settings > cellular data > Data Plan > add a new Plan.

    When you activate a cell data with some carriers plan, your SIM Apple could be dedicated to the corporate network. Your iPad is unlocked so that you can buy an another SIM Apple or a standard carrier nano-SIM allows you to change networks. Learn more about dedicated SIMs.

    Get help

    Get help with your Apple SIM if you have one of these problems:

    • You receive an alert on your Apple SIM
    • You cannot activate a service or can't find certain support
    • You cannot connect to the cellular data network

    Take care

  • Problem of closing on the Satellite A100-906

    Hello.
    I use a Satellite A100-906. The problem is the thing began to close when starting hot (and NOT too hot, too, paying all in 35 minutes of play or so!)
    Can anyone help?

    Thanks in advance

    SARP

    According to the description of your problem in short, there must be an overheating problem. For me, the first step is to make the laptop clean. It may be that the cooling fans are full of dust and dirt blocking the air flow. The result is material high temperature.

    Or, you can try to do it alone by using vacuum or pay for professional cleaning.

  • I've recently updated to the latest version of the air and now itunes 'flashes' and I think that it corrupted an iPad?  Someone at - he seen this kind of behavior before?

    I've recently updated to the latest version of the air and now itunes 'flashes' and I think that it corrupted an iPad?  Someone at - he seen this kind of behavior before?

    When you have installed iTunes, and you download it from anywhere other than the Apple servers. There is a new version of the 12.3.2.35 installer that came out some time around 23/24, which can solve the problem for you. Download and install on your existing copy.

    TT2

  • I don't think that my fan does not work, not very hot at the air inlet, can I increase the speed of the fan?

    Is it possible to increase the speed of the fan, my laptop is not hot enough?

    In other words, it must be controlled by the motherboard. Points to check are all the ventilation grids which allow the air make sure they are free of lint, pet hair, dust, etc. If there are panels that can be removed (as for the HDD or RAM upgrades), delete and wipe any dust, etc, from there. With the panels off, get a can of air spray to Wallyworld, Staples, etc. and blow through the orifices of evacuation to the inside. That should dislodge from the heat sink.
    After a thorough cleaning, the outgoing air should be slightly cooler. Keep in mind that the more stressed the CPU and GPU are, more air is exhausted. If you think there might be a problem, there are a number of utilities that will control the fan speed and the different system temperatures:

    HWMonitor http://www.cpuid.com/hwmonitor.php
    CoreTemp http://www.alcpu.com/CoreTemp/
    Http://www.almico.com/sfdownload.php fan speed (also allows the fan control)

    If you used to use the laptop on your lap, you can think about getting one of the aprons to put on; very often, during its use on the knees, some of the Airways under may be blocked by your pants, causing overheating. I had a Logitech, which has a sliding mouse (I can't stand the touchpad), and it has helped tremendously with my gateway heat problem.

    SC Tom

  • I reinstalled the air combat Simulator 3 but he can't play. He gets at the beginning and then freezes. I've got shield deluxe antivirus 2009. He has not done this with the 2008 deluxe version of shield. Yet, I can play any other game.

    I reinstalled the air combat Simulator 3 but he can't play. He gets at the beginning and then freezes. I've got shield deluxe antivirus 2009. He has not done this with the 2008 deluxe version of shield. Yet, I can play any other game.

    Hi gullo56,

    Welcome to Microsoft Answers Community Forums.

    To help you better I would ask,

    a. If it functioned very well under Windows 7 before?

    ·         I suggest you to disable your firewall security software and check if you are able to play the game.

    From the link below, what I discovered is Microsoft Flight Simulator 3 is not completely compatible with Windows 7, but I would suggest that you follow the steps below to help troubleshoot your problem.

    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/search.aspx?type=software&s=combat%20flight%20simulator%203

    1. as Microsoft Combat Flight Simulator 3 is supported by Microsoft Windows Vista to function normally, I suggest you run this program in Vista compatibility mode in Microsoft Windows 7.

    For information about how to run a program in an earlier version of Windows, visit the link below,

    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows

    2. you can also try to reduce the hardware acceleration and check if it solves your problem,

    1. Click Start-> Control Panel-> appearance and personalization.

    2. under customization, click on adjust the screen resolution.

    3. in the display settings dialog box, click the Advanced Settings button.

    4. in the monitor Properties dialog box, click the Troubleshooting tab.

    5. click on the change settings button.

    6. in the Security dialog box, click on continue.

    7 move the hardware acceleration slider to none to reduce or turn off video hardware acceleration.

    8. click on OK.

    9. restart Windows.

    Hope this information helped you.

    Kind regards

    Arona - Microsoft technical support engineer

    --------------------------------------------------------------------------------------

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Library meets live TV with the error: "there are currently no TV signal detected for this channel. The channel may be temporarily off the air. »

    I recently changed my TV card to an analogue of Hauppauge PVR150 at a Hauppauge DVB - S Nova S more. Media Center has worked well before.

    Media Library will recognize the new card, search and branch on 239 satellite channels, but may not display the channels giving the error message "there is currently no TV signal detected for this channel. The channel may be temporarily off the air. »

    I have installed WinTV 7 and that you can view all the channels very well in this program so obviously the map and the intensity of the signal are not the problem.

    In my quest through other forums, I heard problems re codec: mpeg2 and we tried several packs of codecs (including shark007) but with no improvement.

    My last move was to uninstall Media Center, uninstall all codec packs, uninstall the TV card and drivers, then reinstall the media library and the TV card and am still unable to view TV channels.

    Suggestions have greatly accepted.

    I've searched the Internet high and low for a solution to this problem and can lead to nothing more than what is proposed here by Divya.

    The problem seems to be fairly common and seems to be associated with codec. Most of the solutions I've come across related to the installation of media center alternatives and after several tries I finally opted for new version of Media Portal 1.1.0 beta

    Installed without a hitch and so far the interface is similar to the media library but has better customization and the ability to incorporate plug-ins.

    I did try the latest version (1.0.2) of the media portal, but said she had a few problems of stability (probably related to the W7 compatibility).

    Very happy now with Media Portal 1.1.0 Beta so will not need any other solution to this problem.

  • Help recording from stereo microphones in the Air

    I've been using this example of a model as it:

    http://cookbooks.Adobe.com/post_SimpleAudioRecorder___Microphone_Access_API_AIR_2_-16746.html

    While it does not save, it saves it in mono. Specifically, it combines the pickups in a channel and that puts on 2 channels, which could be a problem with the class WAVWriter that I use to save the file.

    Is it possible by air to record using the stereo microphones (left + right channels)? Maybe someone could direct me to a site/example usage of stereo microphones.

    Thank you

    Thanks for the info; Maybe just stereo is not exposed through the API of the AIR on the PlayBook.

  • using the AIR SDK Beta 10 camera

    Hello

    I try to transfer my playbook to the BB10 sdk air application. It seems rather easy. But I have a problem of access to the camera. I wonder if it's a bug or a feature missing from the current beta.

    The way I access the camera is quite standard:

    : camera var = Camera.getCamera ();

    ...

    camera.setMode (800, 400, 15, true);

    Video: video of var = new Video (camera.width, camera.height);

    video.attachCamera (camera);

    addChild (video);

    When debugging I get the object camera but it not to broadcast anything (fps = 0).

    Thank you for your help,

    Toby

    I fixed it! In fact, I used

    camera.setMode (1024,600,15)

    When you switch to a different mode the camera image is displayed correctly.

  • Error: Failed validation of the AIR. Invalid namespace

    Hello

    Just downloaded and installed the Webworks 2.2.0 for Tablet OS SDK (https://bdsc.webapps.blackberry.com/html5/download/sdk) and v3.1 to Adobe AIR SDK from Adobe.

    When I tried to compile applications Webworks, I got following error:

    [C:\Program Research In Motion\BlackBerry WebWorks SDK for TabletOS\bbwp] bbwp... \test.zip
    [INFO] Parsing of the command line options
    [INFO] Bbwp.properties analysis
    [INFO] Validation of archive WebWorks
    [INFO] The analysis of config.xml
    [INFO] The application of filling source
    [INFO] Compiling applications WebWorks
    [INFO] Packaging of the record bar
    Error: Validation of the AIR is not
    \Temp\bar-app5208961890444725744.XML: error 102: space name invalid http://ns.adobe.com/air/application/2.7

    I have never such a problem before when using the Webworks SDK 1.x and AdobeAIRSDK 2.5

    I tried to change the namespace AdobeAIRSDK in C:\Program Research In Motion\BlackBerry WebWorks SDK for TabletOS\bbwp\AirAppTemplates\src\WebWorksAppTemplate-app.xml, but I kept getting errors:

    Error: Failed validation of AIR... error 102: space name invalid http://ns.adobe.com/air/application/3.1

    Error: Failed validation of AIR... error 102: space name invalid http://ns.adobe.com/air/application/3.0

    Error: Failed validation of AIR... error 102: space name invalid http://ns.adobe.com/air/application/2.9

    Error: Failed validation of AIR... error 102: space name invalid http://ns.adobe.com/air/application/2.8

    Error: Failed validation of AIR... error 102: space name invalid http://ns.adobe.com/air/application/2.6

    Error: Validation of AIR... failure error 305: initial window content SWF version 11 exceeds namespace version http://ns.adobe.com/air/application/2.5

    I Googled, it resembles a known problem in Adobe but I got are the fix for Adobe Flex development.

    How can I fix for SDK Webworks?

    Thank you

    This is usually caused by people simply crush their old AIR SDK installation instead of using a brand new installation of it and using our Installer. When you installed the SDK latest were you pointing to a pure install 3.1?

  • Problem ladle with Burrito where AIR App window never appears

    I'm all of Google-fu, who have also sought everywhere here and at Adobe, but I was wondering if someone here might have experienced the same problem:

    When using Adobe Flash Builder Burrito, the window for the desktop version same basic app never appears - but that works well when I push to the Playbook Simulator.

    All that happens is the adl.exe process starts. No new window never appears. If I run in a debug configuration, it is obvious that the application runs indeed somewhere, because I can get feedback trace().

    I have installed and reinstalled Flash Builder and tried it on XP and Win7; systems both have the same problem. This is something that has developed over time, as I used to be able to use the desktop very well mode. I tested my own application as well as the tutorial app Playbook in 90 minutes. both work when I load them upward on the Simulator (but not on the desktop).

    I tried to update Flash Player and even Shockwave Player, nothing helps. It's using the AIR API v0.9.2.

    There is some development excrutiating - I need a feedback loop fast since I'm new to ActionScript. The Sim Card takes much too long.

    Thank you! -you guys have been a great resource.

    Is it possible that in the app - xml file, you do not have the visible window?

    true

    ..

    It can be commented.

Maybe you are looking for