Results 1 to 6 of 6

Thread: Practice code between MXML and ActionScript

  1. #1
    Join Date
    Mar 2010
    Posts
    383

    Practice code between MXML and ActionScript

    Hello,
    I want a good practice, and especially a good balance between what I put in them in MXML and Actionscript files.
    It can be for a JSP and Java code pieces embedded in these pages.
    Please help me with this
    - The placement of components is in. Mxml
    - All shares in actionscript files with ActionScript file by component?
    - Plus file methods for Ace Utilities?

    Any more information on this topic is appreciated. Thank you.

  2. #2
    Join Date
    Nov 2009
    Posts
    518

    Re: Practice code between MXML and ActionScript

    I personally do form a screen or a file mxml = + a script file. I never put any script in mxml. And actually I also have files.'re With static utility methods. After more if you name your files in a "conventional" gender "temp.mxml" and "temp.as" you can easily find you there even if you got a lot of files. I guess this will help you.

  3. #3
    Join Date
    Dec 2009
    Posts
    192

    Re: Practice code between MXML and ActionScript

    Graphical side, my application is therefore composed of test.mxml files, and I use actionscript classes test.as containing all methods of access and interaction with the widget. Treatments will be managed by a controller class that will provide the potential trade with a view. A trick, certainly well known but that does not hurt to repeat here is to manage all labels in a function onCreationComplete to make the location of the transparent. The labels are stored in a file called locales.properties then at the right time via the static class resource Manager.

  4. #4
    Join Date
    Nov 2009
    Posts
    335

    Re: Practice code between MXML and ActionScript

    See if the following code can help you

    Code:
    public class (public test extends testGUI test () (super (); 
    this.addEventListenner (FlexEvent.CREATION_COMPLETE, onCreationComplete);) 
    private function onCreationComplete (EVENTS: FlexEvent): void (this.button.label resmanager.getString = ("locales" "LabelBoutton ");))

  5. #5
    Join Date
    Sep 2009
    Posts
    177

    Re: Practice code between MXML and ActionScript

    I have a strange little problem in my Flex application. I use a cutting of my application history meet "best practice" that I have my VMC i.e MXML components on one side, a controller for each component and a model. It is located in one of my MXML components I have a form that I update via my controller (mainly TextInput). But when running, my form fields are not displayed correctly, they still contain the previous values. And where is weird is that when I click on form fields, the new value appears.

  6. #6
    Join Date
    Mar 2010
    Posts
    202

    Re: Practice code between MXML and ActionScript

    On a first glance I have a DataGrid that contains data (mapped to an Array of objects). On this same view I have a button "Edit" which allows me to edit the selected item. Also on this first sight, each time you select an item I save the corresponding object in a variable in my model. Clicking on the edit button, I change my view to find myself on a view containing a form that incorporates all fields of the object to change. The idea is obviously to initialize all fields with the values of properties of the object. And that's where it gets stuck at the first press the edit button I can see the good values in my form but if I return to my list, I select another item and I click "Edit" then I see the previous data.

Similar Threads

  1. How to convert Actionscript 2 to actionscript 3
    By Bol-Bacchan in forum Software Development
    Replies: 4
    Last Post: 17-01-2011, 07:59 AM
  2. ActionScript 3 beginner having problem
    By MADGE25 in forum Software Development
    Replies: 4
    Last Post: 18-11-2009, 05:41 PM
  3. Want to learn ActionScript.....What to Refer?
    By Andrzej in forum Software Development
    Replies: 3
    Last Post: 14-11-2009, 12:12 PM
  4. ActionScript in Flash CS3
    By Manthan in forum Software Development
    Replies: 4
    Last Post: 08-07-2009, 10:18 PM
  5. Actionscript 3 Compiler ?
    By Xavier1234 in forum Software Development
    Replies: 3
    Last Post: 29-06-2009, 05:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,000,030.62102 seconds with 17 queries