How do I get my slider to move when I click the groove

TheI have created a simple Adobe Flash movie which is to act as a slider control. The code that I have written is shown below. I am able to grab the slider and move it to any position on the groove but I wish to also be able to click anywhere on the groove so that the slider will jump and lock to that position.
I have created a function:
groove_1.onMouseDown = function(){
      trace('You clicked x = '  + this._x);
      slider_1._x = this._x;
the problem is that the this._X coordinate returns the left-hand edge of groove_1 and not be positioned that was clicked on this control.
Can someone tell me how to get this information out of the mouse down event?
The code of the file is:
slider_1.onPress = function(){
        this.startDrag(true, _root.groove_1._x, _root.groove_1._y, _root.groove_1._x + 520, _root.groove_1._y );
slider_1.onRelease = function(){
        this.stopDrag();
slider_1.onMouseMove = function(){
        newPoint = new Object();
        newPoint.x = this._x;
        newPoint.y = this._y;
        _root.groove_1.globalToLocal(newPoint);
groove_1.onMouseDown = function(){
        trace('You clicked x = '  + this._x);
        //slider_1._x = this._x;
The source file is contained in the attached zip file

Hi Ned,
Thank you for your help. Your 2nd solution led me straight to the correct solution which is:
slider_1._x = this._xmouse + groove_1._x;
I use the object variable this instead of groove_1 as I am calling it from the function:
groove_1.onMouseDown = function(){
    slider_1._x = this._xmouse + groove_1._x;;
I also add the groove_1 left hand offset (groove_1._x;)
Thanks again for you help.

Similar Messages

  • How can you get your ipod touch open when you forgot the password and its disabled and not connected to wifi

    How can you get your iPod touch open when you forgot the password and its disabled and not connected to the Internet Connection and you don't want to reset it.

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:                                                             
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:                         
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • How do you get back in your ipod when you forgot the password

    how do you get back in your ipod when you forgot the password?

    Connect the iPod to your computer and restore.  Place the iPod in recovery mode if necessary. For recovery mode:
    iPhone and iPod touch: Unable to update or restore

  • Why am I getting an "unsupported url" error when I click the link to find my apple id?

    When I click the link to change my password or to find my apple id, I get a blank page with only "unsupported url error".  I've tried on multiple devices and while I can log on with one apple ID, I can not get any of the links to change id or password or to find an  additonal password to work.  Any suggestions?

    When I click the link to change my password or to find my apple id, I get a blank page with only "unsupported url error".  I've tried on multiple devices and while I can log on with one apple ID, I can not get any of the links to change id or password or to find an  additonal password to work.  Any suggestions?

  • How do I get rid of 'download' option when someone clicks on a photo on my website?

    I mad my website in iWeb. How do I get rid of the 'download' option I see on the page. It appears when I click on a photo. If I click on 'slideshow' it is not there. I  have my photos in folders on my website. Hope someone can help!

    You don't republish any site as 'Ethmoid'.  There is no term here that you need to be familiar with!
    Did you read Old Toad's post properly?  If not then go back and read what he actually wrote, which was - "Once you republish the site as Ethmoid mentioned".  Spot your mistake?
    Just re-publish your site as you normally would and then clear your browser cache.

  • How can I get my iPod to update when it says the server cannot be connected?

    Whenever I try to update my iPod it says, "The iPod software update server could not be contacted. Make sure your network settings are correct and your network connection is active, or try again later." It does this every time. How can I get it to update? Any help is much appreciated, thanks!

    Update Server
    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - For one user uninstalling/reinstalling iTunes resolved the problem
    - Try on another computer/network
    - Wait if it is an Apple problem

  • How do I get my bookmarks to list when I hit the bookmarks tab. I have to go to unsorted bookmarks to find them

    In the old firefox, when I hit the bookmarks tab they were listed on the side bar. Now when I hit the bookmarks tab I have to go to the unsorted bookmarks and pick my bookmark from there. How do I get them to ist in the side bar like before?

    In the Firefox 4.0 betas there are two different Bookmarks '''buttons''' (not "tabs"), The one that automatically appears when the Menu Bar is hidden and the orange Firefox button, is for the Bookmarks Menu Bar drop-down. The Bookmarks button that is in the Customize Palette is for opening and closing the Bookmarks Sidebar. https://support.mozilla.com/en-US/kb/How+to+customize+the+toolbar

  • How do I get icloud to show up when I click on "mail"?

    I believe I have transferred my old mac.com email to icloud.  How do I now bring up the icloud instead of the old format?  How do I get rid of the old format?  Sorry, I am not savvy on computer matter and cannot find a place to take these actions.  Thanks

    If you migrated from MobileMe to iCloud before the end of August last year you can access your email at http://icloud.com
    Your signature says you are using Leopard; you can set up Mail to access your iCloud email by following the process described here (be sure to use the instructions for Leopard where they are different from Snow Leopard):
    Entering iCloud email settings manually in Snow Leopard or Leopard

  • How do i get to be acct manager when I own the account?

    How do I get to be acct manager of number when I own the account. Should already be.  Who is it?

        joandix
    I definitely want to ensure you have the account access you need! Here's how to assign Account Manager status from the Account Owner's account: http://vz.to/1An22Nx
    RuthW_VZW
    Follow us on twitter @VZWSupport

  • How do i get an externally loaded movie clip to inherit the playhead position of the main timeline?

    Hi Flash experts, i'm hoping that someone can help me with this annoying problem.....
    I have been approached to design a configurator for a new television product. The Application will let users specify the colours of certain parts of the product and also attach addons, which then updates a cost total.
    In the main interface i have a looping animation of the product slowly rotating around 360 degrees that i rendered in 3ds max. When a user clicks a button on the interface i need to load an external movieclip on top of the main animation so it looks as though a certain part has changed colour, this i have acheived. The problem is that when i load the external clip over the original, the loaded clip starts playing from frame 1 and i need it to inherit the playhead position of the main animation so the two layered pieces look as though they are rotating as one. I'm sure this must be possible, unless i need to approach the problem in a different way?
    I hope this makes sense,
    Any help on this subject would be hugely appreciated.
    Many Thanks
    Matt

    Hi again Ned,
    I've almost got it i think, my code now looks like this....
    on (release) {
             var loader:MovieClipLoader = new MovieClipLoader();
             loader.loadClip("Bezel/Bezel_Red/Bezel_Red.swf",Empty_MC);
             var loadListener:Object = new Object();
             loader.addListener(loadListener);
             loadListener.onLoadComplete = function() {
             Empty_MC.gotoAndPlay(_root._currentframe);
    This code loads the external clip fine and i know the onLoadComplete listener is working because if i change the last line to: Empty_MC.gotoAndStop(1);
    it works. I think its just that last line: Empty_MC.gotoAndPlay(_root._currentframe); that is causing the problem?
    Many Thanks for all your help, it is greatly appreciated
    Matt

  • How do I get variable selections in output when I send the output to Export

    Hi Friends,
    I am working in Web Analyzer and I would like to export the values of the variable selection to excel along with the output for future reference to know this data belongs to mentioned variable selections.
    Is there any setting in BI to get this requirement?
    Thanks in advance,
    Sam
    Edited by: Sam Reddy on Feb 18, 2009 4:00 AM

    Hi,
    I agree we can do it in workbooks but our requirement is to make available this feature in web analyzer only.
    Do you guys have any other way to work around web?
    Thanks,
    Sam.

  • How do I get past "trial version expired", when I bought the software?

    On November 30, 2012, I purchased Photoshop CS6.  Today, February 27, 2013, I tried to lauch Photoshop, and it tells me that my trial version has expired.  But I bought it!!  What can I do to get Photoshop to run?

    http://forums.adobe.com/message/4799512

  • My iphoto program was messed up so I dragged it to trash and down-loaded it again. now when I open it , it says I can't open my library with my old version, use my new version.  How do I get to my new version when it is the only one there?

    My iphoto program was all messed up so I properly uninstalled it, I have a good back up.  When I reinstall iphoto from my iwork disc it installed Ok, but when I clk on the icon it says that my library is unavailable, use the new iphoto.  What is the problem?  If I go to applications the same thing happens, I can't access Iphoto!

    You reinstalled an old version of iPhoto after you updated your library to the newer version.
    Update ALL your software and try again.
    Click the Apple Menu at the upper left-hand corner of your screen and select "Software Update..."
    Repeat until it tells you there are no more updates.
    AND, launch the App Store application located in your Applications folder to see if there are any updates there as well.

  • How do you get Grab to activate.  When I click on it nothing happens; the icon simply rests in the dock..

    Perhaps it is a flaw in my software, but when I seek to take a picture of the screen, I access Grab through the untilities folder.  Instead of giving me options, the Grab logo simply goes onto my dock and rests there.  Clicking on it produces nothing.  Very frustrating.

    There is an alternative with key short cuts for screen shots:
    command shift 3
    command shift 4
    Maybe your Grab.app is corrupt.
    http://www.maclife.com/article/howtos/how_capture_screenshots_os_x%E2%80%99s_bui ltin_grab_app

  • How do I get firefox to save tabs when I quit the program? This doesn't appear to be available in 4.0

    On previous firefox version, when I quit the program, a prompt would ask me if I wanted to save tabs. That doesn't appear to be happening with 4.0 upgrade. Can I still save and quit?

    One change in Firefox 4 is to by default stop Firefox displaying the warning message, but it can be turned back on by changing some preferences.
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''browser.tabs.warnOnClose''', if its value is set to '''false''', double-click on it to change its value to '''true'''
    # Repeat this for these 3 preferences '''browser.warnOnQuit''', '''browser.warnOnRestart''' and '''browser.showQuitWarning'''

Maybe you are looking for

  • How do I restore my iphone to the last backup listed in itunes?

    In my attempts to import my voice memos into the new itunes 11, it asked to restore my iphone.  I restored to the defaulted backup.  All my voice memos and pictures are now gone.  I had been automatically back the phone up to icloud.  On itunes when

  • How do i add a 2nd iphone to my itunes account

    how do i add a 2nd iphone to my itunes account

  • Ipad 2 3G Cellular Data not working after update?

    Dear Apple First thing first you are teh number one in this world, there is no doubt about it and I am following apple since 6 years. I have a Apple iPad 2 Wi-Fi + 3G with cellular data. last night what I did I have updated my iOS on 3G Cellular  whi

  • How to render Tree in JSPDynpage

    Hi All, I am trying to display a HTMLB tree in JSPDynpage Project. I build the tree in Dynpage and passing it to the JSP via a bean. In the Jsp I could get all the valies including the tree from the bean. but when I set the tree to a Gridlayout's Cel

  • Email from Workflow.

    Hello Gurus. we have Work flow for Purchase order release strategy. Now in our customisation we have change the Agent id name. But work flow do not send any SAP Email to that Newly Agent id. Workflow works fine before changes in Customisation. I also