Flex 4.1 / Flex 4.5 Mobile Scroller ?

Hi all,
I would just like to know:
1) can flash detect if the application is running on mobile?
2) How do I configure a scroller to work for mobile, because when I test my application on mobile I need to drag the scrollers to scroll, it's very bad. As far as I know only Burrito Flex 4.5 can create Mobile Applications.
Do I need to create a Mobile Application so my scrollers work for mobile as they are supposed to or There is some attribute I need to set on the Scroller to change to mobile mode or something like that ?
Thanks in advance!

1) can flash detect if the application is running on mobile?
I would have thought that the Capabilities class would tell you, but oddly Android or Blackberry do not seem to be in the list:  http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabiliti es.html#os
That said, you should not try to develop an app for a specific OS.  You should develop for the availability, or lack thereof of the feature, such as a GPS or Camera or touch inputs, etc..
2) How do I configure a scroller to work for mobile, because when I test my application on mobile I need to drag the scrollers to scroll, it's very bad. As far as I know only Burrito Flex 4.5 can create Mobile Applications.Do I need to create a Mobile Application so my scrollers work for mobile
as they are supposed to or There is some attribute I need to set on the
Scroller to change to mobile mode or something like that ?
Use the Mobile Theme.  In a Flex Mobile Project and your scrollers should automatically be the "Mobile Scrollers".  You may also try setting "InteractiveMode" equal to touch.  You could also try adding the mobile theme as a library on your "non mobile project" and setting the skin on your your scroller to use the scroller's mobile skin.

