ScrollPane behavior

When I try the sample provided in the help doc (Flash 8,
Windows XP):
Live
Docs Sample
The behavior of the scrollpane isn't working correctly for
me.
It sort of works, in that if you don't play close attention
and arrow up and down, the image scrolls up and down, but pay close
attention to the scrolling. When the sample starts, the scrolling
"view" should be the top left of the image. If you click the "down"
arrow once, it should move the image "up" in the scroll pane. On my
system, nothing happens on the first click. On the second click, it
starts to behave "correctly" in that it will scroll the image up
slightly.
If I click the "down" arrow several times, then the the "up"
arrow an equal number of times to try to get back to the top of the
image, it won't scroll all the way. If you drag the scroll thumb,
you can make it go all the way to the top.
I get similar behavior with the horizonal scroll as well.
Anyone else see this?

Hello,
You've probably found a fix for this by now but I thought I'd
pass on my workaround anyway. I emailed macromedia (well adobe now)
and they said this is a known bug that they have no patch for.
Anyway after a lot of swearing, forum searches, breaking things and
sticking pins in scrollpane voodoo dolls I came up with this:
function scrollBugFix(targetPane)
var spListener:Object = new Object();
spListener.scroll = function(eventObject:Object):Void
var maxVPos:Number = eventObject.target.maxVPosition;
if (targetPane.vPosition == 0)
trace ("scroll - fixing top");
targetPane.vPosition = 0;
else if(targetPane.vPosition == maxVPos)
trace ("scroll - fixing bottom");
targetPane.vPosition = maxVPos;
// Add listener.
targetPane.addEventListener("scroll", spListener);
I've not done much coding and I don't really know why this
works - seems a bit bizarre finding out if something is zero and if
it is setting it to zero, but hey it worked for me so it might work
for you.
cheers
chris

