Getting the top & left of a textbox placed inside a table

hai brainees
i need a sampel code to get the top & left of a textbox placed inside a table so that i can display a dropdownlistbox ih that place.its very important.
Thanks
anieshuk

Thanks. I asked a friend and he told me about the %but I still had a problem. Your expression solved my problem
        private function placeTile(mouseX:int, mouseY:int, frame:uint):void {
            var tile:Tile = new Tile();
            tile.gotoAndStop(frame);
            tile.x = Math.floor(mouseX / tileSize) * tileSize;
            tile.y = Math.floor(mouseY / tileSize) * tileSize;
            stage.addChild(tile);
That way every tile is centered every 50 pixels

Similar Messages

  • Getting the top left corner of a grid cell (math problem)

    I'm making a map editor for a tile based game. The editor makes a grid:
    private function drawGrid():void {
                var grid:Sprite = new Sprite();
                var tileSize:uint= 50;
                for(var i:int=0;i<row;i++)
                    grid.graphics.lineStyle(1,0x000000,0.3);
                    grid.graphics.moveTo(0, i*tileSize);
                    grid.graphics.lineTo(700, i*tileSize);
                for(var j:int=0;j<column;j++)
                    grid.graphics.lineStyle(1,0x000000,0.3);
                    grid.graphics.moveTo(j*tileSize, 0);
                    grid.graphics.lineTo(j*tileSize, 400);
                stage.addChild(grid);
    And when the user clicks anywhere in the screen a movieclip is added to stage. The movieclip (exported for actionscript as Tile) should be placed in the top left corner of the grid cell.
    private function placeTile(mouseX:int, mouseY:int, frame:uint):void {
                var tile:Tile = new Tile();
                tile.gotoAndStop(frame);
                tile.x = PROBLEM HERE
                tile.y = PROBLEM HERE
                stage.addChild(tile);
    How can I do that? I came up with an idea but it didn't work because I have a math problem.  Let's pretend that the user mouse is at position mouseX = 456:
    I could remove the hundreds and use the quotient 56 and check if it is above 50. If it is above 50 I would place it at x = 500 if not I would place it at x = 450. How can I remove the hundreds? Do you have a better idea?
    Message was edited by: wilsonsilva7 because unconsciously I pressed ctrl+s (to save) and the message was posted

    Thanks. I asked a friend and he told me about the %but I still had a problem. Your expression solved my problem
            private function placeTile(mouseX:int, mouseY:int, frame:uint):void {
                var tile:Tile = new Tile();
                tile.gotoAndStop(frame);
                tile.x = Math.floor(mouseX / tileSize) * tileSize;
                tile.y = Math.floor(mouseY / tileSize) * tileSize;
                stage.addChild(tile);
    That way every tile is centered every 50 pixels

  • Updated to Mavericks and I get the upper left quarter of the screen blacked out on Time Machine. This means that I can't see the files. Any suggestions for getting rid of the black square?

    Ive tried disconnecting and reconnecting the Time Machine. And I've tried rebooting the iMac, but I still get the top left hand quarted of the screeen blacked out. I can scroll back through the back-ups but the back square means that I can't see the details of any file.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, or by corruption of certain system caches. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and  Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • I have placed my SIM card into my iphone 5c and have confirmed co with my cellular network provider.However despite numerous reboots I am still getting "No Service" in the top left corner. Please advise

    I have placed my SIM card into my iphone 5c and have confirmed co with my cellular network provider.However despite numerous reboots I am still getting "No Service" in the top left corner. Please advise

    Contact the carrier and troubleshoot the issue.

  • HT4993 my iphone4 says searching in the top left corner how do i get it to stop and get my service back?

    my iphone4 says searching in the top left corner and i can not make calls or get calls how do i fix it so i have my service back

    you can try a reset, hold down the home/sleep button until you see the apple logo and then release, then wait fro the phone to boot back up.
    if that doesn't work contact your cell provider

  • How do I get my Sony ebook Reader to show up ("be recognized") in the top left corner??

    How do I get my Sony ebook reader to show up ("be recognized") in the top left corner of the window.  It never shows up and I cannot transfer books from my Mac computer to ADE.  I am using Sony Reader Library but it is developing problems!!  Can anyone assist??

    No solution yet.  One would think that Adobe would recognize that several complaints  have been reported on this problem.  Obviously, nobody knows how to fix it!!  Sorry I can't be helpful!!

  • I inadvertedly changed a setting where the top of my screen no longer shows the apple logo in the top left or the clock and wifi status and strength on the top of the screen, how can I get it to show both of these things again like it used to?

    I inadvertedly must have changed a setting where the apple logo and files and things that used to be in the top left corner of the screen are no longer there as the clock and wifi status and other installed settings used to show up in the top right hand corner of my screen.  When I move my mouse to the very top of the screen they drop down but when I move my arrow away from the very top of the screen they both disappear again.  So I was wondering how can I get it to revert back to the way it used to be?  I hope this isnt confusing.

    I tried the zoom thing but it still didnt resolve my issue   Im gonna try to clarify my issue a little bit more, before the change, my screen when I would surf the web would have the apple logo and safari and file and edit and view buttons at the top left hand of the screen and the upper right hand screen would have the time and the wifi strength and my name and the spotlight box and a volume control but now they dont show while Im browsing the web unless I take my arrow and move it to the very top of the screen then those boxes will drop down like it used to be but when I take my arrow and move it from the top of the screen it disappears again and ll I get is a back and forward arrow and the url input bar.  Anyone else have any ideas of what I did to mess this up?

  • Under Windows 7, 64-bit, Firefox intermittently will not open a new window - all I get is a grey screen, with a tiny part of my homepage displayed in the top left corner of the screen.

    The problem began after a recent Firefox update. Occasionally, when I try to open a new Firefox window, all I get is a grey screen with a tiny section of my homepage visible in the top left corner of the screen. NOTE: Firefox stores all of these aborted attempts, as, whenever I close it and then re-open it, the first time I open a new window it automatically opens all of the windows that had originally failed to open.
    == This happened ==
    Every time Firefox opened
    == on or about June 26, 2010

    Got the exact same problem aswell, finally fed up with it now as i just started up firefox and 14 new windows opened because of this bug, luckily my computer can handle them but someone with a slower processor it would have been a nightmare, needs fixing ASAP.
    Reverting back to 3.6.3 until this issue is solved. (link for anyone wanting to do the same below)
    http://www.filehippo.com/download_firefox/7345/

  • In the top left on my screen where the back arrow is, there used to be a drop down arrow to skip back many pages. After installing 4.0.1, it has disappeared. How do I get it back?

    In the top left on my screen where the back arrow button is to go back to previous webpages, there used to be a drop down arrow just to the right so I can see many of my previous web pages. Since installing Firefox 4.0.1, that arrow disappeared.

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • FF 7.0.1 on Mac OSX 10.6.8: I sometimes get the "unresponsive script" dialog box in the top left corner of the screen, so far out that I can see only the bottom right corner of the dialog box. Is there any way of re-centring it?

    FF 7.0.1 on MacOSX 10.6.8 (not this machine!): I sometimes get the "unresponsive script" dialog box jammed into the top left corner of the screen so that only a quarter of it is visible.
    Is there a way of re-centring the dialog box (in particular, when its top edge is off the screen)?
    Thanks!

    There is no way to preserve view preferences.Just remember or annotate the zoom % used in the package.
    You may want to open an MS Connect item asking to add such a feature.
    I can tell you it may not be implemented because a package may be opened on different size monitors.
    Arthur My Blog

  • My ipad say no service in the top left hand corner, how can I get it to change

    I recently bought a new I pad.  I installed it and in the top left hand corner where it should say "ipad" it say "no service" how can I get it changed?

    Try going to settings. Tap Reset, tap reset network connection, wait until the apple goes restart your iPad,. Back to setting tap provider and put in your network password.

  • We are trying to transfer files from PS Elements 13 to our web builder.  We are getting a '?' in the top left hand corners of some of the image boxes. It seems that we are unable to transfer images with this ? on the image.  We have spent a long time taki

    We are trying to 'reconnect' files.  we seem incapable to do so, for some reason.  Try as we might, we aren't able to do it.  can anyone help?

    Please see other thread
    Re: We are trying to transfer files from PS Elements 13 to our web builder.  We are getting a '?' in the top left hand corners of some of the image boxes. It seems that we are unable to transfer images with this ? on the image.  We have spent a long time

  • I've edited my NEF photos in lightroom and have tried to export to a formatted CD. When I try, I have several issues. I either see in the top left corner that the files are ready to go to CD but there is no further instruction or I get the pop up message

    I've edited my NEF photos in lightroom and have tried to export to a formatted CD. When I try, I have several issues. I either see in the top left corner that the files are ready to go to CD but there is no further instruction or I get the pop up message that the files are offline or missing??

    Just for background, in what format are you exporting your images?  Also, are you able to export them to your hard drive in your chosen format?  I haven't tried exporting directly to CD, but if you're able to export to hard drive and copy to CD, that may be one solution.

  • Iphone went out, when i did get it back on up in the top left of screen it continues to show searching, and wi-fi is grayed out keeping me from restoring it. what can i do to fix this?

    Iphone went out, when i did get it back on, up in the top left of screen it continues to show searching, and wi-fi is grayed out keeping me from restoring it. what can i do to fix this?

    Did you try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again? You will not lose data by resetting, but it can clear some glitches.
    If this does not work, try to set it up as new device without using the latest backup.
    How to back up your data and set up as a new device

  • I've lost the orange firefox tab with the arrow, that was in the top left corner: how do I get it back?

    I've lost the orange firefox tab with the arrow, that was in the top left corner: how do I get it back?

    In current Firefox releases (29 and later), that have have the Australis user interface, the orange Firefox menu button has been replaced by the three-bar Firefox Menu button at the far right end of the Navigation Toolbar and this button is always visible, whether you have the menu bar visible or hidden<br>A consequence of this location is that you no longer can hide the Navigation Toolbar
    *There is a star like button to the right end of the search bar on the Navigation Toolbar to bookmark the current web page and a "Show your bookmarks" button next to it to open the Bookmarks in a drop down menu.<br>You can find "Show All Bookmarks" to open the Bookmarks Manager (Library) at the bottom of this drop-down list
    *It is still possible to have the menu bar visible via the right-click context menu on the toolbars to have menus like the Bookmarks menu
    *<br>*If you bookmark a page then "Bookmark This Page" in the Bookmarks menu changes to "Edit This Bookmark"
    See also:
    *https://support.mozilla.org/kb/how-to-make-new-firefox-look-like-old-firefox
    *https://support.mozilla.org/kb/common-questions-after-updating-to-new-firefox
    *https://support.mozilla.org/kb/learn-more-about-the-design-of-new-firefox
    I'm locking this thread. If you still have questions then please create a new thread.

Maybe you are looking for