Similar Messages

  • 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 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>

  • 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 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.

  • How can I stick an accordion navigation MENU on top of a mobile scrolling page and make it work properly? As I can't pin it, I keep it on top of the page with scroll effect 0. It collapse, shows the menu buttons but doesn't close back once it reaches the

    How can I stick an accordion navigation MENU on top of a mobile scrolling page and make it work properly?
    As I can't pin it, I keep it on top of the page with scroll effect 0.
    It collapse, shows the menu buttons but doesn't close back once it reaches the anchorpoint.

    Muse won't let you, at least not that I know of. You could find the class in the code that muse gives it position: fixed…I think. You could paste it into the head area of your page properties to override the class. I believe something like this would give you persistent nav bar, pinned at the very top, on mobile:
    #youmuseclass {position: fixed;}
    I wouldn't use any parallax on mobile either, the performance is terrible.

  • 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

  • How to Play all type  audio or video file in Flex 4.5 mobile

    Hi,
    I need audio player and video player include by Mobile app.
    <s:VideoPlayer - not mobile optimized.

    First of all, thanks for your reply.
    second, the way i found is this: http://www.sparkfun.com/products/10748   sparkfuns IOIO device. i'm planning to use its UART port for real time serial communication.
    yet the thing i couldnt understand is, how people never feel the need to use threading in Flex. I mean, HOW?

  • Flex 4.5 mobile - inline CSS in htmlText

    I want to change one word of text to bold and change the text color, but my htmlText is not rendering:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    title="ReminderPro Basic" backgroundColor="0xCCFFCC"
    creationComplete="init();">
    <fx:Script>
      <![CDATA[
       import spark.components.supportClasses.StyleableTextField;
       private var greetingText1:String = "<span style='color: #FF0000; font-weight: bold'>ReminderPro</span> <span style='color: #660066'>makes it easy to create customizable alarms and reminders.</span>";
       [Bindable] private var greetingText2:String = "Great when you need an alarm that repeats, such as a reminder to check something in the over.";
       [Bindable] private var greetingText3:String = "Keep your kids accountable when limiting video game usage.";
       private function init():void{
        StyleableTextField(greetingTA1.textDisplay).htmlText = greetingText1;   
      ]]>
    </fx:Script>
    <s:layout>
      <s:VerticalLayout gap="20" paddingTop="50" paddingLeft="30"
       paddingRight="30" paddingBottom="50"
       horizontalAlign="center"/>
    </s:layout>
    <s:TextArea id="greetingTA1" width="100%" borderVisible="false"
      selectable="false" editable="false" skinClass="skins.CustomTextAreaSkin1"
      textAlign="center"/>
    <s:TextArea id="greetingTA2" width="100%" borderVisible="false"
        selectable="false" editable="false" skinClass="skins.CustomTextAreaSkin1"
        color="0x660066" textAlign="center" text="{greetingText2}"/>
    <s:TextArea id="greetingTA3" width="100%" borderVisible="false"
        selectable="false" editable="false" skinClass="skins.CustomTextAreaSkin1"
        color="0x660066" textAlign="center" text="{greetingText3}"/>
    <s:Spacer height="20"/>
    <s:Button label="New Reminder" click="navigator.pushView(views.NewReminderView)"/>
    <s:Spacer height="20"/>
    <s:Button label="Saved Reminders" click="navigator.pushView(views.SavedRemindersView)"/>
    </s:View>

    Hi Gregory,
    this is mobile project, yes?
    if you try that way it will work I think:
    private var greetingText1:String = "<font color='#FF0000'><b>ReminderPro</b></font> <font color='#660066'>makes it easy to create customizable alarms and reminders.</font>";
    http://help.adobe.com/en_US/flex/mobileapps/WS19f279b149e7481c-3c2dbaa612bb06a5ea2-8000.ht ml
    regards,
    Peter

  • Unable to load resource bundles in Flex 4.5 mobile

    Hi All,
    Starting to localize my strings in my first mobile application and for some reason... resourceManager is not finding my strings.
    My project structure is as follows:
    src/assets/locale/en_US
    resources.properties
    My compiler args are:
    -locale=en_US -source-path=assets/locale/{locale} -allow-source-path-overlap=true
    My first test is to externalize my first views title, but resourceManager fails to load my resource:
    views.loginView.title=Login
    Not sure what I am doing wrong, I am compiling my web client in Flex 4.5/Flash Builder Burito no problem but my mobile client is not finding my strings. Have tried cleaning ect...nothing... I also tried excluding the -source-path compiler args and added the new source path to Flash Builder but same result.
    Any help much appreciated.
    Greg

    Well, my resource bundles where not being compiled into my application due
    to a missing meta tag instruction informing the compiler to include it.
    <fx:Metadata>
        [ResourceBundle("resources")
    </fx:Metadata>
    As per the 13 errors... they seem to have gone away now and have not seen them since adding the metadata tag.
    Great doc on the subject http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fcf.html. Unfortunately, when I skimmed through it I missed the 'Using resource bundles' section that describes the metadata tag usage.
    Thanks for listening :-)
    Good Adobe

  • Flex error in mobile development

    Is there auto orientation in iPhone and android by using flex mobile development

    This blog post http://blogs.adobe.com/airodynamics/2012/05/22/stage-aspectratio-enhancements/ can lead you to relevant links.

  • Export small flex project to mobile?

    Hi everyone! I am just learning Flex and have stumbled upon a problem...
    I have created a small Flex project in Flash Builder 4 and it works very well on desktop and in a browser. However I need it to run on mobile phone with only Flash Lite support... is that possible? Flash professional can do this but I can't import fxp into Flash CS5.
    I also don't see the point of the fact that Flash CS5 can export for iPhone and other mobile devices and has Device central integration when it isn't an app developing tool at all. Flash Builder should have this features!
    Anyway, my application is very simple and I believe Flash Lite should be able to handle it. Is there a way to do it?
    Thanks in advance

    Due to Apple license restrictions, Adobe will no longer be continuing development of the Flash to iPhone Exporter application; and as such I do not expect the feature to be intergrated into Flash Builder.
    Last I heard Flash Lite did not support ActionScript 3; and therefore would not support Flex based applications.
    I expect that as Adobe releases their Flash Player for Mobile; you'll see a lot more tooling support for such things.  I expect a lot of talk / announcements / releases around this sort of functionality around Max this year, if not before.
    In the meantime, there are a few other mobile options out there.  Check out Elips Studio from OpenPlug as one of them.

Maybe you are looking for

  • Netgear PCI Wireless Card in a Power Mac G4

    I have a Netgear PCI Wireless Card MA311 and I'm trying to make it work in my Power Mac G4. Does anyone know of any drivers I can use or any way I can get online with it? An alternate option is the Linksys Wireless-B USB adapter (ver.2.8) that I have

  • Camera Raw 5.2 not installing in PSE6 on Mac

    Hi, I've downloaded the update and opened it. It goes into an automatic install, skipping over "Destination Select". After it finished, I looked in the root Library/Application Support/Adobe/Plug-in/CS3/File Formats, and the only thing there is the o

  • Problem in getting updated data of VO

    I have a jspx page which have one ADF input LOV alongwith other controls. I have also a valueChangeListener attached with it so that whenever, user changes value, i want to process that value along with other values in VO which are set by LOV in the

  • RE: Announcement: iTunes 7.4.2 is now available?

    Hi! After a terrible blunder this morning, and not being able to remove ones remarks; one can only offer a 'Mea maxima culpa' and hope it is accepted. Nevertheless, I wanted to understand why I ought to download this update. I’ve spent a small fortun

  • Error in smart forms

    Hi all, When am working in smartforms i have to add a field(ANLN1) in the report. But the following error occurs? Hw to solve it? The work area name is w_rkpf. The data object "W_RKPF" does not have a component called "W_ANLN1". Regards, Priya