How can I get my slider to move when I click on the Groove

TheI created a simple movie, Adobe Flash, which is to act as a slider control. The code I've written is shown below. I am able to grab the slider and move it to any position on the Groove, but I also want to be able to click anywhere on the Groove so that the cursor will jump and lock in this position.

I created a function:

groove_1.OnMouseDown = function() {}
trace ("you clicked on x = ' + this ._x");

slider_1._x = this ._x;
}

the problem is that this coordinated ._x returns the left edge of groove_1 and not be set that the user has clicked on this control.

Can someone tell me how to get this information out of the mouse to the bottom of the 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

You probably want to use either:

slider_1._x = _xmouse; allure of mouse position

OR

slider_1._x = groove1._xmouse; position of the mouse on groove1

I think the first applies because your cursor is based on the position of groove1, but haven't thought far through it.  At least you know that you must use the mouse position to determine where you clicked.

Tags: Adobe Animate

Similar Questions

  • How can I get my open android phone content (by clicking on the icon does not work)?

    Phone is connected to the usb port. Icon appears at the bottom of the screen w others. Appears only in the area of printers & peripherals. Thank you.

    Hello

    1. have you installed the software for android phone?

    2. what operating system is installed on your computer?

    What version of the operating system Windows am I running?

    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    3. the phone recognize in Windows Explorer and the Device Manager?

    Open the Device Manager

    http://Windows.Microsoft.com/en-us/Windows7/open-Device-Manager

    If the device is not detected in Device Manager, you can run the fix of the article.

    Hardware devices do not work or are not detected in Windows

    http://support.Microsoft.com/mats/hardware_device_problems/en-us

  • How can I fix mf_status.exe error messages when you click on the button stop?

    • The exact error message:

    The instruction at 0x00000000 referenced memory at 0x00000000. The memory could not be read.

    Click on OK to terminate the program.

    • Operating system Version &:

    Windows 7 Home Premium

    Service Pack 1

    System manufacturer: TOSHIBA

    Model: Notebook

    Note: 4.1 Windows Experience Index

    Processor: AMD Athlon (TM) II Dual-Core Processor 2.10 GHz

    Installed memory (RAM): 4.00 GB (usable 3.74)

    System type: 64-bit Operating System

    Pen and touch: no pen or press enter is available for this view

    • Version of the browser &

    Internet Explore 10

    Version: 10.0.9200.16540

    • No software or hardware that I recently installed or deleted

              MediaFire Express BETA for Windows

    Version: 0.15.4.4888

    • Any recent changes I made to the system

    I accidentally click the disk wiper in CCleaner. Does this affect my system?

    • The things that you have already tried to solve the problem

    http://www.pcmaxutilities.com/wikidllfiles/mfstatus-exe-error-fix-Guide.html

    I also downloaded: MFStatus.exe files repair tool

    Any help will be much appreciated. Thank you! :-)

    Hey Ken, COLIENNE,.
    Let me to interfere here because I met the same problem, and I followed method 1 suggested by jojo.
    And the problem comes from MediaFire Express, even if it is not in beta for me.
    Windows Vista SP2.
    Hope I helped a bit...
    Sincerely,
    Bertrand

  • How can I get rid of several clear green empty frames in the video that I just imported to iMovie?

    How can I get rid of several frames white green clear in the video that I just imported to iMovie (9.0.4)?

    I can not just delete them because this would create a rupture in the audio (I need) that will

    along these blank frames. What 'stretching' the last good image while keeping the audio?

    Thank you for all the ideas, your time and patience. I am new to editing.

    W.W.

    Have you tried to add a freeze frame to the position of the last good image?

    Place the cursor in the timeline panel on the frame that you want to extend, and then ctrl-click, select 'add a free framework '. Adjust the handles to resize the fame of gel.

    How can I get rid of several frames white green clear in the video that I just imported to iMovie (9.0.4)?

    You use iMovie 9.0.4 or the imported movie created in iMovie 9.0.4? I don't know what version you are currently using.

  • How can I get audio to not start when the button is clicked?

    I am new to adding audio to slides, buttons, click boxes.  Import the recorded voice on the overall slide of files sounds easy enough.  However, there are several buttons that display a legend I want audio to not start when the button is clicked.  I added audio just for this button, but it starts when the slide begins.

    How can I get audio to not start when the button is clicked?

    Hello

    Audio playback when the assigned object with the audio appears. That's why hear you when the button appears.

    Try to assign audio instead to the object that is displayed when you click the button. Perhaps the legend.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • How can I get my tab open all when update my firefox?

    now I'm still using very old Firefox 3.6.12 and I want to upgrede. I always using "save and exit" to my tab all open when quitting and not using bookmarks. total approximately 300 + tab open.
    I already try to upgrade my tab and once all is lost. and because of that I do system restore and reintall with old new.

    How can I get my tab open all when update my firefox?
    Sorry my English is a mess...

    already installed, but all the connection site became logout.
    and when right-clicking, page list too...
    and when I choose open in new tab or windown and something else happened...
    loading longer become page (already stop the other tabs)
    and when I block a text/link and drag it to the input tab or the navigation text or input search nothing happenend too...

    and when I close it, no other choice to save and exit...

    Edit:

    Resolved:

    1. Save and quit already solved with the help of addons.

    2. right click and drag the problem is already solved, I close firefox and restart.

    unsolved:

    1. all the connection still in State of disconnection site (can't stay as before connection).

    Edit:

    unsolved:

    2. on option, the images block list is missing.

  • How can I get rid of those annoying banners just below of the search window?

    How can I get rid of those annoying banners just below of the search window?

    Change your home page to a non-firefox one. If you want google as home page, follow these steps:

    1. Go to google.com
    2. Click on the Firefox button, go to Options | Options | In general.
    3. Make sure it says 'show my homepage' in the drop down at the top and then click on the button called "use current Pages".

    I don't see what Mozilla strives to accomplish by posting this childish junk.

  • How can I get Google to be default when I opened top-a-new-tab? Should what modules I install? Thank you, Alan

    How can I get Google to be default when I opened top-a-new-tab? Should what modules I install? Thank you, Alan

    You are welcome.

  • How can I get my menu bar on my macbook pro? The dock also disappeared. I know I have to take my pointer upwards (or downwards), but it's a waste of time and that bothers me. Its only happens on Safari, and not on other applications.

    How can I get my menu bar on my macbook pro? The dock also disappeared. I know I have to take my pointer upwards (or downwards), but it's a waste of time and that bothers me. Its only happens on Safari, and not on other applications.

    You could try starting in safe mode:

    • Try safe mode if your Mac does not end commissioning - Apple Support

    Which can allow additional troubleshooting.

    Also, sometimes there may be a hardware problem which may help a SMC reset with

    Depending on the cause:

    • Reset the management system (SCM) controller on your Mac - Apple Support

    You can try the test equipment to see what appears in the results:

    • With the help of Apple Hardware Test - Apple Support

    Other options include an appointment with a genius of Apple Store or a

    service provider authorized Apple for the device inspected, diagnostic tests, etc.

    There may be system software or hardware problems, in order to solve the problems with the aim

    to see what the cause, can take time. If you have a backup in Time Machine &

    end by using OS X Recovery to see OS X Utilities usage, disk utility or

    other functions, be aware that this can make the more advanced features; It may not need.

    Because this question appears as a symptom in Safari, which makes it more curious.

    • Stop the pop-up ads and advertising on Safari - Apple Support

    http://etrecheck.com/ http://www.adwaremedic.com/index.php   

    There may be a weird extension in Safari that may relate to some adware or other

    elements, so this is another issue to consider. a report of Etrecheck may tell you if

    some candidates are there; but maybe not. I do not primarily use Safari

    so, my other two browsers work slightly differently.

    Good luck & happy computing!

  • How can I get back Admin rights no one has them on the computer?

    How can I get back Admin rights no one has them on the computer

    IIRC, you cannot delete the built-in account named 'Administrator', so check first to see if it's really over:

    If you have XP Pro, then press CTRL + ALT + DELETE twice at the Welcome screen

    If you have XP Home (or XP Pro), restart mode without fail (repeatedly press F8 startup just after reboot) and the administrator account must be indicated on the Welcome screen.

    Unless you have changed it, the password for the built-in Administrator account is blank (no password).

    Once you sign in as an administrator, go to control panel > users and create a new account with administrative privileges (or give these rights to an account existing).  Do not use the built-in for common daily tasks administrator account.

  • How can I get my HP Color Lasejet 8550N to connect to the home network in Windows 7 Pro?

    How can I get my HP Color Lasejet 8550N to connect to the home network in Windows 7 Pro?

    Hello

    Based on this and that is not a printer ready network. Has a network card?
    Another thing, you need to consider: HP does NOT support Windows 7 (for her) so you have to get this first.

    Good luck.

  • How can I get a list of jobs that are planned for the days of the future

    How can I get a list of jobs that are planned for the days of the future?

    In a previous article, I found a query that lists the scheduled tasks that are already running. Can I get a similar request for the future days which is compiled?

    Hi sreedevir,

    SELECT jobmst.jobmst_prntname, jobmst.jobmst_name, jobrun.*

    FROM jobrun JOIN jobmst ON jobmst.jobmst_id = jobrun.jobmst_id -joining tables jobmst and jobrun

    WHERE jobrun_proddt > = dateadd (dd, 1, datediff (dd, getdate())) 0, -future dates

    AND jobmst.jobmst_type = 2 -given jobs (and not groups)

    ORDER BY 1, 2 -Sort by name of the parent, then by task name

    Feel free to make any changes to your reporting needs

    ARO

    The Derrick

  • How can I get my ink level automatically when I go to my eprint application

    How can I get my ink level automatically when I go to my eprint application

    The Hp printer control application is the only application that allows you to check the ink levels. This application is only available for iPhone, iPad and iPod touch IOS devices. To check the ink with app levels you must select the printer and supplies info.

    I hope this helps.

  • How can I make a clickable object, and when I click it, it moves down another object (extend)?

    How can I make a clickable object, and when I click it, it moves down another object (extend)?

    Only with a specific widget. Check the usual sites, if is not the default widgets menu and the accordion.

    Mylenium

  • How can I get my rear plug ins when adobe updates cc?

    How can I get my rear plug ins when adobe updates cc?

    You need get the respective compatible installation CC 2015 programs from the vendors.

    Mylenium

Maybe you are looking for

  • Future of Final Cut

    A professional editor told me that, in Montreal, all the television channels who has already worked with Final Cut migrate to Adobe Premiere. He told me that the reason for this is that apple may have wanted to develop their editing software and he's

  • Satellite L40 - 18Z: warnings of Tempo that 75% of the memory has been used

    My dad recently bought a satellite L40 - 18z. Tempo began to give warnings that 75% of the memory has been used.When I checked there a 74 GB HDD with 3 partitions top - 1.46 GB (which I assume is the recovery partition), GB 37.26 labeled 'Vista', con

  • HP Pavilion 500-314: big problems by adding an external video card

    You are looking for assistance. I recently bought a HP Pavilion 500-314.  Specifications are the following: http://support.HP.com/us-en/document/c04293928 The unit includes the integrated graphics card Radeon R7 and comes with a 300w power supply I b

  • Adding libraries to Visual Studio 2012

    I'm practicing to re write the example on http://na.tm.agilent.com/pna/help/WebHelp7_5/Programming/GPIB_Example_Programs/Getting_and_Putting_D... but I seem to have a problem in adding the reference ("GPIB") 488.2 to Visual Studio Express 2012. Docum

  • Photo smart scan 5520: 5520 to any electronic

    Scan to e-mail. Everything works, I get the email, but there is no attachment.