Refresh Flex application only once.

Hi All ,
  In my Flex Application i am calling a function  like :
applicationComplete = "addPanel(999999);" , which will add a panel. 999999 is nothing but flag.
But i should refresh application  Only Once .... how to do that..
Thanks in Advance...

The SWC files are within the resource directory of LCDS.
For example:
C:\lcds31\resources\lcds_swcs\FlexSDK4\frameworks\locale\en_US
fiber_rb.swc
C:\lcds31\resources\lcds_swcs\FlexSDK4\frameworks\libs
fiber.swc and fds.swc
You can use the following within ANT.
<!-- Get default compiler options. -->
          <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
            <!-- List of path elements that form the roots of ActionScript
            class hierarchies. -->
            <source-path path-element="${FLEX_HOME}/frameworks"/>
          <!-- List of SWC files or directories that contain SWC files. -->
            <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                <include name="libs" />
                <include name="../bundles/{locale}" />
            </compiler.library-path>

Similar Messages

  • Flex Application Only Compiles in Flash Builder

    Hello,
        I am a newbie trying to become familiar with Flex.  I am starting by building and running some sample applications.  For some reason, the applications will execute inside of FlashBuilder, but I am getting a compile error when I compile them on my linux box. The I used the Flash Builder remote services finder to generate the code for the remote service.  The class that produces the error was generated by Flash Builder.  I have appended the class at the bottom of this post.  Any suggestions?  Thanks in advance.
    --Marco
    [mjmatch@mjmatch-linux flexsphi]$ ant
    Buildfile: build.xml
    compile-flex:
        [mxmlc] Loading configuration file /opt/tools/flex-sdk/4.1/frameworks/flex-config.xml
        [mxmlc] /opt/tools/blazeds/4.0.0/tomcat/webapps/flexsphi/src/client/services/_Super_Foo.as(20): col: 68 Error: The definition of base class RemoteObjectServiceWrapper was not found.
        [mxmlc] internal class _Super_Foo extends com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper
        [mxmlc]                                                                    ^
    BUILD FAILED
    /opt/tools/blazeds/4.0.0/tomcat/webapps/flexsphi/build.xml:16: mxmlc task failed
    Environment
    =========
    Flex SDK 4.1
    Flash Builder 4
    ant compile tasks
    ============
        <property name="FLEX_HOME" value="/opt/tools/flex-sdk/4.1"/>
        <property name="DEPLOY_DIR" value="/opt/tools/blazeds/4.0.0/tomcat/webapps/flexsphi"/>
        <property name="CONTEXT_ROOT" value="flexsphi"/>
        <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"  />
        <target name="compile-flex">
            <mxmlc file="src/client/Main.mxml"
                    services="${DEPLOY_DIR}/WEB-INF/flex/services-config.xml"
                    context-root="${CONTEXT_ROOT}"
                    output="${DEPLOY_DIR}/flexsphi.swf"/>
        </target>
    _Super_Foo
    =========
    * This is a generated class and is not intended for modification.  To customize behavior
    * of this service wrapper you may modify the generated sub-class of this class - Foo.as.
    package services
    import com.adobe.fiber.core.model_internal;
    import com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper;
    import com.adobe.serializers.utility.TypeUtility;
    import mx.rpc.AbstractOperation;
    import mx.rpc.AsyncToken;
    import mx.rpc.remoting.Operation;
    import mx.rpc.remoting.RemoteObject;
    import valueObjects.Bar;
    import mx.collections.ItemResponder;
    import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
    [ExcludeClass]
    internal class _Super_Foo extends com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper
        // Constructor
        public function _Super_Foo()
            // initialize service control
            _serviceControl = new mx.rpc.remoting.RemoteObject();
            // initialize RemoteClass alias for all entities returned by functions of this service
            valueObjects.Bar._initRemoteClassAlias();
            var operations:Object = new Object();
            var operation:mx.rpc.remoting.Operation;
            operation = new mx.rpc.remoting.Operation(null, "getBars");
             operation.resultElementType = valueObjects.Bar;
            operations["getBars"] = operation;
            operation = new mx.rpc.remoting.Operation(null, "addBar");
            operations["addBar"] = operation;
            _serviceControl.operations = operations;
            _serviceControl.convertResultHandler = com.adobe.serializers.utility.TypeUtility.convertResultHandler;
            destination = "foo";
             model_internal::initialize();
          * This method is a generated wrapper used to call the 'getBars' operation. It returns an mx.rpc.AsyncToken whose
          * result property will be populated with the result of the operation when the server response is received.
          * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
          * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
          * @see mx.rpc.AsyncToken
          * @see mx.rpc.CallResponder
          * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
        public function getBars() : mx.rpc.AsyncToken
            var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getBars");
            var _internal_token:mx.rpc.AsyncToken = _internal_operation.send() ;
            return _internal_token;
          * This method is a generated wrapper used to call the 'addBar' operation. It returns an mx.rpc.AsyncToken whose
          * result property will be populated with the result of the operation when the server response is received.
          * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
          * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
          * @see mx.rpc.AsyncToken
          * @see mx.rpc.CallResponder
          * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
        public function addBar(arg0:String) : mx.rpc.AsyncToken
            var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("addBar");
            var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(arg0) ;
            return _internal_token;

    The SWC files are within the resource directory of LCDS.
    For example:
    C:\lcds31\resources\lcds_swcs\FlexSDK4\frameworks\locale\en_US
    fiber_rb.swc
    C:\lcds31\resources\lcds_swcs\FlexSDK4\frameworks\libs
    fiber.swc and fds.swc
    You can use the following within ANT.
    <!-- Get default compiler options. -->
              <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
                <!-- List of path elements that form the roots of ActionScript
                class hierarchies. -->
                <source-path path-element="${FLEX_HOME}/frameworks"/>
              <!-- List of SWC files or directories that contain SWC files. -->
                <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs" />
                    <include name="../bundles/{locale}" />
                </compiler.library-path>

  • Refresh Flex Application

    I am binding values to 2 comboboxes.After re login iam seeing
    each item 2 times in comboboxes

    According to the description: may be the previous values are
    not being removed check the weak references.

  • How Flex application can be loaded once together

    Hi,
    My question is that "how Flex application can be loaded once
    together"
    I am using some images and .swf files and the application is
    loaded in pieces , means differnet parts os the same page are
    loaded in differnet timng and the whole page is not loaded at once
    so how it can be.
    Thanks,
    KTA

    One way would be to hide the rendering behind some splash
    screen. ViewStack would be suitable. In this case, you would want
    to set creationPolicy="all".
    Tracy

  • How can I limit same application only be launched once in one pc

    I designed my first game application. It is a multi-play net chess game, I use RMI to achieved it.But I don't want to any player to open two or more client chess application in their PC(they can cheat in playing by this way).how can I do it?
    kind java fans, please give me some tips or suggestion. I am also a java fan....
    I will show my loyalty to java and sun and J2EE for ever.....

    I had the same problem before. What we did, was to establish a port listener thread inside our application. Once the application starts, it checks if that port is already in use. If not, it establishes the listener and goes on. If the port is in use, the second instance has been started, and can safely terminate. What we did in addition to that, the second instance would pass any commandline parameters through the port communication to the already running instance, so that that program could carry out the task the user requested.
    If the application crashed or is killed by the user, this will work also because then the port will be freed automatically by the system.
    As you are a beginner you are probably not familiar with socket communication. I'd recommend Bruce Eckel's book "Thinking in Java" which has an excellent chapter on socket programming in Java (actually our solution was based upon his examples - thanks for that Bruce!).
    You can download the book here:
    http://www.mindview.net/Books
    Thomas

  • Allow an application to load only once?

    Sorry if this question has already been answered but I would like to know if it is possible to allow an app to be loaded only once so that multiple instances of the program cannnot be started, ergo messing up data files ina a fashion I'd like to avoid.
    Thanks.

    Sorry that was the wrong thread
    On a brighter note - an idea 4 u
    1. Write to a text file and give it a value eg "1" which will be on the server if it's a web app thrfr safe. If it's local then some jolly clever person may delete it + that's you n ur hard wk all in ... I'll stop wittering + continue;-
    2. When your app starts it looks for reads the file eg "Start.txt"
    3. if(fileExists() ...is one way
    4. Or it can read the value - if(startTxt.equals() - may give you the flexibility to reset the value to eg "0" + allow ... whatever
    5. I might be talking cr*p here, but hey, this is a forum, tell someone who gives a damn

  • Flex application running under AIR takes a long, long time to start.

    I have a flex application which runs on a desktop under AIR. The application has an assets folder with 3,500 mp3 soundclips totalling about 50MB. The problem is, the application takes around 90 seconds to load. I'm sure that AIR is scanning the application folder and doing something with the contents because if I delete the assets folder it loads in about 5 seconds. Does anyone know why AIR/Flex would do this, and why it doesn't exhibit the same problem if I run or debug in Flexbuilder on eclipse? It's making my killer app unusable!
    Thanks
    Paulo

    Well, I've spent a bit longer looking at this now, and the problem appears to lie with my encrypted local store. The first thing that happens is for the app to read the product key from the ELS. But, it fails (for some unknown reason). So, the app seems to hang there for 90 seconds until it eventually renders the welcome screen. If I remove the assets folder it still fails to read from the ELS, but only takes a couple of seconds to start the welcome screen. This is where the scanning of the application folder seems to come into play, because if I remove the code which reads from the ELS the app starts within 2 seconds whether the asset folder is there or not.
    I think the slow startup and the scanning of the assets folder are just symptoms of a different problem, i.e. a problem with the ELS. I don't have the same problem with my development environment though - it's only when I test deploy the application.
    Thanks for your help on this problem EgorKDie. I think I should be able to resolve it once I can sort out why the ELS is being awkward.

  • A certain set of keys randomly stop working in a Flex application

    My company has a Flex application (version 4.5.1), and certain keys will stop working from time to time when typing in a TextInput (the MX variety).
    Each occurrence has been on a Windows machine.  I have noticed it in Internet Explorer 11, using 15.0.0.152 (developer version), and co-workers have noticed it on other versions of IE (I don't know which Flash Player versions they were using, but they weren't the developer versions).
    About the only major change I can think of that may coincide with this issue would be having to convert a Google Map from using the Flash API to the JavaScript API.
    The keys that have stopped working are: k, m, !, #, $, %, &, (, -, _, =, +, ', " (capital "K" and "M" still work)
    I can still paste these characters into the text box even when the keys aren't working, so it's not an issue with the text box not accepting the characters.  I can have the application open in multiple tabs and have things working normally in 1 tab but not the other.  I have seen the keys stop working and start working again without refreshing the tab.

    Understood.  We have an extensive set of automated regression tests, and in the rare instances where we do break text input, it's an on/off thing.  This is super interesting because it's so weird, but I have zero theories about why it might be happening.
    If it is a Flash bug, there's probably a really long sequence of steps required to get it into a wonky state where this would occur, and the only way that we would figure out what's going on would be to reproduce it under an interactive debugging session.  I'll ask around, but I've been working on the engineering team since 2006 and I've *never* seen this.  I really like crazy stuff like this, but I've got nothing...

  • How to ensure that latest version of Flex application is loaded

    Hello experts
    I have a bit of dilemma here. I am working on application which is going to be used at various locations (globally).
    Level of technical knowledge of users varies quite a lot so do operating systems authorizations of the PCs they are working on (various companies with different level of security).
    At the moment I am facing issue where some users are still using older release of the Flex application even after refresh and deletion of temporary internet files.
    Is there any way to ensure (using some AS code or Flex project settings) that only latest versions of SWF files are loaded (not the one from buffer/cache)?
    Regards
    Michael

    BTW, I have added following line to the HTML template/wrapper:
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    but it is still picking up older version of SWF file on certain PCs. It does read latest HTML (wrapper) file though. Seems that caching is only enabled for either certain file types or files exceeding certain size.
    I have decided to do something a bit daft (or cheeky, depends how you look at it) as temporary solution and rename 2 main files (main SWF and HTML) to something like:
    Application_name_ver_XYZ.*
    It can be done in couple of minutes after release build has been exported (no need to update project itself). That way I can fool browser so it will pick up latest version (since its different file with different name).
    Main application consists of 10+ modules and some of them are compiled into separate SWF files. I am loading them inside application using ModuleLoader component. I have set parameter cachePolicy to "off" as I am not going to rename all these modules each time I am releasing new version of application.
    The end result is that main application is refreshed but all modules that are being loaded are picked up from cache (old versions).
    So as a last resort I have decided to change folder name of my application. That way all the files (main app and modules) are considered as new files since location of all of them has changed. It is just a workaround, it does work but it carries certain risks. If user will use old link application will still load (older version) and then consequences can be catastrophic (even corruption of data).
    Has anyone experienced same issues?
    I know these are more browser/network issues but how do I deal with them. Some of these people cant ask IT for support (for various reasons). Is there anything else I can do to ensure that users across the board will use latest version of application?
    Regards
    Michael

  • Restarting A Flex Application Programmatically

    Howdy folks,
    I have just created a database driven user management system
    which works wonders, but I'm having a problem with logging out a
    user. By far the easiest, sure fire way of doing this would be to
    clear the users login in the database (not really relevant to the
    problem) then restart the application programmatically (as if the
    user pressed the refresh button in thier browser) which would bring
    them back to the login screen at the start of the application. Is
    re-initialising the application possible to do in actionscript?
    If not it would involve clearing user specific variables,
    resending http requests which relate to the login, removing
    permissions based controls and all this over many modules... just a
    hell of a lot of what may be unesscessary work, especially if all
    that really needs to happen is the application to re-initialise.
    Any help on this would be amazing!
    Many thanks

    quote:
    Originally posted by:
    mattyb1515
    My initial suggestion is to wrap your flex application in a
    PHP web page and let PHP do the authentication/deauthentication. To
    logout the user you can create a PHP function that destroys the
    session variable and then refresh/redirect to the login/home page
    of your application.
    Thanks for the reply but I'm afraid it isn't as easy as that.
    I'm a php guru and I do use PHP and FlashVars for use with
    authentication but only to 'remember' user information when the
    user opens up a different application (basically if they log into
    one application, theyre logged into the rest). Using 'out of
    application' authentication is of no use when it comes to a
    permissions based user system and applying dynamic permissions
    (such as "this user can see this menu", "this user cant press this
    button") to a flex application. It's clearing these permission
    variables I'd prefer not to do if the application can be
    programmatically re-initialised which would have the same
    effect.

  • How to use postback property for JSF to reneder a popup only once

    Hi All,
    I'm using java script function to show a JSF page as popup. I have called the javascript function on page load of another JSF page.
    How do i make sure that the popup is getting rendered only once and not everytime the page is getting refreshed .
    Can i use postback property in JSF page for this purpose ?
    Thanks in Advance.

    try postback..
            Boolean postBackValue = (Boolean)resolveExpression("#{adfFacesContext.postback}");
            Boolean defaultBooleanValue = new Boolean("false");
            if (postBackValue.equals(defaultBooleanValue)) {
      public static Object resolveExpression(String expression) {
        FacesContext ctx = FacesContext.getCurrentInstance();
        Application app = ctx.getApplication();
        ExpressionFactory elFactory = app.getExpressionFactory();
        ELContext elContext = ctx.getELContext();
        ValueExpression valueExp = elFactory.createValueExpression(elContext,expression,Object.class);
        return valueExp.getValue(elContext);
      }

  • CF/Flex Application Wizard Details Page

    Hi,
    Not sure if this is possible (seems like it should be). I
    have the following data model in SQL Server (2005):
    table name (relevant columns)
    person (first name, last name)
    member (member number)*
    contact (email)*
    location (state)*
    Person is the base object/table and the other three tables
    have foreign keys connecting them to the person table (all have a
    personId column).
    I setup a master page, no problem. I can grab the person's
    first and last name, member number, email and state and display
    them on the member-master page.
    The issue comes when I go to create a member details page. I
    can step through and create the necessary form fields from the
    tables (connecting them all via their common personId column). When
    I go to save the detail's page details, Eclipse (v3.2.x) crashes on
    me. Every time. However, if I only create a form for the details
    page with two tables (say member and person data), I can create the
    details page and use it without any issues.
    To get around this seeming two-table limitation, I edited the
    Adobe/CF generated content to manually add the beans, DAOs,
    gateways and AS files for the other tables. Doing this does create
    the desired details page, however, Flex and CF are REALLY slow to
    grab/return the requested data to the respective form fields (and
    there is not that much to grab in any of these tables).
    I'd like to know if this is just how I have to go about it.
    Does the CF/Flex Application Wizard have a limit on how many tables
    can be joined in a details page?
    I have a project with a much more complex data model and
    would love to generate a quick application for my client to check
    out and I do not know if I've encountered a limit of the
    application or if I am doing something wrong in the Query Builder
    itself?
    Also, any thoughts on why Flex and CF would be so slow to
    return the data when I manually added the other tables to the
    details page form? I'm on an intra-office network, connecting to a
    computer via an ethernet router and the sample DB only has 2000
    records in it...all with simple text and date columns?
    Sorry for the long post and thanks, very much, in advance for
    any thoughts or advice.
    Best,
    Craig

    Never mind, I figured it out.
    I'm Using IIS
    I needed to go look at the properties.
    On the web site tab, the TCP port was set as 80.
    In FlexBuilder Window > Preferences > Cold Fusion >
    RDS Configuration
    Select localhost > The default port number added there was
    8500
    Once I changed that to 80 and clicked on test connection, all
    was hunkey dorry

  • Performance Of Flex Application?

    Hello all
        Recently I went through video tutorials of flex and found it to be great.But I have one question regarding performance. If I am not wrong then Flex application works like this, Entire application is converted into swf file and for navigation between pages of application there is concept of states.Whatever data is required for different states is  get by using HTTPService,WebService etc . wheras if  we talk about normal web application built using PHP every page and data is loaded from server .For each navigation, data plus markup(HTML/DHTML CSS javascript etc.) to show that data or content is loaded.It has a benefit of downloading only that part of application which is required.
           For example if we have shoping store applicatiion and it has a search page and product list page to display products list in different formats like grid or table then markup plus data in normal web application will be loaded with each request.If user click on search page only then that  page is loaded from server and if user want to view the search results in table format only then that page is loaded.
       I want to know how this work in Flex application.For data part It is clear that for each state whatever data is required is get by using services like HTTPService,WebService etc. But how state presentation part is get?Is the entire swf file containing all states related information is loaded before running the applicatio? For example as in our previous example presentation part of all states like shopping store serch state, product list in table format state and product list  in grid format state in the begining of application .later on if user click on search link it will already have that state view information and it will get data for search  part and put that data into view and present it to the user.For search result also it will  be already having information about how to present that data  so it will get data  only and present it to user.
        If Flex works as i stated above then if we have very big application with many different stats then user has to wait for the loading time off all the states.Or there is provision for some backgroud loading of states that as soon as user request the application first time he gets the first view and then on other states are loaded in backgroud?
       If all the states are loaded at begining of application then what will be performance of application with many states?(Means in that case swf file of compiled application will be of big size and it will take time to load in browser.)
      can anybody tell  me about all  these things in detail.I am sorry if my understanding of Flex is wrong.I am newbie.
    Thanks in advance .

    This seems more of an RIA performance question than a Flex specific one.  Honestly though, modules aren't needed often in my experience (depends greatly on requirements).
    You say that "only the part of the application that is needed" is downloaded, while this is technically true (a bit of an oversimplification as there are other advantages to be had from RIAs), you still have the round trip time required for every single request to the server.  Since an RIA is generally a single bulk download (which may not even be needed if there's caching going on), usually you're talking about a single wait of a few seconds for loading vs multiple waits of a few seconds for page refreshes. 
    Even if the initial load time is as much as ~10 seconds (for the first visit), does that outweigh the 1 to 3+ second page refresh penalty constantly interrupting the user's work flow over time?  Also consider Flex's AMF protocol, which blows competing formats (esp XML based) out of the water on performance.  RIAs (especially Flex) win the performance game.

  • How to start Flash Media Encoder 3.2 from Flex application with run time parameters?

    Hello ,
    I'm developing the application to stream High Quality video.While streming by default camera/microphone settings the qulaity of streaming is not upto my expected level.I want to stream through Flash Media Encoder.My aim is the user login to the application.Video/audio qulaity details are retrived from shared object stored in the client machine.The login user name only gathered at run time & it will be the streaming profile name to Encoder.Once the the Encoder started the outgoing video will be come into screen to client.Please guide me How to start Flash Media Encoder 3.2 from Flex application with run time parameters(User name as  streaming name) without manually start the FME?
    Thanks in advance.
    Regards
    Sasharyuva

    Hi MarcSaphiron,
    Could you please send the samples?It will be much helpful to complete my
    job within the deadline.
    Thanks in advance.
    Regards,
    Sasharyuva

  • RuntTime Loading of Flex Application Components

    I am about to make the jump, and start using Flex for a new
    web-application, however I am worried about loading time. Flex
    applications compile to a single SWF file that needs to be
    dowloaded in its entirety by the client. As we add new features to
    our web-app, the size of the SWF will grow. What is the easiest way
    to develop the app so that components are loaded on-demand, and not
    all at once. For example, if we add a community board to our
    web-app, I only wants this to be loaded for users that click on the
    link to the community board.
    Thanks for your help.

    You have a few options,
    1) the easy one. Createa hybrid app and break it up into
    multiple movies. And then use an IFrame to load the different
    "movies" as needed.
    2) Use RSL libraries. Flash is smart use a component once or
    10 times, it doesn't matter. Flash will only load the code for the
    movie once in the .swf. You'll find your applications don't grow
    that fast after the initial size. However, with RSL you can move
    all of the common components into their own SWF which your users
    browser will cache (since it's a non changing swf)
    3) Use the ApplicatioDomain feature/object. To know what that
    is - read this blog. There are a few posts about this very subject
    from one of the Flex engineers.
    http://blogs.adobe.com/rgonzalez/2006/06/multiswf_applications.html
    http://blogs.adobe.com/rgonzalez/2006/06/modular_applications_part_1.html
    hth,
    ---nimer

Maybe you are looking for

  • Problems with Windows in my MacBook Pro

    I have installed Windows 7 on my MacBook Pro, but the right click doesn't work and the sound doesn't work .. What I have to do with this problem ? Any help please ! Thanks

  • Backup is turning off my itunes

    when i try updating my iphone when it starts to sync or back up then itunes stops working and the program closes.... help needed cos im a iphone mong. i have the ios4 update and itunes 10

  • Transport Tool Not able to connect the DB

    Hi, When i check the  Transport Tool in STMS i got  this  problem :   Link to database failed This is tp version 372.04.08 (release 700, unicode enabled) ERROR: No connect due to DbSl Load Lib Failure ERROR: environment variable dbms_type is not set.

  • KM4M-L Video not working (1337 needs help)

    KM4M-L 2500XP 2-512Mb Corsair 3200 XMS ONBOARD VIDEO OUT NOT WORKING. AGP VIDEO OUT NOT WORKING. Brand new MB and components. Computer is POSTing ... I think (I can hear the beep and the keyboard lights up.) I have tried all configurations and know a

  • Payment Details Problems

    I got an e-mail asking me to change my payment details. There are four problems: One, my payments are still going through, including the current one, which is processing. Two, nothing about my credit card has changed from the most recent payment (suc