Flex and XML Variables

Hi, I'm new to Flex and I tried to understand this, but as I can't find many tutorials on the net thought I may as well ask here.

I currently have a Flex application that connects to a PHP that connects to the MYSQL db, then writes the XML, then it displays it in the data grid.

Now, it's the problem.

My XML looks a like that
<>tiles

<>tile
< x >/< x > 1
< y > 2 / < y >
< timage > http://www.google.com/intl/en/nav_first.gif < / timage >
< / slab >

<>tile
< x > 2 / < x >
< y > 3 < /y >
< timage > http://www.anotherimage.com/image/anotherimage < / timage >
< / slab >

< / tiles >

I am trying to assign each timage to a variable with the url and then get a picture using the source of the url to display. I hope you understand what I'm trying to say that I'm not very good at explaining. The help is much appreciated thanks.

Maybe I understand, either, but here's my point of view:

(1) I think you should use TileList, no tile
(2) set the dataProvider of the TileList on the object that you receive from your xml file

Here's an example of super fast and dirty I basted together the TileList component example in the documentation:

http://www.Adobe.com/2006/mxml"initialize ="initData (); ">

Import mx.controls.Button;
Import mx.collections. *;
private var listArray:Array =]
"" http://www.google.com/intl/en/nav_first.gif ", "
"" http://www.google.com/intl/en/nav_current.gif ", "
"" http://www.google.com/intl/en/nav_page.gif ", "
"" http://www.google.com/intl/en/nav_next.gif " "
[Bindable]
public var TileListdp:ArrayCollection;

private void initData (): void {}
TileListdp = new ArrayCollection (listArray);
}
]]>


itemRenderer="mx.controls.Image"/ >

Al

Tags: Flex

