Flex Mobile textinput

Hi, I type from Brazil,
Please I need example textinput with mask for Flex Mobile,
Thank's

Friend, I could not, the code for FlexMobile
<?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="HomeView" xmlns:mx="library://ns.adobe.com/flex/mx">
          <fx:Script>
                    <![CDATA[
                              import mx.events.ValidationResultEvent;
                              import spark.events.TextOperationEvent;
                              private var validResult:ValidationResultEvent;
                              protected function button1_clickHandler(event:MouseEvent):void
                                        validResult= phValidator.validate();
                                        if (validResult.type == ValidationResultEvent.VALID)
                                                  readyNum.text=phFormatter.format(phNum.text) ;
                                        else
                                                  readyNum.text="";
                              protected function phNum_changeHandler(event:TextOperationEvent):void
                                        if(phNum.text.length >9)
                                                  validResult= phValidator.validate();
                                                  if (validResult.type == ValidationResultEvent.VALID)
                                                            phNum.text=phFormatter.format(phNum.text);
                                                  else
                                                            readyNum.text="";
                                        else
                                                  readyNum.text= "";
                    ]]>
          </fx:Script>
          <fx:Declarations>
                    <mx:PhoneFormatter id="phFormatter" formatString="####-####" validPatternChars="#-() "/>
                    <mx:PhoneNumberValidator id="phValidator" property="text" source="{phNum}"  allowedFormatChars=""/>
          </fx:Declarations>
                              <s:TextInput id="phNum" x="83" y="25" width="274" text="(###) ###-####" change="phNum_changeHandler(event)"/>
                              <s:TextInput id="readyNum" x="83" y="66" width="274" editable="false" text=""/>
          <s:Button x="33" y="167" width="74" click="button1_clickHandler(event)"/>
</s:View>
Thanks.

