Globalization in AIR Flex???

Hi,
I am doing a AIR application with the new version of Flex
Builder, I need to do an application with different languages, like
Spanish, English, French and more.
Where I can see some example and how I can do it? I need to
translate labels, title panels, everything dynamically.
Then the user will choose the language for use the
application.
Regards,
evspeart

I don't have any source code, but I can see a way to do it...
Basically, create a function called
ChangeLanguage(PickLang:integer):void that runs on Application
creation complete, or with a button push, or whatever.
Inside of the function create either a select statement or a
nested if statement. select would be better, but I can't remember
the exact code to do it in AS3, so I'll revert to a PHP psudocode
to give you the idea
switch(PickLang){
case 1: //english
Application.Title = "Welcome!";
break;
case 2: //french
Application.Title = "Bonjiour!"; // pardon my french
break;
Its a bit clumsy, but it would work.
The other idea is to store all of the text for the labels in
a different XML file for each language. Then do something like the
above example to choose between the different bindable xml sources
depending on what the user picks. and have the label text feed off
of which ever XML file is returned. it would be a lot cleaner code
wise... just more complicated with the data handlers. Look up
examples for skinning, as that's pretty much what you'll be doing.
You'll have a french skin, and an english skin, etc...

Similar Messages

  • Dynamic forms in AIR/Flex

    OK, this is another of those "Is AIR the right tool for the job" questions. And I have zero previous exposure to Flash/Flex, just doing a fast forward through all available information, to reach an assessment.
    The app in question is mainly a vanilla database client (server component exists and has a ReSToid HTTP interface). It involves task lists, forms, all the ususal stuff and is glueing together a bunch of other (pre-existing) apps on the client  which are to be spawned from the glue app.
    In contrast to the legacy app which is to be replaced, the database structure shall be customizable per customer site and consequently have custom edit forms.
    Now, how to implement custom, dynamic forms in AIR/Flex? It seems logical to store the forms together with custom table in the database, but in which format? It is impossible to just store MXML forms, as Flex is a compiled language and I didn't find a hook to pull in extra MXML from an external source.
    Is there a Flex component turning an XML description of a form into a form on the screen, as mx:FlexNativeMenu can turn XML into a menu?
    Or am I looking into the wrong direction? It seems an AIR/Ajax soulution would be able to just pull the custom form in HTML from an external source and use it. But AIR/Flex is looking to be the friendlier and more productive environment....

    You can dynamically compose a form at runtime via as3.
    Here is a quick example.
    HTH.
    ps: afaik there is no component which automatically builds a form from xml.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()">
    <mx:Script>
    <![CDATA[
         import mx.controls.TextInput;
         import mx.containers.FormItem;
         private function init():void {
              var formItem:FormItem = new FormItem();
              formItem.label = "FormItem1";
              var textInput:TextInput = new  TextInput();
              formItem.addChild(textInput);
              myForm.addChild(formItem);
    ]]>
    </mx:Script>
         <mx:Form id="myForm">
              <mx:FormHeading label="My Form"/>
         </mx:Form>
    </mx:Application>

  • Air Flex with work problem in swfLoader...

    Hello,
    I have a problem with swfLoader in Air Flex. I create a swf flash that must be loaded into Air application. When I run it insde of Flex Builder, all is ok. But when I install it, the embed flash dont work in component "InputText" and the TextField (in mode "InputText")... Simply I cant click in this and keyboarding... The problem dont is in SandBox...
    Thanks,
    Jonathan

    Due to some reason  the text input fields used inside the flash presentation are not editable only  when the application is running on installed AIR.
    When the flash  presentation is loaded in Flex it is not allowing the user click inside or edit  the text input, to over come this we are setting the focus to text input field  when ever the user clicks on it so that the cursor focus is set inside the text  input field and user will be able to enter data.
    Below is the code  change implemented in flash.
    inputText.addEventListener(MouseEvent.MOUSE_DOWN,  setFoucusToTextInput);
    function  setFoucusToTextInput (e:MouseEvent)
                stage.focus  = inputText;

  • Air,Flex ,Cold Fusion There is a problem with P4990 Release of AIR Updater

    using Air/Flex/cf I am not able to connect to my Cold Fusion
    component after running the P4990 UPdate this morning, It worked
    fine on both an XP and Vista Machine running P4880 , but now even
    after a restart my simple connection to the cfcomponent is hanging
    and will not run.
    this worked fine in the release I was running this morning,
    runs fine in a browser just not after patching ?
    two questions ,
    where can I download the P4880 Release Again
    and is this a bug or a change ? ,
    if its a change what is the new way of connecting.
    Ray

    I read through the notes and iI even recreated my air file,
    but it is still hanging , here is the html for the connection
    to the app as well as the flex remote connection I am using, it all
    works in the browser, but again just hangs in air after this update
    <cfoutput>
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="
    http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"
    name="VPR_Users" width="1003" height="650" align="middle"
    id="VPR_Users">
    <param name="movie"
    value="/VS/Modules/Administration/plugins/users/ui/screens/VPR_Users.swf?u=#Application.V iper.userID#"
    />
    <param name="quality" value="high" />
    <param name="bgcolor" value="##869ca7" />
    <param name="allowScriptAccess" value="always" />
    <embed
    src="/VS/Modules/Administration/plugins/users/ui/screens/VPR_Users.swf?u=#Application.Vip er.userID#"
    quality="high" bgcolor="##869ca7"
    width="1003" height="650" name="VPR_Users" align="middle"
    play="true"
    loop="false"
    quality="high"
    allowScriptAccess="always"
    type="application/x-shockwave-flash"
    pluginspage="
    http://www.adobe.com/go/getflashplayer">
    </embed>
    </object>
    </cfoutput>
    FLEX CONNECTION CODE (flexgateway is my cfc)
    <mx:RemoteObject id="VIPER" destination="ColdFusion"
    source="VS.bin.engine.flexgateway" showBusyCursor="true">
    <mx:method name="setUserInfo"
    result="setUserInfoResult(event)"
    fault="Alert.show(event.fault.message)"/>
    </mx:RemoteObject>
    the function that runs and hangs
    private function init():void{
    pUserID = Application.application.parameters.u;
    VIPER.setUserInfo(pUserID);
    the variable is entering into flex fine, the flex application
    is loading into the air harness fine but when I run the page ,
    it hangs like it is not even connecting.

  • Get Machine Name and IP Address from Air Flex App

    New to Air..... Is there a way to get the name of the machine
    and the ip address for the client running the Air application? Not
    that this matters, but the applcation would be a Flex 3 application
    built specifically to be deployed to the Air runtime. I need to be
    able to have the Air/Flex application know what the client's
    machine name and ip address is. Can this be done?
    Thanks

    Hi Frank,
    Well I am using Developer Suite 10g Release (10.1.2.0.2) ..I've gone thru the link what you have sent me and noticed that whatever updations of conf file or classpath its already there so i guess needn't to modify cause I think my release 10.1.2.0.2 has did already as webutils been bundled with it.
    Well What i did is to double click on ATTACH LIBRARY and browse the location to find webutil.pll and finally attached it...even though its showing me all the procedures like clientinfo and others...
    on my block's canvas I've put a button and used this trigger to get client info function like this.
    when-button-pressed trigger of INFOBUTTON
    DECLARE
    o_clientinfo varchar2(50) := Webutil_clientinfo.GET_HOST_NAME ;
    begin
    message(o_clientinfo);
    end;
    but when I am trying to open this form its simply not showing up..strange thing is that there is no error as well...so plz kindly guide me how to get clientinfo hostname or ipaddress using that library function.
    thanks

  • AIR/Flex to HTML

    I would like to know about some way to convert AIR/Flex programs into HTML5.
    I've read about Google Swiffy but I have programs with AS(Action Script) code, or I can use another way to do this?
    tnks.

    Hi,
    There's no simple way to convert an HTML AIR app to flex.
    But it is possible to create HTML Root windows from a Flex
    AIR App. By root window, I mean the same kind of window that is
    launched when you launch an HTML AIR App.
    For more info, look at the HTMLLoader.createRootWindow()
    call. (This will be available from a Flex AIR app as well)

  • Is Adobe AIR/Flex good to begin in game creation ?

    Hi all !
    I have a little question, I want to begin to learn how to create little games (2D games first) (I'm more a Web/Server Side Programmer/Administrator than a Desktop pPogrammer), and I would like to know is Adobe AIR/Flex (without using the Flash IDE if possible) is good for that ?
    It looks a lot easer than the others ways (Java, C++, python), no needs to think in "threads","mutex",etc and other things like that, and the multimedia API help a lot for the video/sound side
    So, what about creating games with Adobe AIR ? What about performances ? Is it possible to create 3D games ?
    Thank you !

    Personally I'm still debating whether to start learning iPhone development or AIR at this particular point.
    At any rate, anything you can do in Flash you can do in Air, so I'd probably start with the Kongregate game creation tutorial. It's AS2 not AS3, but it will give you an idea what you can accomplish with a couple hours of development.
    No idea how good it is for 3D, but a lot of those "virtual tour" things are done in Flash. Probably not your best starting point if your plan is to make your own FPS but...

  • Problem with NetConnection in Adobe AIR(Flex) using Flash Media Server.

    Hi
    I am creating a small chat application using Flash Media server. I have already created all my user interface components in Flex(Adobe AIR).In this application rather than sending text messages user can also  send  file to another user in his friend list.
    problem what i am facing is, when i am sending file through FMS most of time it send successfully but for some files while sending  application loss netconnection.
    so i would like to know, rather than closing application what are other condition when FMS loses network connection?
    Any help would be appreciated .
    Thanks.

    Hi. It looks like your code is not finding the mp3. At least,
    I can reproduce your error code by removing the mp3 from the
    directory, or renaming it.
    Btw, if you test with FF instead of IE, you'd see the error:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2032:
    Stream Error.
    at KZFlash_fla::Sound_2/KZFlash_fla::frame1()
    Hope that helps.

  • New Adobe AIR  + Flex Application

    Hey Folks,
    We are excited about the launch of our app built on Adobe AIR. The Public Beta of it was launched yesterday.
    It's a backup software/service with free local backups to your disk/drives and online backups to the Amazon Cloud.
    Check it out at http://home.vembu.com/
    The UI is Flex-based and Adobe AIR
    -Dhamu

    Hi,
    Try setting myhtml.htmlText = "" before doing the removeAllChildren.

  • How to import your Air/Flex project from FB 4.6 to FB4.7

    It seems so easy.. however, I can't figure out how to do it.
    I used to build my projects (Air projects with merged SDK) in FB4, FB4.5 later FB4.6 and now 4.7. But when I import my old project, it gets an old 3.4 AIR SDK. Wtf?
    When I go to the project settings and want to change the sdk to my Flex 4.6 with Air 4.0 SDK, I cant! it sais "This project will use AIR SDK 3.4".
    So I go to FB settings, add the new SDK in Flex SDK's but still I can't change the SDK from my project.
    When I create a new Flex project, I can select the right SDK's. But I never made a Flex project. I make Air projects.
    So it seems to me that Flash builder 4.7 can have multiple Flex SDK's (merged or not) for Flex projects only, and just one SDK for Air projects which you can't be changed.
    O and the default is also freaking old.
    Now who the hell came up with that stuff at Adobe?...
    So I located the Air SDK my FB is using, and replaced it with my Flex4.7 and Air4.0 SDK. No luck, whole FB went nuts.
    Anyone has a clue?

    FlashBuilder (doesn't matter what version) screws this up all the time. There are so many files related to configuration of the workspace, the projects within the workspace and the eclipse environment that it gets messed up all the time.
    I never have this problem in other editors Eclipse based editors like InteliJ, Aptana, FDT etc. It's just Adobe growing / extending a tool which has bad programming in it and not bothering to go back and fix the root of the problem before expanding on it. FlashBuilder doesn't get the attention it deserves from Adobe. If they are not careful in the not too distant future when WebGL is supported on all the major web browsers and tools are released to translate WebGL to OpenGL ES iOS and Android applications AIR might see itself becoming a thing of the past. Esepcially when the tools can't even save the state of the projects they themselves created correctly.

  • Cant install air-flex projects

    Hello, my AIR applications cant be installed in my system
    because Windows do not recognizes files with .air extension.
    Do you know if is needed additional software (like Adobe AIR
    Runtime) to install my air based flex projects? I thought that the
    installers detected if you have or not the necessary libraries to
    run the file.
    Regards

    http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_1.html
    Uops!

  • Adobe Air+ Flex applications to build from database

    Hi,
    I know how to create a Flex application from database.But
    when we are developing a flex application from database using Adobe
    AIR,i'm not able to run the application.It is throwing an error
    saying .xml file is missing.Can anyone help me out with
    this?

    In Flex, an application can be created from database by
    following the steps as follows:
    STEP 1. Create a new Flex Project and name it as for example,
    “FLEXDB”. Select the
    application type as “Web Application (runs in Flash
    Player)” and Application server type as
    “ASP.Net”.
    STEP 2. Go to Data->Create application from database.
    Select the project as
    FLEXDB”.Create a new Connection to SqlServer 2005 and
    specify the database and name that connection
    as”TestConn”. Then select any table (for example
    DashboardRegion) from the list of tables and click
    “Next” button.
    STEP 3. Select the Server language as “C# with Web
    Services”. Click “Finish”.
    STEP 4. Then the following files and folders will be created
    under the project “FLEXDB”
    automatically.
    • DashboardRegion.mxml -- is a design page.
    • DashboardRegionScript.as -- defines web service
    object and capture the results and assigns the results to the
    corresponding UI Component.
    • DashboardRegionConfig.as -- calls the Web Service
    file.
    • DashboardRegion.asmx -- calls the Class Files
    (DashboardRegion.cs file).
    • Web.config – defines the Connection string
    • App_Code is a folder which contains the following
    files
    o DashboardRegion.cs that interacts with SQL Server 2005 and
    return the results.
    o TestConn.cs that defines connection to SQL Server 2005.
    STEP 5. Run the application “DashboardRegion.mxml
    ”.We can see the Database results
    Fetched and displayed in the corresponding UI Component in
    the output.
    Now we are trying to create a Similar Flex Application using
    Adobe AIR.
    For this, we have to follow similar steps mentioned as above
    with a slight modification in STEP 1. It will be as follows:
    STEP 1. Create a new Flex Project and name it as for
    example, “FLEXDB”. Select the
    application type as”Desktop Application (runs in Adobe
    AIR)” and Application server type as “ASP.Net”.
    The remaining steps are same as above.
    When we try to run the application
    “DashboardRegion.mxml”, it is throwing an error saying
    “DashboardRegion-app.xml” file is missing. To solve
    this issue we tried creating “DashboardRegion-app.xml”
    file manually, the application is running but, again throwing an
    error saying “Unable to load WSDL. If currently online,
    please verify the URI and/or format of the WSDL
    (../DashBoardRegion.asmx?wsdl)”.
    Can any one please suggest a solution for this?
    Or Help me how to connect sql server 2005 in the Adobe AIR
    application that are buid using Flex builder.

  • Adobe AIR  + Flex Application

    Hey Folks,
    We are excited about the launch of our app built on Adobe AIR. The Public Beta of it was launched yesterday.
    It's a backup software/service with free local backups to your disk/drives and online backups to the Amazon Cloud.
    Check it out at http://home.vembu.com/
    The UI is Flex-based and Adobe AIR
    -Dhamu

    Is there any other way to install PDT?
    Thanks.

  • SWF in Adobe Air Flex

    Dear webmates :
    I have created a simple application in Flex / Air  which embeds an HTML file, it was working fine, until the moment I used a swf animation inside that HTML... it is not being displayed in the Flex/Air app !! Why is that ? How am I supposed to make it work ? Please help..
    Notice that I do not want to run only the SWF, but I want the whole HTML which contains the SWF... thanks in advance !

    Are you using HTMLLoader to load this HTML page?  If not, I recommend to use it.  Check it out here, there is an example at the end of the webpage.

  • Launch URL from AIR (Flex) App

    Hi There,
    Is it possible to launch a window containing a foreign URL
    i.e. something that will launch cnn.com?
    My customer wants an AIR App that will take the user to their
    homepage..
    Thanks,

    Hi
    try navigateToURL()
    http://livedocs.adobe.com/flex/2/langref/flash/net/package.html#navigateToURL()
    A pretty simple browser can be built only by using mxml
    tags

Maybe you are looking for

  • WWYD: Battery is better today, but I received a new phone in the mail already...

    I'm a first-time iPhone user (own other Apple products though). I ordered a 4S on pre-order day, received it on release day (via mail). Immediately I noticed that the battery life seemed poor, and I had other problems as well (when calling another ph

  • InDesign Server, Applescript, and SOAP

    Hi All, I've scoured these forums and the rest of the 'net as best I can, but I can't seem to find a solution for my issue, so I'm hoping maybe someone out there can shed some light on it for me. I have InDesign Server running on one box (IP of 192.1

  • I cannot put my iMac to sleep using the power button since the Mavericks upgrade.

    As the title states, I can no longer put my computer to sleep using the power button. I have to put it to sleep using the mouse. I miss the convenience of the power button. The window for energy saver is not like the display in support, it is missing

  • Error counts

    Hello! i installed my router yesterday and its been online the past 24 hours. havnt had any real problems apart from my online gaming still.. but looking at my router i noticed this: Is my error count bad for past 24 hours? VPI/VCI 0/38 Type PPPoA Mo

  • Failed to save document.

    Post Author: Nicholas CA Forum: General I've been working on this report for several hours. Changing formulas, updating the stored procedure, verifying the database... now all the sudden when I try to Save or Save As, I'm getting an error message: "F