Similar Questions

  • Flex and XML VRs. Database

    I want to build a Web site using flex that you display data on a Web site. All of the combined data will be large enough (about 120 000 questions 120 000 answers, ect... (about 8 database columns (or fields) in total). My question about xml is, if I'm not going to display the data when it is called (by a button) and display only 10 to 20 questions and answers at once and not add data to the database or an XML on the site, could I store data in several xml files or a large xml file? Or would it be better to put the data into a database? If yes why? Sammy

    If you use several smaller xml files and call them necessary, this is a good approach.

    Again, maintenance on all of these files is more difficult than with a database. But a DB means additional administration and requires an intermediate level.

    I did this both ways.

    Tracy

  • Flex and XML, and Combobox.

    Hello.

    First I'll apologize for whatever it is repeated. I've had a search through the forums, but it was a long and painful process, and I couldn't really find anything useful.

    Secondly, I'm new to Flex, please stick with me if I come out with things that should be obvious.

    The question.

    I created an application base of Flex. This becomes the XML data in a PHP page that querys a MS SQL DB.

    I have the data to fill a datagrid ok, this was done to ensure that it was getting the good things in the DB.

    What I actually want is to put the data in a combobox control, but what I currently get in the CB is [object Object] for each element.

    I really don't know where I went wrong, because the code is implemented that I found on a bunch of websites.

    I really appreciate any help, advice, tips or advice on where I'm wrong with this.

    Thank you very much.

    Now, codey bit...

    Try to add this attribute in the ComboBox element:
    labelField = "trust_name."

    It should look like this:

  • All tables and xml are be NULL problem

    Hello guys

    I'm working on a project that uses the format of loading xml, e4x and intensively, table manipulation and it was fine but now I'm stuck on a strange problem.  All code was beautiful and application work and respond in a desired way, but then mystourisly it stopped working and started to return NULL values in almost all the tables of the (internal) actionscript and XML varibales.

    Now every time I have to load the xml file and set the loaded xml internal variables, internal values get only NULL instead of data.
    The same is the situation with the berries, I created a few components in mxml, and when I passed them to reference tables, the code gets compiled successfully, but again Array has only null values [that code worked very well too]

    I wonder if Adobe Flex did an update reduced to silence or something similar and it's the result of this things!

    I use Adobe Flex 3.2 SDK 3.3 on windows Vista Ultimate Edition.

    Please check this project attached, import it and see if you face the same problem

    Thank you

    Link to the problematic project

    http://isolatedperson.googlepages.com/problemXperiment.zip

    Problem screenshot

    http://isolatedperson.googlepages.com/xmlissue.jpg

    HTTPService to load the data. You will have less problems.

    
    
         
              
         
         
         
    
    
  • I can not compile for iOS more with Flex and AIR 3.8

    Hello team Adobe and others.

    I use for my business framework 4.10 Apache projects Flex and adobe Air 3.8.

    I always had problems to compile and publish iOS apps (with Air 3.5 front), but with AIR 3.8, it was a miracle, I compile my projects without error on Windows... until today.

    I am running this command in DOS to compile my project:

    "C:\Program Files\Java\jre7\bin\java.exe" - jar "C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.10 - 3.8\lib\adt.jar AIR ' - package - target the ipa-app-store - hideAneLibSymbols non - implementation service-profile 'S:\Directory_to_MobileProvision.mobileprovision' - shops pkcs12 - keystore"S:\Directory_to_Certificats_ios.p12"- storepass my_private_password Proginov_FVTE_V45.ipa Proginov_FVTE_V45 - app.xml active com config_app.xml [email protected] Proginov_FVTE_V45.swf - extdir"S:/Directory_to_ANE/air_3.8_pnv_3.00 ".

    And I get this result after 1 hour of compilation:

    Bug iOS.png

    If you want, I can send you my file bin-release-temp and DONKEY to try for yourself, but I need to private messaging, because I don't want to publish my project private to everyone.

    Thank you

    Could you please try the growing size of the java heap in your order.

    for example, "C:\Program Files\Java\jre7\bin\java.exe" - Xmx2048m-jar...

  • Record and play variable a string will not copy

    I have a variable of string - serialization of an xml variable result - in a process.

    It has a length of 'unlimited '.

    When I opened the recording and playback, there is text indicating the beginning of sequenced xml:

    < node_x

    That's all that I can see.

    Unfortunately, the option 'copy value' in the menu contextual is dimmed, just at the moment where I most need!

    This is normal behavior for a scenario like this?

    Is there anyway that I can get to copy...

    Thanks in advance!

    At least try to open and close the variable perspective.

  • Flex and InDesign application WYSIWYG editing

    Hello

    I'm creating an application using Flex and InDesign Server. I am facing an interesting problem with it.

    Flex application renders a model (contain images or text) based on XML. After editing the text content by the user, this XML model will change to InDesign server and will generate PDFS. It works very well. But if I compare the PDF model and model in Flex then I sometimes noticed the problem about text WYSIWYG template.

    I noticed this problem in the content of multiline text.

    Can someone help me?

    Thanks in advance.

    Pierrel

    To do this, create a custom algorithm to map the online composer and InDesign text rendering style line.

  • Collection ArrayCollection in flex and ArrayList in java




    Salvation of this world don't
    Here I am with my problem with the hope someone can solve it
    I am totally new to flex and I work only for 3 days in flex. and I learned a little more.
    I want to get the values of database that is received from java to flex datagrid object by using the data provider.
    I did quite well in my opinion. But I could not produce the result in the data grid. Since I am very new. I don't know what is happening.

    my code is here, please help me.

    My mxml file: Myadmin.mxml

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "vertical" >
    < mx:RemoteObject id = "ber" destination = "dock" showBusyCursor = "true" fault = "faultHandler (event)" > "
    < name mx:method = "getBerth" result = "resultHandler (event)" / >
    < / mx:RemoteObject >

    < mx:Panel id = 'Top' title = "MaBase" width = "100%" height = "40%" enabled = "true" >
    < mx:TextArea id = "sql" width = "100%" height="100%"/ >

    < mx:Button label = "Execute" click = "handleSend ()" / >

    < / mx:Panel >

    < mx:Panel id = "bottomPanel" title = "Results" width = "100%" height = "60%" enabled = "true" >
    < mx:DataGrid id = "dg" dataProvider = "{result}" width = "100 percent" height="100%"/ >


    < / mx:Panel >
    < mx:Label id = "resultLabel" text = "Onumae puriyale ulgathulae" / >

    < mx:Script >
    <! [CDATA]

    Mx.rpc.events import. *;
    Import mx.collections. *;
    Mx.controls import. *;
    Import mx.utils.ObjectUtil;




    caching empty ArrayCollection collection so that we don't continue to create
    new

    private var emptyResults:ArrayCollection = new ArrayCollection();

    [Bindable]
    public var result: ArrayCollection collection = emptyResults;







    private void resultHandler(event:ResultEvent):void
    {
    Alert.Show ("event.result table of results", ObjectUtil.toString (event.result as ArrayCollection collection));
    result = ArrayCollection (event.result);
    var myCursor:IViewCursor=result.createCursor();
    var oldLength:int = result.length;

    Alert.Show (oldLength.ToString ());




    }

    private void faultHandler(event:FaultEvent):void
    {
    Alert.Show (event.fault.faultString, "Error");
    }

    private function handleSend (): void
    {


    ber.getBerth ();


    }




    []] >
    < / mx:Script >


    < / mx:Application >

    My java object: Berth.java


    package samples.sqladmin;
    import java.sql. *;
    Import Java.util;
    import java. IO;

    public class Berth

    {
    Public Shared Sub main (String args []) throws exceptions
    {
    List ArrayList = getBerth();
    System.out.println ("the list is =" + list);
    }

    public static ArrayList getBerth () throws Exception {}
    Connection con = null;
    Statement st = null;
    ResultSet rs = null;
    ResultSetMetaData rsmd = null;
    List ArrayList = new ArrayList();
    HashMap line = null;
    try {}
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch (ClassNotFoundException nctf) {}
    System.out.println (CNFE.getMessage ());
    }
    try {}
    con = DriverManager.getConnection ("jdbc:odbc:Jurong", "","");
    St = con.createStatement ();
    String sql = "select * berth;
    RS = ST. ExecuteQuery (SQL);
    rsmd = rs.getMetaData ();
    int colCount = rsmd.getColumnCount ();
    While (RS. Next {}
    line = new HashMap();
    for (int i = 1; i < = colCount; i ++) {}
    Row.put (rsmd. GetColumnName (i), rs.getString (i));
    }
    List.Add (Row);
    }

    }
    {} catch (SQLException sqle)
    System.out.println ("enna da yogans eeeeee...");
    System.out.println (sqle.getMessage ());
    }

    If (con! = null)
    con. Close;
    If (st! = null)
    St.Close ();
    back list;

    }

    }

    my remote-config file is:

    < destination id = "dock" >
    Properties of <>
    samples.sqladmin.Berth < source > < / source >
    < / properties >
    < / destination >

    I got the table in flex collection object, but it gives the values received in java

    Please help me.
    Thanks in advance
    yogans.

    Hi my dear friends

    I'm sorry to put you in trouble. I got the result. The problem is
    not with the code. its with my system. The problem is that I have configured
    same name for datesource for system and user DSN DSN name. After that I deleted
    a user DSN data source. I got it working.

    Thank you very much william, thank you much Nelson for your spontaneous response

    Thank you
    Yogans

  • Flex php XML return connection

    Hello! IM new to flex and I have a question I hope someone can answer. I have a flex application I'm building that needs to display a list of dynamic images, preferably with icons. I built the list of titles, but I do not know how to connect the HTTPService data to the list. the HTTPService returns XML data, it must be easy. but, as I said, Im really new. Please help me!

    "arthurlockman" wrote in message
    News:g7kk4g$177$1@forums. Macromedia.com...
    > Hello! IM new to flex and I have a question which I hope someone can
    > response. I have a flex application I'm building that needs a list
    > of
    > dynamic images, preferably with icons. I built the list, but I have no
    > soaps
    > How to connect the HTTPService data to the list. the HTTPService is
    > return
    > The XML data, so it must be easy. but, as I said, Im really new. Help, please
    > Me!
    >

    Depending on what you are willing to do, you can either use a Repeater with
    a picture or a custom component that contains an Image or you can use a list
    component to display an Image or a custom with a base Image component (or
    SwfLoader, or Loader) inside. It is literally a ton of stuff on it
    in the help. Here are a few places that you can try:

    Help > Flex Start Page > creating a Simple RIA
    Help > Help contents > User Interfaces
    -With the help of data providers and Collections
    -Controls
    -Image
    -SwfLoader
    -With the help of data-driven controls
    -With the help of converters point and section editors
    -Dynamically repeating controls and containers

    Here is an example that might get you quickly * if * you are not the type
    to read the docs:

    http://examples.Adobe.com/flex2/inproduct/SDK/PhotoViewer/PhotoViewer.html

    HTH;

    Amy

  • Problems using rpc between Flex and CF

    Hello
    I have a problem to send objects between Flex and Coldfusion using the gateway of the AUTHORITY of the new Version of Coldfusion.
    The transfer of CFCS to Flex works, but I can't send a complex object to a CFC.

    The Error Message is:
    faultCode:Client.Message.Encoding faultString:' cannot create class of type 'flex. HotlineSystem.bin.cf.Category'. ' faultDetail: 'Type' flex. HotlineSystem.bin.cf.Category' not found. »

    Im going totally nuts... the transfer of CF to Flex works very well, the mapping between category.cfc and category.as work of ist. But if I try to send a Flex object category to my CFC is not.

    I hope someone can help.

    Thank you!

    CFC function:
    < cffunction "insertCategory" access = "public" returntype = name = "Sub" output = "false" >
    < cfargument = "category" type name = 'flex. HotlineSystem.bin.cf.Category"required ="true">

    < cfquery name = "insertCategory" datasource = "hotline_system" >
    INSERT INTO category (category_idCategory, name)
    VALUES (#category.getCategory_IdCategory () #, ' #trim (category.getName ()) #')
    < / cfquery >


    Category.CFC:

    < cfproperty displayname = 'Category' alias = 'flex. Index HotlineSystem.bin.cf.Category"=" I model a single category ">
    < name cfcomponent = "idCategory" type = "numeric" default = "0" >
    < name cfcomponent = "category_idCategory" type = "numeric" default = "0" >
    < name cfcomponent = "name" type = "string" default = "" >

    < cfscript >
    Initialize the SWC with the default property values.
    variables.idCategory = 0;
    variables.category_idCategory = 0;
    variables. Name = "";
    < / cfscript >

    < name cffunction = "init" output = "false" returntype = "flex. HotlineSystem.bin.cf.Category">
    < cfreturn this >
    < / cffunction >

    < name cffunction output = "getIdCategory" = "false" access = "public" returntype = "any" >
    < variable cfreturn. IdCategory >
    < / cffunction >

    < name cffunction output = "setIdCategory" = "false" access = "public" returntype = "Cancel" >
    < name cfargument = "val" required = "true" >
    < cfif (IsNumeric (arguments.val)) or (arguments.val EQ "") >
    < cfset variables. IdCategory = arguments.val >
    < cfelse >
    < cfthrow message = "' #arguments.val #' is not a valid numeric" / >
    < / cfif >
    < / cffunction >

    < name cffunction output = "getCategory_idCategory" = "false" access = "public" returntype = "any" >
    < variable cfreturn. Category_idCategory >
    < / cffunction >

    < name cffunction output = "setCategory_idCategory" = "false" access = "public" returntype = "Cancel" >
    < name cfargument = "val" required = "true" >
    < cfif (IsNumeric (arguments.val)) or (arguments.val EQ "") >
    < cfset variables. Category_idCategory = arguments.val >
    < cfelse >
    < cfthrow message = "' #arguments.val #' is not a valid numeric" / >
    < / cfif >
    < / cffunction >

    < name cffunction = output "getName" = "false" access = "public" returntype = "any" >
    < variable cfreturn. Name >
    < / cffunction >

    < name cffunction = output "setName" = "false" access = "public" returntype = "Cancel" >
    < name cfargument = "val" required = "true" >
    < cfset variables. Name = arguments.val >
    < / cffunction >
    < / cfproperty >

    Category.As:

    package classes
    {
    [Bindable]
    [RemoteClass (alias = "flex. HotlineSystem.bin.cf.Category")]
    dynamic public class
    {
    public var idCategory:int;
    public var category_idCategory:int;
    public var name: String;

    public void category() {}

    }

    public void fill(idCategory:int,_category_idCategory:int,_name:String):void {}
    this.idCategory = idCategory;
    This.category_idCategory = category_idCategory;
    myIdName = name;
    }


    public function getIdCategory (): int {}
    Return this.idCategory;
    }

    public function setIdCategory (): void {}
    this.idCategory = idCategory;
    }

    public function getCategory_IdCategory (): int {}
    Return this.category_idCategory;
    }

    public void setCategory_IdCategory(category_idCategory:int):void {}
    This.category_idCategory = category_idCategory;
    }

    public void setName(name:String):void {}
    myIdName = name;
    }

    public function getName (): String {}
    Return myIdName;
    }
    }
    }

    Problem solved:
    Apparently, it is not possible to transfer an object from a class action script for coldfusion.

    The solution is to encapsulate the object (in my example category) in a table.

    Strange... but it works.

    Best regards

  • Flex and ColdFusion on shared server

    Good afternoon everyone,

    So I, like many here I guess, use CF for quite awhile now and I am very interested in what Flex can do. I used the CF adapter several times now with great success on my LOCAL Dev machine, but when I download on my web server (hosted by the My Site host), it does not work. Instead, it throws an error springing from the somrthing on a flexgateway.

    So what I was hoping that someone could tell me my host does not support or is at - it something I don't in my setting up a Flex project I have to do? I had the impression to run a simple Flex application, you didn't need something special at the end server except the flash player 9.

    When I use Flex and CF adapter I just follow the steps to create what I need. I do not use the part "login" so I uncheck this option. Except that I use all the default settings.

    And in regards to my host, I have another Flex application up, which works perfectly, but it uses no CFCS to fill in the data of a database as I am doing now.

    I searched for many hours a lot now for a simple question answer with no luck.

    Here, any help would be greatly appreciated.

    OK, I see. So I think between you and your host that they provide you with a URL string of some sort that you have placed in the crossdomain.xml on your roots.

    Something like this maybe:

    And the crossdomain.xml file is on the root of your web or in the bin folder?

  • HP first and true variable E

    HP first and true variable E

    Home view

    example 1:

    0.1 enter Sto Alpha E

    Enter 8 alpha E

    X ERROR: invalid exponent number

    Press OK

    example 2:

    0.1 enter Sto Alpha E

    8 * enter alpha E

    .8

    example 3:

    0.1 enter Sto G

    Enter alpha 8 G

    .8

    Why doesn't the first 8th?

    Thanks for the quick response.

    This means E as a variable is not consistent in the simple mathematical operations.

    Such as:

    5 b/C is ok

    5th/C not ok

    concerning

    RS

  • Share the expression in step.result.numeric and locals.variable

    Hello together,

    I'm new in the world of TestStand and I have a simple question.

    How can I share the output of a step between the expression step.numeric.result (NumericLimitTest) and a variable 'local '? I need the output of a time step value for the comparison of the limit and once to give to the next step.

    Thank you

    Dusan


  • APEX 4.2 translate data 'function and Global Variable declaration '.

    Hello everyone,

    I use APEX 4.2.1.00.08 and I wonder if there is a way to translate "Function and Global Variable declaration" textarea. Any other script text box is available for translation, but not this one.
    I know what the code is loaded on the header, but may contain important alert messages of global functions.

    Thanks in advance.

    Hi Grandmaster,

    "Function and global variables declaration" contains the JavaScript code, that is why it is not wise to include in the standard translation process.

    In my opinion, you have several options to access your translated messages:

    -) Use Application-> Substitutions or
    -) Store your message in the form of component shared-> SMS and and assign it to an application with the APEX_LANG element. Api MESSAGE (http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_lang.htm#CHDBCEAB)

    In 'Function and Global Variable declaration' use substitution syntax to replace the value. For example:

    var myDeleteMessage = "&G_MY_DELETE_MESSAGE.";
    ...
    alert(myDeleteMessage);
    

    where G_MY_DELETE_MESSAGE would be a part of the application or the request for Substitution.

    Concerning
    Patrick
    -----------
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Flex and its future

    After that I spent almost three years to design an application (Flex and Air), my developer are now telling me that Flex as a language is dying and that I should consider a re - write using HTML and Java.

    My investment was considerable, so it was a shock for me - especially since I'm close to launch the application on the desktop and smartphone.

    Someone in this community reassure can me (or confirm), or maybe give me an idea. The application in question is very sophisticated and a rewrite just seems like a lot of work. I mean, who really knows what is the future of software in languages, it seems to change on a six pence.

    I would be grateful if someone could perhaps look at the app, give me an idea.

    Thank you very much (I'll post the link if anyone wants to watch the app).

    Where the hell were you, wordtapper? This kind of question/discussion has come the forums for a while.

    If the application works and is usable on the target platforms, then I'd go with it, BUT keep in mind that the long term future of flex as a programming language is very much in the balance. Adobe has little interest in it and the platform it runs on (Flash runtime) is not viable on Apple Mobile products in the browser and run on other mobile browsers in the long term.

    who really knows what is the future of software in languages, it seems to change on a six pence.

    Quite right, but it has not been filled since Mobile really took off and changed the whole game plan, so the tech world is rapidly changing.

    If you are close to launch, personally I go ahead with Flex and then look at your options if the application takes off. Better to re-think, if necessary with a successful delaying application there and gamble that this restructuring will be useful.

    If your application runs in the browser and mobile target, I'd be nervous.

Maybe you are looking for