Similar Messages

  • Skinning Flex Mobile TextInput

    Hi,
    I need to skin the Flex Mobile Text Input with a gradient in the background. I have created a skin for that. It works fine on Android devices but in case of iOS devices, the keyboard doesn't even comes up. If I remove the skin, it works fine. I guess the issue is with skinning, but how can I fix this? Below is the skin I created, if it helps:
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
        alpha.disabledStates="0.5" blendMode="normal">
        <fx:Metadata>
        <![CDATA[
             * @copy spark.skins.spark.ApplicationSkin#hostComponent
            [HostComponent("spark.components.TextInput")]
        ]]>
        </fx:Metadata>
        <fx:Script>
            <![CDATA[
             * @private
            private static const focusExclusions:Array = ["textDisplay"];
             *  @private
            override public function get focusSkinExclusions():Array { return focusExclusions;};
            ]]>
        </fx:Script>
        <s:states>
            <s:State name="normal"/>
            <s:State name="disabled" stateGroups="disabledStates"/>
            <s:State name="normalWithPrompt"/>
            <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
        </s:states>
        <!-- border -->
        <!--- @private -->
        <s:Rect left="0" right="0" top="0" bottom="0" id="border"
                                  radiusX="5" radiusY="5">
            <s:stroke>    
                <!--- @private -->
                <s:SolidColorStroke id="borderStroke" color="0xFFFFFF" weight="1" alpha="0.05" />
            </s:stroke>
        </s:Rect>
        <!-- fill -->
        <!--- Defines the appearance of the TextInput component's background. -->
        <s:Rect id="background" left="1" right="1" top="1" bottom="1"
                                  radiusX="5" radiusY="5">
            <s:fill>
                <!--- @private Defines the background fill color. -->
                <!-- s:SolidColor id="bgFill" color="0xFFFFFF" alpha="0"/-->
      <s:LinearGradient rotation="90">
      <s:GradientEntry color="0x131516"
                                                                                     alpha="1"/>
      <s:GradientEntry color="0x282b31"
                                                                                     alpha="1"/>
      </s:LinearGradient>
      </s:fill>
        </s:Rect>
        <!-- shadow -->
        <!--- @private -->
        <s:Rect left="1" top="1" right="1" height="1" id="shadow" alpha="0"
                                  radiusX="5" radiusY="5">
            <s:fill>
                <s:SolidColor color="0xFFFFFF" alpha="0.25" />
            </s:fill>
        </s:Rect>
        <!-- text -->
        <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
        <s:RichEditableText id="textDisplay"
                  verticalAlign="middle"
                  widthInChars="10"
                  left="1" right="1" top="1" bottom="1" />
        <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
        <s:Label id="promptDisplay" maxDisplayedLines="1"
                    verticalAlign="middle"
                    mouseEnabled="false" mouseChildren="false"
                    includeIn="normalWithPrompt,disabledWithPrompt"
                    includeInLayout="false" />
    </s:SparkSkin>

    You are using a non-mobile skin:
    <s:RichEditableText id="textDisplay" 
                  verticalAlign="middle" 
                  widthInChars="10" 
                  left="1" right="1" top="1" bottom="1" /> 
        <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
    Pls Read here about mid page- wont call keyboard and have scrolling issues, etc:
    Adobe Flex 4.6 * Use text in a mobile application
    Here are the mobile skins: spark.skins.mobile - Adobe ActionScript® 3 (AS3) API Reference ... apply to base components you need to use.
    Good luck.

  • Flex Mobile - Moving up for keyboard

    Not sure if this is where i should post this question about Flex Mobile, but don't see any forums for Flex Mobile.
    My question should be simple enough. I create a Android app and it works perfect. About ready to put it in the market, but one odd thing I can't find on google is how to move the app (or at least the onFocus TextInput) up so the phone's keyboard doesn't cover it.
    Does anyone know what event (if any) is fired off when the phones keyboard is summoned and how to keep your text area above it.
    Thanks!
    Also..where can I find the new api info on things like using the phone's camera, gps, accelerometer,etc?

    maybe http://swfhead.com/blog/?p=904 will be helpful

  • What is the best font to use for Thai Language in Flex Mobile Applications ?

    Hi
    I am facing issues with Thai language in flex mobile applications. I am using Tahoma font and facing issues in TextInput
    Whith Tahoma font text Offset setting to far from the starting of the text input .
    Can any one suggest me the best font to use with Thai language ?
    Many thanks in advance for your help .
    Regards,
    Kamal

    Personally, I prefer uncompressed TIFF or PNG.  But many times it won't matter ... you'll be dropping the images into an SD Sequence, so they will lose resolution on output.
    -DH

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

  • Flex Mobile Project unable to run on android device

    Hi,
    I Have created basic flex mobile project using flash builder and i could able to run on desk top, but while running the same on device i am getting force close exception also dint get any error log. i am using samsung galaxy pop GT-S5570 as my testing device. i have configured usb driver and enabled usb debugging in  my device too. any help to resolve this process?

    08:20:45.751 Raw device 'sd=sd1,lun=/dev/rdsk/c3t5000CCA03EC50D5Dd0s0' does not exist, or no permissions.
    Looks like either your lun doesnt exist  OR you running vdbnech session not as root.
    (Only a guess )

  • Is there a way to use Stage3D in Flex Mobile projects on iPad?

    When I create a project of type "Action Script Mobile Project" the Stage3D works on iPad, Android device and in the AIR desktop simulator.
    But when I create a project of type "Flex Mobile Project" it works in the desktop simulator and on Android device but does not work on iPad.
    When running on iPad the stage.stage3Ds[] collection is empty.
    Is it a sort of limitation made by intent? Or a bug? Or maybe I am doing something wrong?
    What I actually need is an ability to render offscreen bitmaps with GPU in an application that uses Spark UI. This is why I need Flex Mobile project.
    My configuration is the following:
    iPad with retina display
    Sony Xperia Tablet Z
    AIR SDK 3.7 (and I have also tried AIR SDK 3.8 today)

    Hi,
    Check this thread, discussing the similar issue
    Re: What video format that is compatible with Muse

  • How to add a child at the top of the z-order(above a mobile textinput field)?

    We posted a problem yesterday with PopupManager where in a mobile app, we experience some strange problems, and have had to make our own modal Alert panel to solve the problem.
    The problem now is that if the alert panel is displayed over a TextInput field(mobile android app), the text in the textinput  shows through the Alert panel, and is obviusly higher up in the z-order than our alert panel.
    The alert panel  was added as a child of the main app window, and is as far as we can tell the top level component.
    Since the PopupManager does not have this problem, there must be a way to add our panel so it is displayed over the mobile textinput field.
    Is there any way to accomplish this?
    Thanks,
    Bob
    EDT

    Hi Bob,
    I'd recommend posting for suggestion in the mobile development forum, but if you do suspect this is a bug please go ahead and open a new report at bugbase.adobe.com and include sample code so we can see what's going on.
    Thanks,
    Chris

  • Is there a way to save data to just one view in Flex Mobile applications?

    I am having trouble handling data between views in a Flex Mobile application that I am writing. I know how to pass data from one view to another, but I was wondering if there is a way to save that data to a view, then get more data from another view (in this case it would be the same view that the original data came from) and put that data on the same view without overwriting the original data. I would be glad to post some code if anyone needs to see it.

    I think we realise that this is the same question as the other thread.

  • How to insert a background image in VGroup in Flex Mobile

    I want to insert a background image for this VGroup. Help me out. I'm new to Flex !!
    I'm using this code in Flex Mobile Application
    <s:VGroup height="100%" width="100%"
              paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">   
        <s:List id="homeList" height="100%"
                labelField="title"
                dataProvider="{homeNews}">
            <s:layout>
                <s:TileLayout requestedColumnCount="1"
                              verticalGap="5"/>
            </s:layout>
            <s:itemRenderer>
                <fx:Component>
                    <s:ItemRenderer>
                        <s:VGroup>
                            <s:BitmapImage source="{data.source}"/>
                            <s:Label text="{data.title}" />
                        </s:VGroup>
                    </s:ItemRenderer>
                </fx:Component>
            </s:itemRenderer>
        </s:List>
    </s:VGroup>

    I don't think you can add a background image to a VGroup directly, nor can VGroup be skinned.
    As far as I am aware there are probably 2 solutions
    1) use a SkinnableContainer instead skin the container to have a background image and set its layout to VerticalLayout
    2) enclose the VGroup in a Group with a BasicLayout. you can then add a background image to the Group and overlay the VGroup

  • Two styles for a native look (Flex Mobile App)?

    Hello,
    is it possible to use two styles/looks for the same App, that this one will look native on iOS AND on Android?
    Or will I have to build the same App twice to get this?
    - BB

    Check out Jason San Jose's blog posting here: http://blogs.adobe.com/jasonsj/2011/06/ios-theme-for-flex-mobile-projects-proof-of-concept .html

  • Flex Mobile project scaling with Retina display iPad (3rd gen).

    Adobe et al,
    With the new iPad 3 we now have a ton more pixels to utilize. I'm familiar with and have already successfully tested the AIR 3.1+ commandline compiler option (-platformsdk) to get Retina display on the new iPad. In ActionScript mobile projects the content is rendered beautifully on the new iPad. But with Flex Mobile projects, something is happening that causes it to render incorrectly. It's retina display alright, but the size is way too small.
    Below is an image WITHOUT the -platformsdk build tag, that causes the app to be pixel doubled to fit on the new iPad:
    Notice that it's scaled proportionally, even though the text and components are slightly pixelated. Not a big deal, but noticeable on the device.
    This image is taken with the app rendering in Retina display (setting the -platformsdk pointing to iOS 5.1 SDK):
    As you can see, the text/components are rendered really clear, but the scale is way off. Obviously it's getting the width of 2048x1536 from the device, but it's way too small.
    How do I fix this? I've tried changing the applicationDPI, but it doesn't fix it. Setting a width/height of 1024x768 does nothing either. It seems we need to overrride a behavior that causes it to fit everything in so small.
    A little help?
    Thanks,
    iBrent

    Alright, kevinkorngut's answer was the right one. It appears that even though AIR 3.x can render high resolution apps, it still returns the incorrect DPI for the new iPad. In a Flex Mobile project you have to override the DPI using the method mentioned above.
    Here are the results I got:
    Using the runtimeDPIProvider property on the TabViewApplication tag (works for any of the three project types) I created a class that extends RuntimeDPIProvider. To detect which iPad I was on, I used the following code:
    override public function get runtimeDPI():Number
         var os:String = Capabilities.os;
         if(os.indexOf("iPad") != -1)
              if(Capabilities.screenResolutionX > 2000 || Capabilities.screenResolutionY > 2000)
                   return DPIClassification.DPI_320;
              } else {
                   return DPIClassification.DPI_160;
         } else {
              return Capabilities.screenDPI;
    I'm returning a DPI of 320 as this gives the best result that matches the proportions of the device. In other words, even though the iPad DPI is 264, setting the app to 320 gives the correct size at the new Retina display.
    In order for this to work, you must compile the app with the -platformsdk flag pointing to iOS 5.1 SDK, and currently that means you need a Mac running Lion with Xcode 4.3.1. Here's the adt command I used:
    adt -package -target ipa-test -storetype pkcs12 -keystore ~/Desktop/iOS_DevCert.p12 -provisioning-profile ~/Desktop/iOS_DevProfile.mobileprovision newiPadTest.ipa newiPadTest-app.xml newiPadTest.swf -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPh oneOS5.1.sdk
    Also, the -app.xml descriptor file must have the <requestedDisplayResolution>high</requestedDisplayResolution> within the <iPhone> tags.
    Thanks everyone for their replies!
    iBrent

  • Adobe Flex Mobile + AIR - Custom iOS Build Setting

    I am building some Adobe Flex Mobile application using Flex 4.6.0 + AIR 3.5 only for iOS
    This app involves some iOS Native Extension created also by me.
    The thing is that this ANE uses some third party framework (GD.framework from Good Dynamics Technology). That framework requires GD FIPS linker to be used, and for that, i need to set some custom build settings in a .xcconfig file, with this content:
    FIPS_PACKAGE=$(CURRENT_ARCH).sdk LDPLUSPLUS=/Good Technology/Good.platform/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld LD=/Good Technology/Good.platform/FIPS_module/$FIPS_PACKAGE/bin/gd_fipsld
    The ANE compiles OK, but then, I add the ANE to the app, I compile the app, but when I launch the app, it crashes because the FIPS linker was not properly got set on my Flex Mobile project.
    So, my question is:
    Is there a way to set the above configuration on my project like somebody would do in a Xcode project?
    Regards!

    I see your key as a reserved key for iOS. I haven't tested it myself but here's the keys you cannot change. Sure enough, MinimumOSVersion is reserved.

  • Flex Mobile Project UI Templates?

    I'd love to find some flex mobile templates to use in flash builder that already have the platform of many of the functional UI elements in them. I feel this would be a great springboard to learn more through examining pre-built projects as a means to get started with designing my own iPhone apps. Are there sites available where I can purchase such templates? What kind of file extensions am I looking for ui templates that would plug into flex mobile in flash builder? If they are free that is great too, though I don't mind paying for good quality app templates and would appreciate suggestions of sites/services that offer this.
    Thanks,
    Scott

    I did come across scalenine.com/gallery which seems to offer flex themes and skins. Are there other alternatives or similar sites that are available for this purpose of offering project templates to start with for flex mobile?

  • Flex Mobile Project only lists "Google Android" in Target Platforms

    I just downloaded the masters colection cs5.5 and im am using FlashBuilder 4.5.  When I create a new Flex  Mobile Project, only Google Android is a target platform.  I don't see  Blackberry or iOS as options.
    I do see Apple iOS when I create a mobile ActionScript project.
    This must be due to a configuration setting.  Can anyone help?
    i have already looked at this peron post and i have tryed all of the sollutions and none of them seem to work http://forums.adobe.com/thread/867857

    That didn't help me either.  Ultimately, here's what I did.
    I uninstalled and reinstalled the software
    After it was reinstalled, I updated to the 4.5.1 SDK PRIOR to doing any other software update.
    Then I updated the Software
    The software update found all new items and installed them properly (which is what I believe the issue is -- if you update prior to using the 4.5.1 SDK it doesn't install the required bits).
    Now it seems to be working for me.
    Not sure if that's the problem, but that's how I fixed it.

Maybe you are looking for

  • New Wireless-N setup questions

    I just bought the WRT310N router along with the USP Wireless router for my home pc and the Wireless N gaming adapter (that does cabled ethernet to wireless N) for my Tivo to tranfer HD tv recordings to and from my PC.  I was told that the WRT310N rou

  • Blue Screen of Death When Exporting

    Whenever I try to export my video from Adobe Premiere Pro, after about 10 - 15 minutes, I run into a blue screen of death (whea_uncorrectable_error) and it only seems to run into this whenever I try to export, nothing else. This never happened until

  • How to prevent new leave request from SSHR in case of negative PTO accrual

    Hi folks, I am stuck with a peculiar problem. There are employee in our system who have negative PTO accruals and when they try to create Leave from SSHR, the system allows them to create a leave with a warning. *"This absence will decrease the emplo

  • ITunes wont open after upgrade install

    Installed the upgrade for iTunes and now it wont open at all. Clicked on the icon, clicked long on the icon and chose open, and lastly tried to open from applications but I get nothing. Not even an error message. Just a blink of the screen. Please he

  • Aperture 3 and Mobile User Accounts: Don't even think about it

    Hi all. This is more a warning to other with a similar setup than anything else. I use both a desktop mac and a portable. As so, and since I have a Mac Mini Server, my user is what Apple calls a "Mobile User". Basically what it does is this: it allow