Control over the scrollPane component.

Gidday
I've got some moveieClips in container in a scrollpane component.
The movieClips are draggable.
I'd like to add extra functionality where if an item is dragged and touches the bottom of the scrollpane, it automatically scrolls up, and the reverse if you touch the top with a dragged object.
I tried the scrollDrag, but I only want it to scroll once the dragged item touches the bottom or top.
So I wrote this and put it in the drag function:
    if  ((this.hitTestObject(MovieClip(this.root).rowsHolderTopLine))  && MovieClip(this.root).rowsHolder.y < 200)
            trace(MovieClip(this.root).rowsHolder.y);
            MovieClip(this.root).rowsHolder.y = MovieClip(this.root).rowsHolder.y+10;
            this.y = this.y-10;
It needs a bit of work, and I think I can get it working, but the one thing I'm stumped on is how to make the scrollbar move too.  Is there a way to communicate with the component using code (I created this component from the component inspector)?
Thanks
Shaun

OK - I think I've got it:
MovieClip(this.root).playlistScrollPane.verticalScrollPosition = MovieClip(this.root).playlistScrollPane.verticalScrollPosition-10
this.y = this.y-10;
Needs a bit of work, but it's on the right track.
Cheers
Shaun

Similar Messages

  • Controlling content height in the scrollpane component

    I'm using the scrollpane component to display content, within
    the content movie clips, are swf animations that are being imported
    using targets. Some of the animation's parts go far beyond the
    height of the stage, causing the scrollpane to adjust for the
    height of the imported swf, as opposed to the height of the content
    movie clip. How can I fix this?

    The content clip's size is determined dynamically by what
    it's content is at any given time. If you change the content, there
    is every reason to expect the content clip's size to change as
    well.
    If you do change the content of the scrollpane, you need to
    redraw (Flash 7+) or refresh (Flash 6) the pane after the new
    content is loaded.

  • Want total control over the size of a button

    What do I do if I want to control the size of a button completely and not let something else do it for me automatically? What layoutmanagers allow me to completely control the size and which do not?

    For total control over the button size, call container.setLayoutManager(null). This, however, disables all automatic layout; not only will you have control over the size of your button, you'll have control over its position and the size and position of all other components in that container. You'll also have the responsibility to set them.
    While this is desirable in some circumstances, you normally want to use a LayoutManager. These managers allow your code to be modified with greater ease and handle a lot of the work for you.
    You can always call jbutton.setPreferredSize(new Dimension(x,y));[b] to attempt to communicate to the LayoutManager the size that you would like the button to be. [b]jbutton.setMinimumSize and jbutton.setMaximumSize are also useful. (These calls assume the existence of a field jbutton which contains an instance of the class JButton.)
    These, however, only work if the LayoutManager honors your requests; it is quite possible for a LayoutManager to ignore your sizing requests on the objects it is laying out. Most of the managers that Sun provides respect the requests their users make, but many third-party LayoutManagers aren't capable of doing so for one reason or another.
    Yet another solution is to write your own LayoutManager. The interface is relatively simple. I personally have been working on a project in which a workspace allows users to move components around. Because of this, the component has to stay where the user put it, although its size should be adjusted according to its needs. I had to write my own LayoutManager for this because none of those that Sun provided properly suited my needs.
    Which way would you like to tackle this?

  • C7280 - Cannot scan. Error message says another program has control over the device

    I opened the HP Device Manager to do a scan. I accepted the settings and the scan started. But part way through the scan, I stopped the scan as I realized that I wanted to change the resolution. I quit the Device Manager  and restarted it but when I did, I got an error message saying:
    "The function you have requested cannot be performed because another program has control over the device".
    I don't have anything else open and so I can't work out what program has control over the printer.
    C7280 Prtinter. Mac OSX 10.7.
    This question was solved.
    View Solution.

    I was thinking that if you stopped the process in mid-scan that there may be some background processes still running. Rebooting usually stops those processes.
    No, you will not have to do this each time.  Next time, though, it may be easier to just let the scan complete and the do another scan at whatever setting you want.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Playback control over the video live.

    I can not to see playback control over the video live.
    I have to image attachet that I do not can to see.
    can you can help me?

    There is a freeware out there http://www.download3000.com/download_5285.html

  • Capture a user's mouse control over the player

    There is video streaming using RTP to the QuickTime viewer in a web page
    The major issue is that the z-index of the player seems to be infinite, not allowing mouse events to be captured over the top of the player
    Is there anyway to get around this? I'd like to use javascript to *capture a user's mouse control over the player if possible.*

    mgulesian, you might want to query the system properties.
    System.getProperty("user.name")Please note that this property is subject of security constraints (and there're good reasons for this, read the Java Tutorial, Trail: Essential Java Classes, Lesson: Accessing System Resources for details). For example, web applications running inside Tomcat are not allowed to query this property by default. Think twice before doing this, you have been warned!
    HTH, Markus

  • What would be the simplest way to view and take control over the internet?

    Hi All:
    Can some one tell me what would be the best and simplest way to connect from my laptop to another laptop through the internet?
    I have DYNdns running on the second laptop and have a host name assigned to that system for it to update the IP since the system uses different internet connections. The services that I would like to be able to have are the viewing and controlling of the system. I've read some where in this NG that if I have a copy of ARD admin. installed on that system also, it would be one way to do it... can some one verify this and please let me know if there are any specific settings I need to have on either one of the systems.
    I can connect to the second laptop while in my home network with no problem and perform all tasks. when trying to connect through the internet.. the system shows offline .
    Both systems are identical in hardware an software, Intel 2.16, 2G's RAM, OS X ver 10.5.2 all up to date and ARD 3.2
    Yes, I'm new to ARD and yes I'm searching the NG and the net. but I figure it doesn't hurt to ask since time is limited.
    All help greatly appreciated ..
    TIA
    Oscar A.

    To be able to connect to a workstation from outside it's network, the ports that ARD uses must be open on both ends of the connection. ARD uses ports 3283 and 5900 so those must be open.
    If your workstations get their addresses from an NAT device rather than being "real", the ports also need to be forwarded in the router to the workstation's internal IP address. ARD uses port 3283 for the reporting and updating function, so if your Macs are getting their IP addresses through NAT, since you can only forward a port to a single workstation, you can only get reports, push package/files to etc. for a single workstation.
    ARD uses the VNC protocol for observation and control, though, and there are a range of IP addresses for that protocol, starting with 5900. ARD uses 5900 by default, so that port would be forwarded to the first workstation. You would, I believe, need to install VNC servers on the systems (since the ARD client cannot listen on any port other than 5900 while VNC servers can be set for other ports such as 5901, 5902, etc. You would then forward 5901 to the second workstation (and on to 5902, 5903, etc.). You can then use the following information:
    Remote Desktop 2: How to specify a port number for a VNC client
    to connect.
    The only other options are: 1) to run the ARD administrator on a workstation on the network, and then take control of that system from outside, either via VNC or another copy of ARD, or 2) set up a virtual private network (VPN) so that when you connect from outside, your admin system is officially part of the local network.
    Hope this helps.

  • Remote control over the Internet?

    Hi,
    I was under the impression that there was a way to use Zenworks to
    remote
    control via the Internet.
    I'm a consultant and support several NetWare 6 installations and would
    love to be able to use Zenworks to support my clients from here.
    The only way I have seen so far is either to remote control a
    workstation
    with something like PC Anywhere and run Console One remotely.
    Did I miss something?
    Is anyone doing this? How can I do this?
    Thanks
    Willem

    you're probably thinking of ZfD4.x, where you can remote control by
    just specifying the IP address.
    Shaun Pond
    Novell Support Connection SysOp

  • I have problem when opening a pdf page, my mouse control is hijacked to that tab when im on other tab, i cant scroll or use the middle rollling button, i have to click at the pdf tab then my control over the mouse middle button is restored.

    I think I have this problem even on earlier version. The thing is I set open link in new tab and not switch over to the opened tab. My habit is to open a pdf page in the background and let it load first. What happen is that when the pdf page finished loading ( i do not set to download it), it hijacks my middle mouse button control. When i scroll down or scroll up on my original tab, it wont scroll on the tab, but insttead it scrolls on the pdf tab. I have to click on the pdf tab, then i can use the scrolling function on other tabs back. As for when i opened several pdf tabs, it seems i have to click on the tab that just finished loading, that means several times until they all finish loading. It has been getting on my nerve lately. And all pdf trouble i search from google led to unable to open pdf, firefox hang or crash when opening a pdf and the likes.

    core-el, i don't see the advantage of that or i can't figure out how i'm supposed to use it. for starters, i have to click the mouse in order to get "add bookmark here" to open, which is no different than clicking on the star in the location bar, or right-clicking on the page. there are also options in the bookmarks toolbar, but they all require clicking the mouse & holding down the right button, etc.
    my goal is to use keystrokes only. typing on the keyboard, using both hands, using the space bar & my left pinky finger to tab over are all painless routines for me. as soon as i have to take my fingers off the keyboard & use the mouse, the pain begins.
    as i said, in older versions of firefox, all i had to do to bookmark a page was click ctrl>d, then tab over & arrow down, when appropriate, to find the folder & add the bookmark. for me, as a touch-typist whose speed is between 60 & 80 wpm, this is lightning fast.
    if i have this wrong, please correct me. i just see it as more mouse clicks that don't save me time or pain.

  • Better control over the creation of thumbnails

    While i have nothing against the current method of generating thumbnails with ADDT, I feel we need better controls as to how our thumbnails are created. By all means, the current option of generating thumbnails on the fly can remain, but I feel we need a tab on the image upload behaviour that allows us the developers to determine how our thumbnails are created.
    This will mainly happen during the image upload process. For example, in order to get uniform thumbnails, a developer could decide that he wants to crop his thumbnails to a certain size so that they can look good in a gallery. This i feel will come in pretty handy for those who are using Spry to create a photo gallery. At the moment, the one way you can create thumbnails on upload is to create a custom trigger and enter the required code to be executed after the file has been uploaded.
    So this feature will be welcomed i feel by many who are not too happy with the current method of generating thumbnails.

    I agree.
    Well said Emmanuel since the ADDT thumbnails are only created when requested by the display thumbnail server behavior. So some additional flexibility would be welcome. For example, when you do not wish to use the server behavior. Till then, we just have to use a custom trigger and to some ADDT users, thats advanced stuff.
    Cheers.

  • Can FireFox addons maintain state, inspect tab content and have control over the browser independently?

    Hello,
    I have a question about developing FireFox extensions, i.e., what exactly are they capable of.
    I'd like to automate my work on a certain web application, that spans across multiple sub-pages on a single domain (just like a regular website).
    Will a FireFox addon be able to control the browser's behavior? I.e. will it be able to follow links and keep its internal state separate from the web document? (E.g. I am pretty sure Google Chrome extensions sometimes restart themselves once the page they were working on is reloaded.)
    Basically I would like to create an addon/extension that has some internal state, is able to interact with the web page, and is able to reload the webpage/do whatever it likes in the tab.
    Can FireFox addons/extensions do that?

    Try to ask advice at the MozillaZine Extension Development forum.
    * http://forums.mozillazine.org/viewforum.php?f=19
    You need to register at the MozillaZine forum site in order to post at that forum.

  • Control over the Additional Names

    The setting of Additional Names is confusing.  Where does Logic pull the information from when Automatic is selected
    The only way that I have found to get rid of the name in the setting box, for example in the screen shot above, was to Click and choose Reset Channel Strip, which erases everything, then choose undo to bring everything back without the a name.  Is there some other way to do this??? or is this the logic of Logic.  I find the Additional Names useful when looking for the source of a side chain on an effects preset.  Are there other uses???

    Hi,
    You can write a validation
    thnks

  • Are there any controls over the yellow cycle bar?

    Hello to all! I wonder if there are any means [shortcuts] of getting the yellow cycle bar to be placed at any chosen point of one's track? Presently I am using the cursor to drag and place it at the desired place, and also have to tug at its ends to resize it. Having become used to FCPX's 'shortcuts' which are so easy to use, I would love to know whether there are any shortcuts to place the yellow bar where we want it [say, place the skimmer at that point and click upon the mouse!]

    "You can drag songs".  Mac 101.  That was the key.  I immediately dragged my "Bluegrass" Smart Playlist into the Up Next box and "Viola"! 
    Thanks. 

  • Do we have control over the download path for firefox android ?

    I'm using Firefox in android , I need to change the download path , where the files I download from Firefox are getting saved. How can I do that ? I don't see any settings for that .

    See https://support.mozilla.org/en-US/questions/1008534#answer-597769

  • Is there ANY way to have a static widget over the top of a question slide?

    I have a popup reference widget that I made and put it in a master slide and set it to ply on top, BUT if I add it to a question slide, the text from the question shows over it.
    Any way to have a widget always be on the absolute top?
    Click on the MSDS tab at bottom reveals popup, but the question text appears over the widget even though it is in a master slide set to shop on top.
    Ideas?

    Once your widget is on the slide, it has complete control over the display tree. So what you can do is to move up the parent hierarchy until you find the slide (parent.parent.parent) and then re-parent yourselft or you popup window on top of the hierarchy by just calling addChild(). That works well for the static widgets. You just need to deal with the position being different on the slide so you'll have to juggle with localToGlobal() and globalToLocal().
    Whyves
    www.flash-factor.com

Maybe you are looking for