Similar Messages

  • Strange scrollpane behavior

    Hi,
    I have a A.swf, B.swf and C.swf. B.swf is loaded into A.swf
    and it has a scrollpane, into which C.swf is loaded. When I test
    B.swf, everything works fine, but when I run A.swf, into scrollpane
    (B.swf) is loaded B.swf and into that scrollpane is loaded C.swf..
    Any ideas? What must do to prevent loading B.swf into
    scrollpane?THX

    THX for your reply. Now there's a new problem. If I load data
    from ASP, which creates XML, the scrollbar doesn't show, if I load
    data from XML file (xml is a copy of a xml crreated by asp), the
    scrollbar is visible. Really don't know what's its problem
    :-)

  • Strange alpha channel behavior in jscroll pane

    Hi,
    My first post here.
    I have been strugling for a while with a problem with alpha channel opacity and scrollpane. I basically have a JScrollpane that contains a JPanel with JLabels. The JLabels have a mouse action that changes their background to higlighted by using a color with an alpha channel.
    When a mouse is over a JLabel we call:
    public void mouseOver(){
              this.setForeground(Color.WHITE);
              this.setBackground(new Color(100,100,100,100));
              this.setOpaque(true);
    This works but with some strange rendering problems. Sometimes the "background" shows other parts of the screen insted of the correct background. This is kind of hard to explain so I took a screen shot that elaborates this.
    The correct behavior:
    http://www.rulli.org/~mravimo/seka/correct.jpg
    The wrong bahavior:
    http://www.rulli.org/~mravimo/seka/wrong.jpg

    I think there seems to some abuse of the 'opaque' setting in Java. Opaque, literally, of course, describes something through which nothing can be seen (if you can see through it, it's either translucent or transparent). That means alpha 0 is transparent, alpha 255 (for an 8-bit channel) is opaque, and anything else is translucent.
    ComponentUI uses 'opaque' to determine whether to paint the component background. This is where the semantics are broken: it should really query the background color to see if it's non-null and its alpha is non-zero, thus painting translucent colors as well as opaque. I think there is a good case for this being a Java bug if it's not already - though I'd anticipate the counter-argument being that it will raise issues with backward-compatibility ("if it's been broken long enough, don't fix it").
    The problem you're seeing, I suspect, is due to the same flag being used (semantically correctly) to help optimise the paint process (if something really is opaque then there's no point rendering underneath it).
    Unfortunately, fixing ComponentUI is a non starter since it can only be fixed by extension (multiply the number of components by the number of L&Fs and you're on your way).
    As a workaround you can extend JLabel and override paintComponent(); or plug in a specific label UI which fixed the ComponentUI problem; in both cases leaving the opaque setting at false.

  • Too big panel on a scrollpane

    hello!
    i create a panel with several small panels on it, so it is too big to display in my window. therefore i want to have it a scrollpane. this way:
    JPanel jp = new JPanel();
            jp.setLayout(new BoxLayout(jp,BoxLayout.Y_AXIS));
            for(int p=1;p<12;p++){
             posten rlist1 = new posten(p); // "posten" is a small panel
             jp.add(rlist1);
            JScrollPane sp =new JScrollPane();
            sp.setViewportView(jp);
            jPanel10.add(sp);jpanel10 has the scrolls on it, to scroll jp.. but the panel jp which is too big, laps over at top and bottom.
    hard to explain perhaps, here is a picture:
    http://www.cds-server.de/pub/jpanel.jpg
    what can i do to make it hide the too big parts?

    ok, it took me the hole day to find out that to reproduce this behavior it is necessary
    to have the underlaying panel with "free design",
    the next panel is with boxlayout . and there is the mess.
    therefore the code is not very short, more long, sorry for that,
    but it is the shortest way to show my problem:
    import javax.swing.BoxLayout;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    public class qqqq extends javax.swing.JFrame {
        public qqqq() {
            initComponents();
            JPanel jp = new JPanel();
            jp.setLayout(new BoxLayout(jp,BoxLayout.Y_AXIS));
            for(int p=1;p<12;p++){
             posten rlist1 = new posten(p);
             jp.add(rlist1);
            jp.validate();
            JScrollPane sp =new JScrollPane(jp);
            jPanel2.add(sp);
        private void initComponents() {                         
            jPanel1 = new javax.swing.JPanel();
            jPanel2 = new javax.swing.JPanel();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.LINE_AXIS));
            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 466, Short.MAX_VALUE)
                    .addContainerGap())
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 74, Short.MAX_VALUE)
                    .addContainerGap())
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(68, 68, 68)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(75, Short.MAX_VALUE))
            pack();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new qqqq().setVisible(true);
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
    //******inner class with panel****//////////
    class posten extends java.awt.Panel {
        public posten(Integer p) {
            initComponents();
            jLabel1.setText(p.toString());
        private void initComponents() {                         
            jPanel1 = new javax.swing.JPanel();
            jLabel1 = new javax.swing.JLabel();
            jTextField1 = new javax.swing.JTextField();
            jTextField2 = new javax.swing.JTextField();
            setLayout(new java.awt.BorderLayout());
            jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));
            jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
            jPanel1.setMaximumSize(new java.awt.Dimension(32767, 8));
            jLabel1.setText("Posten");
            jPanel1.add(jLabel1);
            jPanel1.add(jTextField1);
            jPanel1.add(jTextField2);
            add(jPanel1, java.awt.BorderLayout.CENTER);
        private javax.swing.JLabel jLabel1;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JTextField jTextField1;
        private javax.swing.JTextField jTextField2;  
    }

  • How do I suppress scrolling of a ScrollPane via MouseWheel ?

    Hi all!
    I'm trying to suppress the scrolling via MouseWheel if the user has pressed the control key at time of scrolling, but I'm not able to do it. It doesn't matter at which node I add the ScrollEvent handler. The problem is, the ScrollEvent handler gets only called if the scrollbar reaches the end or the start of the scrollbar, only then the event is triggered.
    I tried to disable the scrolling alltogether. I have set the method setOnScrolling(null) of the ScrollPane and afterwards I tried to replaced it with my own handler, but it didn't work.
    I use the JavaFX 2.0.2 SDK. It seems like there was a bug report that could be related to this [RT-17890|http://javafx-jira.kenai.com/browse/RT-17890]. If I use the deprecated MouseEvent.IMPL_MOUSE_WHEEL_ROTATED the handler gets called, but still I'm not able to suppress the scrolling if the control or any key is pressed.
    Did anybody observe the same behavior of the ScrollPane and ScrollEvent ?
    EDIT: Hmm. it seems like I have to add an EventFilter instead to an simple EventHandler.
    Edited by: user965407 on 26.01.2012 13:52

    it seems like I have to add an EventFilter instead to an simple EventHandler.Yes, that is right, catch the ScrollEvent in an EventFilter installed on the ScrollPane and consume the event if scrollEvent.isScrollDown() returns true.
    To better understand event handling see: http://docs.oracle.com/javafx/2.0/events/jfxpub-events.htm and Re: Understanding Mouse Event Bubbling

  • Prevent default behavior of events

    How can I prevent the default behavior of events?
    I know this concept from JavaScript or ActionScript where you could prevent the default behavior of an event by calling e.preventDefault().
    How can I achieve this in JavaFX?
    E.g. I have a KeyEvent on a TextArea and want to catch the Enter key and prevent it from positioning the cursor in the new line.
    I tried consume(), but it seems, it is the equivalent to e.stopPropagation().

    TextArea has a bug about mouse event handling: http://javafx-jira.kenai.com/browse/RT-17902, whereby the scrollpane enclosing the editable text eats events and so the events are not exposed to API users, not sure if this will also effect the key processing to the TextArea you are trying to perform. If the issue in 17902 is also causing the TextArea to not respond correctly to user defined key event processing, you can add an extra comment to that Jira to note it.
    Information on event handling can be found here: Re: Understanding Mouse Event Bubbling
    If TextArea event handling was working correctly, you should probably be able to do what you want by adding an EventFilter on the TextArea and consuming the event you want to capture. Doing this in an EventFilter so you can intercept the event in the capturing phase is preferable to trying to do it in an EventHandler during the bubbling phase. If try to consume the event in an EventHandler, it may not work because the event may already have been handled by the target node or the target node's children.

  • ScrollPane woes 2

    Hi,
    I try to
    attach a ScrollPane to a TextField with some text, but I
    have 2 bugs:
    The scrollBar is shown inside Flash
    testing movie environment, but not on the server, even when the
    text is long enough for a scrollbar.
    Even if there is no scrollbar, the
    textField is cropped (by some scrollpane obscure behavior).
    Thanks,
    Tal

    the 2 bugs I mentioned were cropped:
    1. Within flash test movie, i see the ScrollBar that is
    created by the ScrollPane just fine, but when I test this on the
    server, there is no ScrollBar, even if the text is long.
    2. Again, when I test this on the, the textField width is
    cropped. no scrollbar.
    Any idea what can cause this behavior?
    Thanks, Tal

  • Buttons in a scrollPane

    Hi,
    I have a hunch that this might be impossible, but as a flash
    novice, I'm hopeful....I have a scrollPane that is set to
    scrollDrag=true so I can drag the contents of the pane around using
    the mouse (ala Google Maps). The contentPath is an external swf
    that contains buttons. Everything works except for the buttons. I
    can see them, but can't click them. I have a feeling that since I
    have the scrollDrag parameter set to true the contents of the pane
    is acting like a button already therefore making the buttons within
    the swf unclickable, hidden from the mouse-buttons within a button.
    It works when I set the parameters to nav bars instead of the
    click-and-drag navigation, but I don't want nav bars.
    Is there a way to make this work?
    Any insights are most appreciated.
    Thanks!
    jd

    Jeff3d wrote:
    > How do I use buttons that are contained within a
    scrollpane? I have a long list
    > of buttons displayed in a scrollpane that is in a layer
    in "m-MCAS" that I
    > would like to use to navigate to frame labels within
    "m-MCAS"
    >
    > None of the below action scripts work, any suggestions?
    >
    > on (release) {
    > //Movieclip GotoAndPlay Behavior
    > _root.Trans-MCAS.m-MCAS.gotoAndPlay("Out2");
    > //End Behavior
    > }
    >
    >
    > on (release) {
    > //Movieclip GotoAndPlay Behavior
    > this._parent.gotoAndPlay("Out2");
    > //End Behavior
    >
    > }
    _root will do tho the problem lay in your naming of the
    clips.
    Flash consider - as minus so you basically try to minus Trans
    string from MCAS. Use underscore instead Trans_MCAS and make
    sure
    that the clip is present on the frame from which you trying
    to target
    it. Otherwise you can't find clip that is not present
    somewhere else
    on some other frame or scene.
    Best Regards
    Urami
    Beauty is in the eye of the beer holder...
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Accessing Button inside Movieclip/ScrollPane

    Hello all,
    I'm trying to understand how to build a button inside a movieclip.  I have a template that has movieclips within movieclips, and when I create a button (all using AS2) the button will work if I test the scene, but in the whole flash movie it does not work.  I also have some buttons located inside a ScrollPane that also do not call correctly.
    For my button I am using this code:
    facebookbtn.on (release) {
    getURL("http://www.facebook.com/","_blank","GET");
    ^ This is placed on the button "facebookbtn". I also tried using: _root.bgPages.pg1.facebookbtn.on (release), to no avail.
    For the one inside a ScrollPane I am attempting to call a javascript function:
    on(release){
         import flash.external.ExternalInterface;
         ExternalInterface.call("GroupDelegate","dayone1");
    ^ This also does not work, with or without the button name before on(release).
    I'm putting the FLA file here so that if anyone has the time, could help me with this quick problem. Thanks!
    FLA: Download FLA

    Do not place code inside objects with code on(blah2x). It will lead to unpredictable behaviors and besides it is bad practice. Centralize all your code on one frame in the timeline. Use this format on the main timeline:
    import mx.utils.Delegate; //declare at top only ONCE
    YourButton.onRelease = Delegate.create(this, YourFunctionCall);
    or
    YourButton.onRelease = function()
       //do your stuff here
    Do the same thing with the ExternalInterface. You can put the import at the top along with Delegate.

  • Rulers class with wierd behavior

    I have made a rulers class which draws horizontal & vertical rulers that uses Flass CC supplied scrollpane component to control the rulers movement.
    It scrolls with the scrollpane, It seems to respond correctly when the scrollpane content is scaled up, but when the content is scaled down, there is wierd behavior in that the rulers position does not match the scroll position. After the scrollpane is scrolled the rulers go to the correct position.
    I hope this problem makes sense. Anyway I am providing the files necessary so you can see it in action and maybe help me locate where I have gone wrong.
    http://www.rrobnettmusic.com/flash/rulers.zip

    Hey
    would you pls log a bug to https://bugbase.adobe.com/ ,  I’d happy to follow this issue with flash runtime engineer team there
    When adding the bug, please include sample code so we can quickly test this out internally.

  • PopupMenu in ScrollPane

    Hi All,
    At present there is a JButton and when I click the JButton, JPopupMenu will be dispalyed below the JButton (similar to the popup in combobox kind of stuff.....)I am adding many menu items in the JPopupMenu. Upto this everything is fine.
    But, I want to put all the menu items to a scrollable JPopupMeny.Like if there are many menu items then I have to put those items in the scollable popup so that I can navigate using scrollbar when there are many meni items.
    I think I can add a JScrollPane to the JPopupMenu and put a JList inside...But I havent implemented that and I wish to know whether I can finish this with JPopupMenu and MenuItems as I didn't like the solution I said :-).
    Thanks in advance,
    Jana

    Hi,
    Thanks for your reply. Yeah it will work fine. But I just want to know whether I can add MenuItems to some Menus and add that Menu to ScrollPane. Will it work? Beacuse at present I have a JPopupMenu with menuItems added to it. If I go like Combobox kind of implementation, then I have to do lot of changes in my code which may break the current behavior. So I want to do minimal changes. Is there any way?
    Jana

  • MDB Timeouts and transaction behavior

    Hi, thanks in advance for any help with this.
    We have a MDB where we have set the timeout to five minutes. In a particular case this timeout is being reached but even though the MDB times out the transaction and sends the message for redelivery the original transaction that was processing the message continues until something happens from an application standpoint to cause that original transaction to complete. This means that we have the same message processed twice under these circumstances.
    I would have expected that if a transaction timed out that the transaction would have been terminated and therefore our processing would have stopped. Is there a way to force this behavior or do we have to put an alarm in our code and kill ourselves such that we never encounter the transaction time out?
    Thanks,
    Sue Shanabrook

    I should have mentioned that we are using container managed transactions.

  • Unexpected Behavior error while creating a connection in IDT

    Hi Everyone,
    I have created a connection on top of a database using ODBC.
    I could able to see the connection in IDT.
    I have mentioned the user name and pw correctly  and tried testing the connection and got the error "unexpected behavior"
    PFA error.
    what could be the reason? any idea?
    Thanks.

    I find this 32-bit vs. 64-bit ODBC somewhat confusing.  I know you aren't dealing with Crystal Reports, but this blog post does provide some clarity.  It has a link to this Microsoft knowledge base article from which I quote...
    A 64-bit version of the Microsoft Windows operating system includes the following versions of the
    Microsoft Open Database Connectivity (ODBC) Data Source Administrator tool (Odbcad32.exe):
    The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
    The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.
    One other warning.  In my experience I have found that you cannot run both the 32-bit and 64-bit ODBC admin tools at the same time.  If you have one running and try and start the other one it will just bring up the one you already had running.
    To make sure I know which instance I am in at any give time I have created a dummy data source that corresponds to the instance; 32-bit or 64-bit.
    Let us know how it goes.
    Noel

  • Capturing DVCAM in FCP 6.0.2 and encountering strange capture behavior

    I have FCP 6.0.2 and OSX 10.5.2 and QT 7.3.1. I have been capturing several DVCAM cassettes using my Sony DSR-20 deck. Although I have done this countless times before in earlier versions of FCP, I am encountering some strange repetitive behavior. I am capturing 30 minute clips one at a time. When I use batch capture it will cue the tape up properly to the in point...and then start capturing until it gets to about 10-12 minutes in, and then capture unexpectedly stops, no dialogue box, the tape rewinds and starts capturing again from the original in point. On this second capture, the tape sails past the 10 minute mark and keeps going to the end of the 30 minute clip. It then stops, gives me the dialogue box that it has successfully captured. And it has.
    But every DVCAM tape I captured today exhibited the same behavior. Capture would be successful until about about 10 minutes in, then FCP aborts (no dropped frame message, no dialogue box) rewinds the tape back to the in point, tries again, and this time succeeds with the second pass capturing the entire clip. Note at the 10 minute mark there is no scene change or no camera start/stop.
    Have other users experienced this issue? And if so, is there a workaround or a possible patch forthcoming from FCP?
    Many thanks,
    John

    Yes, each tape has an in and out point defined. In my 6 years of editing with Final Cut and DVCAM tapes I've never encountered this issue before in the capturing process until now. I will have to see in future weeks with other captures whether this is an on-going issue or not, but at least I can capture for now.

  • Is there any way to add dynamic parameter in sql without breaking Server Behavior

    Hello, i'm building multiple language site.. i would like to know if there is possible way to add dynamic parameter in my query, without break the server behavior.
    For example:
    mysql_select_db($database_dxc_conn, $dxc_conn);
    $query_Recordset1 = "SELECT article.articleName, article.articleDesc FROM article";
    $Recordset1 = mysql_query($query_Recordset1, $dxc_conn) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    will become something like this:
    $additionalSQL=", article.articleName_en";
    mysql_select_db($database_dxc_conn, $dxc_conn);
    $query_Recordset1 = "SELECT article.articleName, article.articleDesc $additionalSQL FROM article";
    $Recordset1 = mysql_query($query_Recordset1, $dxc_conn) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    this is just an example, my real scenarion is far more complicated than this... however this kind of approach break the server behavior and force to do hand-coding...
    i would like to know if there's better way to do such thing like this...

    viktor.iwan wrote:
    Hello, i'm building multiple language site.. i would like to know if there is possible way to add dynamic parameter in my query, without break the server behavior.
    Server behaviors are simply bits of boilerplate code automatically generated by Dreamweaver. Editing the code doesn't "break" it (unless your edits are badly written). However, once you edit the code, Dreamweaver no longer recognizes it, so you lose the ability to drag recordset results from the Bindings panel.
    If you want to edit server behavior code, the best way to handle it is to lay out your page as you want, using the Bindings panel. Once everything has been done, only then edit the server behavior code.

Maybe you are looking for

  • Satellite L500-21T - Stop error code when installing Windows 7

    Hello I bought a notebook Satellite L500-21T from saudi arabia. I lost the hd recovery during trying fix windows 7 installation. If I try to install windows 7 I get stop code 0x0000009c error. If I turn sata to compitibality from AHCI Windows xp sp2

  • Lost ability to right click multiple files and choose 'open with'

    In XP I can select a bunch of mp3 files, for example, right click and choose 'open with...' whatever application I want. In windows 7 I only get 'open with' in the context menu on single files. How do I enable 'open with' for a selection of files? Pl

  • CLIENT-CERT authentication in WL7

    Hi, I'm trying to enforce two-way authentication for clients (java applications) accessing a web service running on WL7. Web service is configured to accept requests over https only. With BASIC authentication it works. When I switch it to use CLIENT-

  • Lookout 6.0.2 modbus rtu problem?

    One of our customers has Lookout 6.0.2 communicating with several CMI Scada Packs over wireless modems using Modbus RTU protocol. Suddenly last Friday night he got comm fail alarm pages on all but one site. The  Modbus statistics window revealed that

  • Distribution model required for LS to KU ?

    Hi Guys, In BD64 we can create distribution model ONLY with LS to LS. So iscenario like LS to KU  system is not allowing to create Distribution Mode because the recepient is KU (not LS). So how does the system(MSTER_IDOC_DISTRIBUTE) will determine wh