Flex 4.6 Mobile Scrollbar optimisation prevents setting scroll position?

Hi All,
With the release of flex 4.6 , it appears the mobile version of the scroller has been optimised. Now the scroller defers creation of the scroll bar until the user interacts with the scroller.... Which all sounds good performance wise, faster page creation etc...
But if I want to move the scroller position before the user has interacted with the object , IE to jump to particular position before they start scrolling, I'm not sure what to do. Orginally I would have done something like...myScroller.horizontalScrollBar.value = 100 ... but of course myScroller.horizontalScrollBar is now null.
Am I missing something - is there another way.
J

Ok found a work around...
I extended the scroller class and added a couple of functions like...
public function scrollerCreateHScrollBar():void
    if ( !this.horizontalScrollBar && this.horizontalScrollBarFactory)
            this.horizontalScrollBar = HScrollBar(this.createDynamicPartInstance("horizontalScrollBarFactory"));
            Group(this.skin).addElement(this.horizontalScrollBar);
            partAdded("horizontalScrollBar", this.horizontalScrollBar);
then called to create teh scoll bars when I want them...
Hurra.
J

Similar Messages

  • JScrollPane - can you set scroll position?

    I have a JList loaded into a JScrollPane, and I call a method that highlights a row of the JList, but I can't figure out how to get the JScrollPane to scroll down.
    Is there a method where I can manually set the scroll position? I looked at the documentation online and didn't see anything like that.
    Thanks.
    -Mark

    You need to get a reference to the JScrollPane's JViewport
    myPane.getViewport();
    Then on the viewport you can call one of these.
    scrollRectToVisible(Rectangle contentRect)
    setViewPosition(Point p)
    Cheers,
    Rachel

  • How to get/set scrolling position in Frame?

    Hello!
    Help me please!
    I need to remember scrolling position of frame before it's reloading. And restore this position after reloading. How can I do it?
    I Use JDk 1.4.1
    Thanks beforehand!
    Denis.

    Have you tried the following:
    yourScrollPane.getVerticalScrollBar().getValue()
    yourScrollPane.getVerticalScrollBar().setValue(int)Sai Pullabhotla

  • How can I prevent scroll position changes

    I have a master detail page.
    during insert data in detail form user must scroll down.
    after opening an lov page scroll will change automatically(go to top of the page) and user have to scroll down again for fill next fileds in form.
    how can i lock automatically scroll ? or how can i prevent these scroll position changes.
    tnx
    Edited by: user12052968 on Oct 18, 2009 12:36 AM
    Edited by: user12052968 on Oct 18, 2009 12:41 AM

    Hi,
    Do you have anything in KEY-LISTVAL trigger? If not, create a KEY-LISTVAL trigger (for the item), and do something like this.
    declare
    cur_rec number;
    begin
    cur_rec := TO_NUMBER(:SYSTEM.CURSOR_RECORD);
    SHOW_LOV('<YOUR_LOV>');
    go_record(cur_rec);
    end;The idea is, preserve the current record position before showing the lov and then go to that position after showing the lov.
    -Arun

  • Problem in setting desired position for JPanel in JScrollPane!!!

    Dear Friends,
    I am having problem to set desired Scrollable(JScrollPane) JPanel position. I have a JPanel in a JFrame which is scrolable with lot of objects. It automatically displays on the top position inside JScrollPane, I want to set scroll position on the middle for the panel.
    I went through the search for the same in this forum, i found some posts related to this but they are linked with JTextArea(setCaretPosition). With JPanel i can't set caret position.
    Could anyone guide me how to set the scroll position on middle.
    Regards..
    Jayshree

    Replace:
    if(view.getValueAt(row,column) instanceof ImageIcon){
            ((Component)view.getColumnModel().getColumn(column).getCellRenderer().
            getTableCellRendererComponent(view,view.getValueAt(row,column),true,true,row,column)).setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          else
            ((Component)view.getColumnModel().getColumn(column).getCellRenderer().
            getTableCellRendererComponent(view,view.getValueAt(row,column),true,true,row,column)).setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
          }with:
    if(view.getValueAt(row,column) instanceof ImageIcon)
            view.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          else
           view.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

  • Facebook actionscript API not working with Flex 4.5 Mobile Project

    Will the following API work in a Flex 4.5 mobile project?
    http://code.google.com/p/facebook-actionscript-api/
    I tried a simple Facebook.int() and I keep getting the following error...
    Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.
    at Error$/throwError()
    at flash.external::ExternalInterface$/addCallback()
    at com.facebook.graph::Facebook/init()[C:\Users\MikeHunt\Work\facebookGraphApi\api\com\faceb ook\graph\Facebook.as:599]
    at com.facebook.graph::Facebook$/init()[C:\Users\MikeHunt\Work\facebookGraphApi\api\com\face book\graph\Facebook.as:165]
    at views::LoginView/init()[/Users/edgar/Documents/Adobe Flash Builder 4.5/socialMessenger/src/views/LoginView.mxml:15]
    at views::LoginView/___LoginView_View1_initialize()[/Users/edgar/Documents/Adobe Flash Builder 4.5/socialMessenger/src/views/LoginView.mxml:3]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\co re\UIComponent.as:13128]
    at mx.core::UIComponent/set processedDescriptors()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent .as:1871]
    at mx.core::UIComponent/initializationComplete()[E:\dev\4.5.1\frameworks\projects\framework\ src\mx\core\UIComponent.as:7660]
    at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7639]
    at spark.components::View/initialize()[E:\dev\4.5.1\frameworks\projects\mobilecomponents\src \spark\components\View.as:990]
    at views::LoginView/initialize()
    at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\ framework\src\mx\core\UIComponent.as:7485]
    at mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7189]
    at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\ spark\src\spark\components\Group.as:2037]
    at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\project s\spark\src\spark\components\Group.as:1628]
    at spark.components::Group/addElementAt()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\c omponents\Group.as:1387]
    at spark.components::Group/addElement()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\com ponents\Group.as:1345]
    at spark.components::SkinnableContainer/addElement()[E:\dev\4.5.1\frameworks\projects\spark\ src\spark\components\SkinnableContainer.as:761]
    at spark.components::ViewNavigator/createViewInstance()[E:\dev\4.5.1\frameworks\projects\mob ilecomponents\src\spark\components\ViewNavigator.as:1954]
    at spark.components::ViewNavigator/commitNavigatorAction()[E:\dev\4.5.1\frameworks\projects\ mobilecomponents\src\spark\components\ViewNavigator.as:1867]
    at spark.components::ViewNavigator/commitProperties()[E:\dev\4.5.1\frameworks\projects\mobil ecomponents\src\spark\components\ViewNavigator.as:1236]
    at mx.core::UIComponent/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\ mx\core\UIComponent.as:8209]
    at mx.managers::LayoutManager/validateProperties()[E:\dev\4.5.1\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:597]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:783]
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1180]

    This is the error because the runtime does not find any way to call Java script that usally is called through External interface. So my guess is you are using a AIR project. U just need to download the latest swc http://code.google.com/p/facebook-actionscript-api/downloads/list for destop in your case and don't forget to but FBJSBridge.js to put in your source that will b used to help AS call Facebook API from AIR runtime
    Hope it make some sense
    Piyush Negi

  • Flex 4.6 Mobile Forms

    There doesn't seem to be much discussion about the lack of mobile form support in a Flex 4.6 mobile apps - does anyone have any suggestions as to where is the best place to get started on a multi-page/view form running?
    As far as I can tell from the AS3 documentation - <s:Form> can run on a mobile device - IF you develop your own mobile skin.
    I would have thought there would be a huge outcry over lack of mobile form support - but as far as I can tell through much googling and research offical Adobe Evangalist blogs - no one seems to need or want mobile forms?
    Am I alone here? Once again, any suggestions on developing multi-view spanning forms??

    You don't have access to FORMS, but you can build your own form-like layouts. I've been laying them out myself. Using HGroups nested inside VGroups etc ... It takes more time, but on the mobile devices, you want to pay more attention to UI anyway.

  • Cannot convert mx.events::CloseEvent@88d8941 to spark.events.PopUpEvent. -----flex 4.7 Mobile project

    in flex 4.7 Mobile project,use s:TitleWindow:PopUpManager.removePopUp(this);why show "cannot convert mx.events::CloseEvent@88d8941 to spark.events.PopUpEvent"?

    This is the error because the runtime does not find any way to call Java script that usally is called through External interface. So my guess is you are using a AIR project. U just need to download the latest swc http://code.google.com/p/facebook-actionscript-api/downloads/list for destop in your case and don't forget to but FBJSBridge.js to put in your source that will b used to help AS call Facebook API from AIR runtime
    Hope it make some sense
    Piyush Negi

  • Flex 4.6 mobile broke TextInput

    I'm currently in the process of upgrading a Flex 4.5 mobile project to 4.6 and have run into issues with TextInput's.
    Currently on most of my views you cannot click(tap) a TextInput and insert text. The field does not seem to take focus and no text appears when you type. I've tried this on a phone as well as on my computer. The weird thing about this is that I have two views where the TextInput's seem to be working. I have also removed all code, MXML and AS3, from a view where input's don't seem to be working and replaced it with a generic TextInput. Even after doing this the text field doesn't seem to be working.
    I have tried to reproduce this outside of this project but can't seem to be able to. Anyone have any idea what would be causing this?

    I have the same issue but isolated in a very simple app. I havent tested it in Android, but in iOS it is VERY Buggy...
    you just need to have this to reproduce:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark">
      <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
      </fx:Declarations>
      <s:layout>
                        <s:VerticalLayout paddingLeft="15" paddingRight="15" paddingTop="15" paddingBottom="15" />
      </s:layout>
              <s:Scroller width="100%" height="100%"> 
                        <s:VGroup width="100%" height="100%">
      <s:TextInput id="ui_firstName" prompt="First Name"  />
                                  <s:TextInput id="ui_lastName" prompt="Last Name" /> 
      <s:TextInput id="ui_firstName2" prompt="First Name" />
                                  <s:TextInput id="ui_lastName2" prompt="Last Name" /> 
      <s:TextInput id="ui_firstName3" prompt="First Name" />
                                  <s:TextInput id="ui_lastName3" prompt="Last Name" /> 
      <s:TextInput id="ui_firstName4" prompt="First Name" />
                                  <s:TextInput id="ui_lastName4" prompt="Last Name" /> 
      <s:TextInput id="ui_firstName5" prompt="First Name" />
                                  <s:TextInput id="ui_lastName5" prompt="Last Name" /> 
      <s:TextInput id="ui_firstName6" prompt="First Name" />
                                  <s:TextInput id="ui_lastName6" prompt="Last Name" /> 
      <s:TextInput id="ui_firstName7" prompt="First Name" />
      <s:TextInput id="ui_lastName7" prompt="Last Name" />
      <s:TextInput id="ui_firstName8" prompt="First Name" />
      <s:TextInput id="ui_lastName8" prompt="Last Name" />
      <s:TextInput id="ui_firstName9" prompt="First Name" />
                                  <s:TextInput id="ui_lastName9" prompt="Last Name" /> 
                                  <s:Rect height="500" />
      </s:VGroup> 
      </s:Scroller>
    </s:Application>

  • Problem creating a Flex 4.5 mobile Scroller

    I have created a 'new' Scroller component by copying all the code from the spark Scroller into a new actionscript file, renaming it, updating import statements and adding any files I need to include to the local directory. I'm having to do this because I need to change something in a private method and basically I don't know any other way.
    Everything seem to work fine except a couple of lines in the ensureElementPositionIsVisible method.
    This one
        var delta:Point = layout.getScrollPositionDeltaToAnyElement(element, elementLocalBounds, entireElementVisible);
    and
         var eltBounds:Rectangle = layout.getChildElementBounds(element);
    I am getting these errors 'Call to a possibly undefined method getChildElementBounds', and 'Call to a possibly undefined method getScrollPositionDeltaToAnyElement'. There is a little bit of code before this that sets the layout variable to either a GroupBase layout object or SkinnableContainer layout object.
         if (viewport is GroupBase)
                         layout = GroupBase(viewport).layout;
         else if (viewport is SkinnableContainer)
                         layout = SkinnableContainer(viewport).layout;
    My hunch is that there is a problem with the viewport not being defined somehow, or possibly the skin. If anyone knows how I can fix this so that I can change the Scroller classes private methods, then I would be truly grateful.

    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:local="spark.components.*">
        <local:Scroller width="800" height="600">
            <s:Group id="myGroup">
                <s:Image id="img" source="@Embed(source='assets/test.jpg')"/>
            </s:Group>
        </local:Scroller>
    </s:Application>
    In the same folder as this mxml file create the folder spark/components and copy the file Scroller.as from the sdk into it. Also copy the spark/styles folder and the file core/version.as. It compiles with no error. Edit scroller.as and the change is seen in the compiled swf.

  • Flex 4.6 mobile mp3 player....create progressBar

    how to create progressBar for mp3 player in flex 4.6 mobile???
    help me please!!!!

    consider this scenario:
    1. user click a button and advances to the next view.
    2. here clicks a textinput so it focuses and soft keyboard appears
    3. user click back key on his phone - soft keyboard retracts (no backkeypressed event caught)
    4. textinput still has the focus border around it (why?) and user clicks back key again - application goes in the background for a couple of seconds and closes itself.
    I attached the .fxp for the test project
    http://dl.dropbox.com/u/4318878/TestBackKey.fxp

  • Communicate a Web application (Flex) with a mobile Apllication (Flex)

    Hello,
    I wonder if it is possible to communicate a Web application (Flex) with a mobile Apllication (Flex).
    when I Click on a button in my web application I receive an alert in my mobile application.
    if you have any ideas I would be very grateful.
    Regards.

    I tried that but my problem is that the code is so old. At least what I saw. I don't know how old is too old and I'm trying to do things "right." I saw code from 1998, but I don't know if that's still what you do. It might still work, but that doesn't mean it's correct. There's so much out there on Java that so old that half the time I'm not sure what to do because some other technology in J2EE or the latest Java SDK might have come up with a new way to do things. Thanks.

  • Adding additional mobile device to wireless set up.

    I have a c410a all in one printer,how do I add a mobile device to my set up.

    What setup?  Do you have a wireless router?  What kind?  Doe you have a computer?  What operating system?
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Setting scroll bar to inbisible when not needed

    Here is the post again, some quotation marks came out as
    letters before. This is correct version
    I'm using AS 2.0, and have added a
    scroll bar with instance name: ...................sb1
    a dynamic text field with instance name:.... tb1_txt
    an external text file named as:....................home.txt
    I want to make the scroll bar invisible or transparent, when
    its is not needed. I'm thinking that I may have to use the _visible
    property, but not sure of the correct code to integrate this.
    Any suggestions anyone?

    // Note:
    Create a movie clip to put the code into
    Use only 2 frames
    Use 2 layers
    Layer 1 put the action script
    Layer 2 put the textarea and the scrollbar
    Put a keyframe on each frame in only the Action Script layer.
    The 2nd layer should only have a keyfram on the first frame
    and span both frames 1 and 2.
    On the first frame (do not put a stop() method here)
    - set the visibility of the scrollbar to false
    - set the text content / value of the textarea
    On the second frame
    - Put the action script
    stop();
    if(textDisplay.maxscroll &gt; 1){
    textscroll._visible = true;
    } // if

  • How to set the position in SAP Script

    Hi Professionals,
    Can anyone tell me that How can I set the position of an bitmap Image (after inserting) in SAP Script ?
    by default position is in Left, I need to align it in center or somewhere else.
    Anybody knows, kindly reply!
    Thanks
    Devinder

    Hi,
    But Can we assign a window under another window. Because I want to insert a bmp picture on particular position.
    example:- there is a digital signature and wanted to insert upon a name.
    So, there is a text (which is customer name) and digital signature (in bmp picture format) upon it.
    Thanks
    Devinder

Maybe you are looking for

  • I18n for custom date format strings

    I want to internationalize dates shorter than DateFormat.SHORT, in the form "M/d". For example, when the Locale is US, January 16 should display as 1/16, but if the Locale is MX (Mexico), it should display as 16/1. It seems like a very simple problem

  • Posting Document Split by Personnel Area

    PC00_M99_CIPE transaction has default posting variant SAP and this variant splits the posting document by based on company code. Is there anyone who can guide me how to create new posting variant which uses the Personnel Area? Is this possible? Thank

  • Communication Channel Logs

    Hi All, Is there a audit log available for sender communication channel . 1)The sender communication channel tried to pick up some files 2 days back.I wanted to check the log of Sender Communication Channel for the problem today for why the files did

  • Amazon song IDs not showing up in iTunes

    I've downloaded songs from Amazon. The Amazon song ID is stored in the MP3 'Comments' field, which I've confirmed through Windows Explorer. Yet in iTunes the Comments field is blank.

  • Re download drm files as non drm files

    Can I re-download previous DRM purchase as none DRM?