Flex mobile and databinding

Is data binding feature supported in flex mobile project? I have data binding code used in <s: Application>. When I move the application to flex mobile in <s: view>, I can't seem to make data binding work.

<?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"
                                 xmlns:mx="library://ns.adobe.com/flex/mx"
                                 xmlns:amcharts="http://www.amcharts.com/com_internal"
                                 backgroundColor="#FFFFFF"
                                 width="100%" height="100%"
                                 viewSourceURL="srcview/index.html">
  <fx:Declarations>
  <!-- Place non-visual elements (e.g., services, value objects) here -->
  </fx:Declarations>
  <fx:Script>
                              <![CDATA[
                                        import mx.collections.ArrayCollection;
                                        import flash.filters.DropShadowFilter;
                                        [Bindable]private var chartData:ArrayCollection = new ArrayCollection([
                                                  {year:2001,income:23.5,expenses:18.1},
                                                  {year:2002,income:26.2,expenses:22.8},
                                                  {year:2003,income:30.1,expenses:23.9},
                                                  {year:2004,income:29.5,expenses:25.1},
                                                  {year:2005,income:24.6,expenses:25.0},
                                                  {year:2006,income:25.5,expenses:18.1},
                                                  {year:2007,income:26.2,expenses:52.8},
                                                  {year:2008,income:36.1,expenses:23.9},
                                                  {year:2009,income:24.5,expenses:33.1},
                                                  {year:2010,income:44.6,expenses:29.0}
                                        [Bindable]private var shadow:DropShadowFilter = new DropShadowFilter(2,45,0,0.5);
                              ]]>
  </fx:Script>   
                    <s:VGroup width="100%" height="100%">
                              <s:Group width="100%" height="100%">
  <amcharts:AmSerialChart
                                                  id="chart"
                                                  width="100%"
                                                  height="100%"                
                                                  dataProvider="{chartData}"
                                                  categoryField="year"
                                                  angle="30"
                                                  depth3D="30">
  <amcharts:graphs>
                                                            <amcharts:AmGraph title="Income" id="g0" valueField="income" type="column" lineAlpha="0" fillColors="[#ADD981]" fillAlphas="[1]"/>                       
                                                            <amcharts:AmGraph title="Expenses" markerType="line" id="g1" valueField="expenses" type="line" lineThickness="2" bullet="round" filters="{[shadow]}"/>                       
  </amcharts:graphs>
  <amcharts:valueAxes>
                                                            <amcharts:ValueAxis dashLength="5"/>                           
  </amcharts:valueAxes>
  <amcharts:categoryAxis>
                                                            <amcharts:CategoryAxis gridPosition="start" dashLength="5"/>
  </amcharts:categoryAxis>
  </amcharts:AmSerialChart>
  <amcharts:AmLegend
                                                  color="0x000000"
                                                  x="45"
                                                  y="10"
                                                  switchable="false"
                                                  dataProvider="{chart}"
                                                  width="100%"
                                                  marginRight="20"
                                                  marginLeft="40"
                                                  textClickEnabled="false"
                                                  marginBottom="5"/>                    
  </s:Group>
                              <s:HGroup width="100%">
                                        <mx:Spacer width="32"/>
                                        <mx:DataGrid dataProvider="{chartData}" width="100%" editable="true" height="100"/>                   
                                        <mx:Spacer width="20"/>
  </s:HGroup>
                              <mx:Spacer height="10"/>
                    </s:VGroup>           
</s:View>

Similar Messages

  • Flex mobile and PHP project

    Hi! Recently I've downloaded the Flash Builder for PHP to work with my Zend Server remotely located in OpenShift online. I did not  download and install the Zend Server physically on  my computer. Hence, when creating the Flex mobile and PHP project, I couldn't find my web root address. Now I have an error connecting to the MySQl database in the server from the Flash Builder. Can someone help me with this? I'm new to using these programs.
    I'm following this guide on building mobile apps:
    http://files.zend.com/help/Flash-Builder-for-PHP/Getting-Started/Mobile/build_a_mobile_(ph p)_application.htm#Step_13:_Preview_the_Mobile_Application_Using_the_Desktop_Emulator

    PHP is server side.
    If you want to have a app to function offline you would probably need sqlite and then code actionscript to synch data when the device regains it's connectivity.

  • Flex mobile connect to remote secure server!!

    Hi guys
    I'm a beginner with flex mobile.
    i'm trying to create an appllication flex mobile. and i have to connect to remote secured server (apache) to get some services deployed.
    i did it and when i try with emulator from flash builderit's worked, a pop up window started to enter a login and password for connect to the remote server. it's okay, i get a result.
    but now when i try this application with my mobile phone, application launched correctly but i can't connect to remte server ( i dont have anythig like a popup to enter the login and pssword).
    i need your help.
    thanks

    Did you ever figure this out? I'm having the same issue.

  • Flex SDK and AIR runtime version in mobile

    Hi, guys.
    I'm trying to make my first Flex mobile app.
    I'm a little confused about the relationship between Flex SDK and AIR  runtime versions for mobile development.
    In the "Developing Mobile Applications with ADOBE FLEX 4.6 and ADOBE FLASH BUILDER 4.6" pdf document, it says:
    "AIR requirements
    Flex mobile projects and ActionScript mobile projects require AIR 2.6 or a higher version. You can run mobile projects on physical devices that support AIR 2.6 or a higher version of AIR.
    You can install AIR 2.6 or a higher version only on supported Android devices that run Android 2.2 or a higher version. For the complete list of supported Android devices, see Certified Devices. Also, review the minimum system requirements to run Adobe AIR on Android devices at Mobile System Requirements.
    Note: If you do not have a device that supports AIR 2.6 or a higher version of AIR, you can use Flash Builder to launch and debug mobile applications on the desktop."
    So, I go and check the Certified devices in http://www.adobe.com/devnet-apps/flashruntimes/certified-devices.html and find that the minimun FLASH PLAYER version accepted by ALL devices is FP 10.1
    1. Does this mean that if I want to release an app to target ALL mobile devices, then I can only use Flex 4.5?
    2. Do support for Flash Player mean the same than support for Adobe AIR? Or the application will prompt the user to install whatever version of the AIR runtime and all of them would be supported by the device, even in the FLASH PLAYER support is for a lesser version?
    Thanks!

    Thanks for your help, Flex harUI,
    The first impression that comes to mind is that FP version is indeed only for the web browser plugin. Then, why does the official Flex 4.6 mobile development documentation have a link to that page that only speaks about the supported FP version in mobiles under the title "AIR requirements"??
    This makes it way too confusing.
    Do you know whether there is something like an equivalent matrix/list of mobile devices with their supported AIR runtime versions?  I went a great deal in trying to keep my original app under 400kb... I didn't know that in the end it would end up weighing 9.5Mb... :S
    Thanks again,

  • Flex mobile project: web root and root path for a remote web service?

    Hi all,
    i'm trying to set up the testdrive tutorial for flex mobile project, with flash builder 4.5
    and php data.
    I've uploaded the files on my remote web space (e.g. http://mywebsite.org, and the
    test file is http://mywebsite.org/TestDrive/test/test.php... and it works
    correctly)... But when i'm setting properties of the project, i don't know what
    to write into the web root and root path fields... I thing root path is simply
    http://mywebsite.org... and whatever i write in the other fields (output folder
    too) i have errors when i click on "validate configuration"...
    What should i put into those fields? is zend framework (and gateway.php)
    strictly necessary?
    As you can see... i'm a bit confused....
    Many thanks for any help
    Bye
    Alex

    I thought it was a simple question...
    No advice?

  • Flex mobile project standalone flex server resets to J2EE and can not change

    Developing an Android mobile project with FB 4.5. Set original project-->properties-->flex server to standalone with coldfusion as server.  After setting web root, Root URL and Coldfusion root folder app works fine with CF. Sometime during development, flex server gets set to J2EE and CF access halts.  Go back into project-->properties-->flex server and reset server to 'standalone' with original settings.  click Apply or OK and assume that it is reset but it does not.  Go back into flex server settings and it is still J2EE.  I have seen this issue before and can not resolve it or find any other threads where there is a resolution to this.  My only way to continue is to start a new mobile project, import the files and continue.  This is not an acceptable way to design any mobile project!!  HELP!!

    Developing an Android mobile project with FB 4.5. Set original project-->properties-->flex server to standalone with coldfusion as server.  After setting web root, Root URL and Coldfusion root folder app works fine with CF. Sometime during development, flex server gets set to J2EE and CF access halts.  Go back into project-->properties-->flex server and reset server to 'standalone' with original settings.  click Apply or OK and assume that it is reset but it does not.  Go back into flex server settings and it is still J2EE.  I have seen this issue before and can not resolve it or find any other threads where there is a resolution to this.  My only way to continue is to start a new mobile project, import the files and continue.  This is not an acceptable way to design any mobile project!!  HELP!!

  • How to display html content with image in Adobe Flash and Flex mobile project?

    Hi,
      I have a html content with image in it. How to display it in Adobe Flash Builder and Flex mobile project? Which control needs to be used for this?

    Hello,
    The only current way is to use an iFrame, or if you only need some html tags you could use the Text Layout Framework.
    Here this is the iFrame approach:
    http://code.google.com/p/flex-iframe/
    If the swc do not work in Flex4 just use its ource code which works...
    ...it is basically based on this:
    http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
    see also and vote, please:
    http://bugs.adobe.com/jira/browse/SDK-12291
    http://bugs.adobe.com/jira/browse/SDK-13740
    Regards
    Marc

  • Flex Mobile 4.5.1: Package contents and URLLoader

    On Flash for web and desktop (Projector debugger), one can use a URLLoader to load local URLs (eg files off your hard drive).  This is very useful for some development purposes, as you just need to make sure any external files (JSON & PNG) are in the same relative path as the SWF, and you then don't need to worry about different code paths whether you're loading these external files from local storage or http.  URLLoader operates the same whether loading locally or remotely.
    Is there any way to easily get the same behavior on a Flex Mobile 4.5.1 app (specifically for an iOS target)?  Again, this is useful because in my live app, these external files will be loaded from our web server, but for testing purposes I would like to be able to run in a server-less mode and include them with the deployed debug IPA file.  My first problem is that I cannot seem to figure out how to deploy these files to the application in the first place - I tried adding my external-files folder to the Flex Build Path as an additional Source folder, but they still don't show up under the Package Contents for iOS tab.
    Any ideas?  Are there any include-extra-files-in-package options in the -app.xml? 
    Or is there no way to use URLLoader for local storage on mobile, and I am stuck with using Embed?  (I guess besides Embed I could manually deploy the files to the iOS file system and use the AIR api for access, but that's still a different code path, defeating my goal - we have a decent bit of code built around the idea that URLLoader is agnostic)

    Edit: Realized my original answer wasn't correct, the files were being pulled in from another setting.
    After some experimenting, the answer is YES, and it's actually a bit unexpected: Just in fact adding the external files folder to the Flex Build path | Source Path actually pulls them all in.  It seems those directories are passed to both mxmlc and adt.  Unexpected surprise.

  • IOS universal support and ASC 2.0. Will it impact Flex Mobile projects?

    Hello,
    Regarding the latest release notes for AIR 16, it says
    "The legacy compiler is not (and will not be) compatible with iOS 64-bit.[...] it will be removed with version 16 of the AIR SDK"
    I am a bit lost with what it means for Flex Mobile (4.6 or Apache Flex SDK). Will we still be able to compile once AIR 16 is out or will this new compiler have issue with Flex projects compiled for iOS? Will it need us to make some changes on existing Flex applications?
    Thanks for your clarifications,
    Fabien

    It seems this wrong rumour is spreading around... a lot of people don't bother researching properly.
    When they talk about the legacy compiler they talk about ADT, MXMLC will continue to work. The simplified IPA packaging process is: Source code --- MXMLC/ASC2---> SWF ---ADT AOT Compiler---> IPA
    So with AIR 16 the ADT -useLegacyAOT argument will be removed.

  • Flex mobile orientation: force portrait mode and then allow auto orientation

    I'm creating a flex mobile project and I want to force the app to portrait orientation when I click a button, and when I click other button allow again to change the orientation.
    This is my code when I click the first button, where I want to force portrait mode:
    protected function click(event:MouseEvent):void{      if(stage.orientation != StageOrientation.DEFAULT){           stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChanged);           stage.setOrientation(StageOrientation.DEFAULT);      }else{           doSomething();      }  }  
    private function orientationChanged(event:StageOrientationEvent):void{      doSomething();      stage.removeEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChanged); } 
    private function doSomething():void{      stage.autoOrients = false; }
    It works ok and it changes the orientation if it's needed.
    Now, when I want to allow orientation change again, I've only putted:
    stage.autoOrients = true;
    It works ok if when I click the first button the app is in portrait and it doesn't have to change anything. But if it's on landscape and it have to change to portrait, when I allow orientation change again, it doesn't work ok.
    Do you know if I have to allow or change something? Or, is there any better way to do this?
    Thanks in advance

    Thanks for your answer. It works, but I have the same problem that I have setting the orientation. If I'm on landscape, it changes to Portrait ok, but when I want to allow auto orientation again, it doesn't work well.
    A little tricky I've found is:
    When I want to force to portrait:
    private var oldOrientation:String = null;
    protected function click(event:MouseEvent):void{
       if(stage.orientation != StageOrientation.DEFAULT){
                oldOrientation = stage.orientation;
                stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChanged);
                stage.setOrientation(StageOrientation.DEFAULT);
       }else{
                doSomething();
    private function orientationChanged(event:StageOrientationEvent):void{
                // do something if you are changing to portrait mode (the first change) and other thing if you are changing to old orientation
    And when I want to allow auto orientation again:
    if(oldOrientation != null){
            stage.setOrientation(oldOrientation);
            oldOrientation = null;             

  • Flex Mobile, URLLoader and Sessions

    I have created a Flex Mobile Project that I've been testing so far on a Motorola Xoom and uses the URLLoader object to query some JSP pages and return the output. These JSP pages require user authentication which depend on sessions.
    If my URLLoader requests are made sequentially (the second request is not made until the first is completed) session information functions normally. If multiple URLLoader requests are made at the same time there is a chance that one or more of the request's session information will fail. I've used a packet sniffer and found that the "Cookie: JSESSION=..." header value is not being set or sent to the server.
    I've actually been able to solve this problem by fetching my session ID when I login, storing it locally and setting the "Cookie: JSESSION=..." value manually in the header of all my URLLoader requests. Most of the time the browser will overwrite this value that I've set with the session ID that it has, and that's fine. But in the case where it doesn't set this value then my manually set value is passed to the server and it is able to find the appropriate session.
    The solution I've come up with seems to work so far, but I was still wondering if anybody knows what's causing this or knows a better solution?

    That sounds like everything's working the way it should. Until the "first" request is authenticated successfully and the response comes back to the browser/device, your app doesn't have session credentials. Sending multiple simultaneous unauthenticated requests will thus all need to authenticate individually -- and making matters worse, may create multiple sessions on the server, so as they come back your session info (as represented by your JSESSION ids) will rapidly run through all the new sessions until settling on the last one.
    I would suggest changing your application flow to let your first request go by itself first and not submit any other requests until that (authenticated) response is received.
    -- Tom
    Flex SDK engineer

  • ANE for one platform on Flex mobile project for iOS and Android

    I'm very new at Flex Mobile Projects and native extension.
    I have a big doubt... If I have an ANE that only works on iOS or Android, can I use it into a project for Android AND iOS?
    I mean, if I want to do something and I've only found and ANE that works for iOS and another ANE that works for Android, can I create only one project and depending on the device use one or another? or should I create two different projects?
    Thanks in advance

    You can set them both up and when you publish just comment out the code that does not apply, this way you still keep it as one project but you can use the ANEs as needed, I had to do this with the iAd ANE only for Apple obviously and AdMob ANE which at the time was Android only.
    Example
    //Android ANE Code
    blah blah blah
    //iOS Code
    code code code
    Now when you publish for iOS comment out the Android related stuff
    //Android ANE Code
    blah blah blah
    //iOS Code
    code code code
    Also dont forget to update your included ANEs when you publish and remove the ones that dont apply and update the XML files as needed. Its possible, but annoying, it would be nice if it was automated or could be flagged somehow so the Flash publisher would auto ignore it.

  • Flex mobile add emoticons and text

    I created a chat program in the mobile project, but I can not add emoticons,I know textarea can not display pictures,So I reluctantly use RichEditableText, it can add a picture, but why can not I enter characters (letters and Chinese characters) in the phone debugging, just enter only numbers, and punctuation symbols。Or there are other ways to solve add text and pictures?

    Thanks much for your response.
    Hmmm...  That appears to work but also causes a runtime exception where there was none before the 4.6 upgrade.  It occurs when I autoscroll on receiving a new message in the chat, something that worked fine in 4.5.
    I guess I'm kind of wondering what the best practice is here.  Maybe I'm just doing this wrong altogether.  I'm finding it very difficult to implement probably one of the most basic features one would find in any collaborative app - something that was very easy in Flex 3 - the chat pane.  I've had one functioning fine for about 3 years.  Not so much in Flex mobile.
    Chat is very simple functionality.  When you receive a new message from afar...
    1.  add it to a TextArea with some nice formatting
    2.  auto scroll far enough so the user can see the new message in its entirety. 
    Nothing difficult at all.
    Why are these two things difficult to find in the TextArea in Flex mobile?  It almost seems as though it's something we're not supposed to be doing? 
    The answer here seems to be don't use Stage Text.  Revert to an older TextArea skin.  Why?  What text area doesn't need formatting as an option?  What text area doesn't need to be auto scrolled here and there?  Or am I just going about this wrong?  Maybe using the wrong components?
    I guess for now I can revert to 4.5 skin, but now the code I used to auto scroll on receiving a new message throws a null pointer exception.  I've been using the valueCommit property to auto scroll, as follows:
    valueCommit="textArea.scroller.verticalScrollBar.value = textArea.scroller.verticalScrollBar.maximum"
    Haven't had a problem prevously.  But this now throws:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at com.components::ChatWindow/__textArea_valueCommit()
    What's the best practice to accomplish this and also to be able to take advantage of the latest and greatest?

  • Database and Views, Flex Mobile

    HI !
    in flex mobile, every time I do a query, I have to re-open the database for each view? thanks!

    I'm guessing you have to reconnect your class because you are instantiating it in each view
    the idea is to instantiate and connect the database class and each view use the same instance (which is already connected) so you only want to instantiate the class once
    You could do that in the main app and pass it to each view that needs it, but that can get complictaed and tedious for larger apps and not good practise
    or use a singleton which acts like a global or static class, the same instance available everywhere
    or (the best way) use a framework which instantiates the class for you and you can simply inject it to each view.
    there are plenty of guides to AS3 singletons on google
    I found this video useful. Its a bit long but might give you some ideas on the way to go
    http://tv.adobe.com/watch/max-2010-develop/flexactionscript-30-architecture-and-dependency -injection-frameworks-overview/

  • Can't convert Flex Mobile project to desktop project

    I'm using the Flash Builder 4.6 trial, and I'm very new to flex development. I've been asked to convert an existing Flex Mobile project (appears to have been developed in Flash Builder 4.5) into an AIR desktop app.
    The project imported without complaint. However, the Add/Change Project Type > Convert to Flex Desktop Project menu item is disabled.
    I created a blank Flex Mobile project, then a blank Flex web project, then a blank ActionScript project. It's greyed out for those, too. I checked with the projects closed and open; the rest of the items on that submenu are enabled for all projects when closed.
    Is this feature disabled in the trial version?  Is something else going on?

    Clearly the device from verizon works, I would try to contact a computer tech to repair your computer
    Really it should be as simple as turn on, connect, go. If it isn't there is a break down somewhere in that computer
    What error msg?

Maybe you are looking for

  • Why does iTunes always crash and freeze on my iPad?

    Every time I access iTunes and try to select music or search, for example, it freezes and then crashes. I have restored the iPad and it was ok for a few minutes then did the same thing. Is there anything I can do as I would like to be able to downloa

  • IPhoto '11 spinning wheel of death!! Help please...

    My iPhoto won't open, I think it's since upgrading my iPhone and connecting to iTunes a couple of weeks ago. I've downloaded iPhoto Library Manager and can see all the pics using that application, but my iPhoto simply won't open and just has the spin

  • How to work from an external drive?

    I understand from my research that I can save my Logic document (and its inclusive audio files) to an external hard drive and it will take some of the load off of the computer's internal drive, etc. I don't use loops much, but I also read that the lo

  • Error in advanced installation of obiee on linux

    Hi All while i am installing obiee 10.1.3.2.0 on linux am getting the following error. "PopChart installation failed. Please re-run it under /uo2/oraobias/product/OracleBI/Corda after this installation. After specifying the directories and selecting

  • Form Builder Static Record Group

    Hi Folks, I am a part of a development team where we do parallel development where a team in India is working on certain forms and we work on other forms. We faced a peculiar problem, both the teams use Oracle Forms 6i, but we lose values in the stat