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

Similar Messages

  • How to load a FLEX application in an AIR desktop application.

    I am creating an AIR desktop application (mx:WindowedApplication). I need to load another remote FLEX application (mx:Application) inside my AIR application.Is it possible ? If then ,please mention how to achieve this ..

    If it is bundled with the air app, then it's as easy as using the SWFLoader class.
    If it's loading from a remote host, you need to load it into your app as a ByteArray first.
    More info here: http://aaronhardy.com/flex/loading-a-remote-module-into-a-local-app/
    The example is for Modules, but the principal is the same I believe.

  • Trying to make a flex application scalable in its display size by using a "Host-swf" - Problem

    We created a flex application using Flex 3. What we are
    trying to do is to make this application scalable in its display
    size. That means we want the application to scale itself to exactly
    fit the size of the browser window without using a scrollbar like
    normal Flash-swfs do. Sadly flex application don't scale like a
    normal flash swf.
    To get a workaround for this we created a so called
    "Host-swf" with flash CS3. This Host-swf loads the flex application
    and adds it as a child. And voila: When calling the Host-swf our
    application can scale.
    We used this code to achive this:
    var oUrlRequest:URLRequest = new
    URLRequest("Flex-Application.swf");
    var oURLLoader:Loader = new Loader();
    oURLLoader.load(oUrlRequest);
    addChild(oURLLoader);
    This works perfectly as long the browser window is larger
    then the resolution of the host-swf (900*600) when calling the url
    for the application:
    Picture showing the
    scaling
    But it doesnt't work out when the browser window is smaller
    than 900*600. The application is then shown with a scrollbar, and
    when resizing the browser window the scrollbar is still there:
    Picture showing the
    application with scrollbar
    Maybe anyone already tried to achive the same thing and has a
    different solution for us?
    Thank you in advance!

    "noby_95" <[email protected]> wrote in
    message
    news:gpsue6$rhh$[email protected]..
    > We created a flex application using Flex 3. What we are
    trying to do is to
    > make
    > this application scalable in its display size. That
    means we want the
    > application to scale itself to exactly fit the size of
    the browser window
    > without using a scrollbar like normal Flash-swfs do.
    Sadly flex
    > application
    > don't scale like a normal flash swf.
    >
    > To get a workaround for this we created a so called
    "Host-swf" with flash
    > CS3.
    > This Host-swf loads the flex application and adds it as
    a child. And
    > voila:
    > When calling the Host-swf our application can scale.
    >
    > We used this code to achive this:
    >
    >
    > --------------------------
    > var oUrlRequest:URLRequest = new
    URLRequest("Flex-Application.swf");
    > var oURLLoader:Loader = new Loader();
    > oURLLoader.load(oUrlRequest);
    > addChild(oURLLoader);
    >
    >
    > -------------------------
    >
    > This works perfectly as long the browser window is
    larger then the
    > resolution
    > of the host-swf (900*600) when calling the url for the
    application:
    >
    http://www.gansl-online.de/Bild1.jpg
    >
    > But it doesnt't work out when the browser window is
    smaller than 900*600.
    > The
    > application is then shown with a scrollbar, and when
    resizing the browser
    > window the scrollbar is still there:
    >
    http://www.gansl-online.de/Bild2.jpg
    >
    > Maybe anyone already tried to achive the same thing and
    has a different
    > solution for us?
    When I set the Application width and height to a percentage
    number, it will
    change its size based on the size of the window.

  • Click through transparent flex application

    hi
    I need to load transparent flex application (over div with intractive element) and  have the posssibility to click through this application.
    In flash profesional it is possible but in flex ?
    thanks
    E

    any reply on this problem ?

  • Air application loading flex applications(no Air) with flex linked as RSL.

    Hello
    I am trying to make an AIR application which loads number of flex applications(no AIR). The subapplications are using the Flex SDK as a RSL, and each of them can use different version of the SDK.
    The problem is that the subapplicationsare trying to load the needed SDK from local filesystem, which they are not permited.
    public class CrossDomainRSLItem extends RSLItem
         override public function load(progressHandler:Function,
                                      completeHandler:Function,
                                      ioErrorHandler:Function,
                                      securityErrorHandler:Function,
                                      rslErrorHandler:Function):void

    Hi again.
    Is there any way to reliably edit the trust files with AIR application?
    As I see it we have to make the user to add our folder to the trusted locations, or to use some application which can find and write in the FlashPlayerTrust (native for the specific OS installer for example.). (even finding this directory with an AIR application seems not 100% reliable).
    Thanks in advance for you help.
    Ps: Right now I am trying to patch this.
    I compiled some sub-applications using custom preloader class(the controlling class, not the UI), where I removed the RSL loading. After that in an ApplicationDomain I load all the RSLs with loaders. After that I load the sub-application in the same domain. On paper this should work, but the sub-application can't find the classes from the RSLs(the first exeption is that there is no definition for spark.components.Application)

  • Loading pdf file in flex application (not in AIR)

    Hi,
    Could any one suggest opening pdf file within flex application with blazeds.
    we have used the following code to open pdf file in the same window
    navigateToURL( new URLRequest( "http://localhost:8080/PdfSample/jsp/PdfContent.jsp" ),"_self");
    But we want to load the pdf file in a vbox.Similary to the below image
    Is it is possible to load pdf file in flex application,if so how can we achieve it

    Hello Mariush,
    I have to display the content of the PDF in the flex application. If not PDF directly, is there other workaround for this. Or can I display the content of the MS word file, if not PDF.
    Thanks and Regards
       Khalid Chaudhary

  • 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

  • Flex application is not loading in IE6

    Hi,
    I have requirement .
    One web application will be loading flex application as inline iframe.It is not loading flex app in IE6 where as working fine in IE7.
    Is there any problem with IE6 while loading flex app
    pls help me it is production issue

    what version of flashplayer does it have?
    Flintstones version?

  • How to load pdf in flex application for android os

    I loaded pdf in stagewebview which works good in IOS but not in android.
    The pdf file is loaded from the application storage directory.
    Please help me in resolving the problem. Thank you in advance.

    I think that my problem was i couldnt see pdf in my app running in ipad simulator of FlashBuilder in a flex mobile project in my laptop. what i read said that StageWebView create an instance of default browser in your machine. So that if we cant see pdf in ipad simulator is because also you cant see it in the default browser.
    Apart of this, i run this example in other machine, and i could see it, so its not problem of your code, but from your browser probably doesnt have pdf plugin installed. Correct me if i´m wrong.
    Cheers!

  • I am looking for a load testing tool for my flex application

    I am looking for a load testing tool for my flex application having a limited budghet of 1000-1500$. I have gone through NEOLoad,WebUiLoad all are very expensive.

    Do you have iPad 1 or 2?
    You can connect iPad 1 via a VGA adapter to any projector with a VGA input (all projectors have this).
    You can connect iPad 2 via VGA or HDMI.
    I like Epson or Sony for projectors.

  • Flex Application Not loading in case of using RSL.

    If anyone can help, I release my Flex Application using RSL but now this appication is not loading on some system. I upload application.swf and framework_3.0.0.477.swz and also crossdomain.xml but application not uploading and getting error  #2032.

    Search the internet for solutions for that error.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • 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

  • [Advanced] Sudden 'Movie not loaded' error with multi-swf flex application

    Hello!
    We've stumbled across a very strange problem, which we can't reproduce regulary, and therefore can't find a way to debug it.
    Our flex application consists of multiple .swf-files, each containing a piece of functionality we call module (though it's not a regular flex module), which interact with other modules in the application.
    But sometimes user interaction lead to the following problem. Some block of the application (which originated from certain module) becomes black, and right-clicking on it brings 'Movie not loaded' context menu item. After some time, the whole application becomes 'not loaded'.
    I have no idea of the cause of such a behaviour. I suppose some changes were introduced in Flash Player 10.2 - we didn't experience this problem before.
    Adobe guys, may you direct us and give us an advice on how to debug such a problem, and what might be a cause?
    It look like this:
    1)
    (in black area was a window similar to the one in background)
    2)
    (After right-click. You can see flash player version here)
    We're completely lost, and will really appreciate any help or advice.

    use an online tracer and network monitor to see what you're doing.

  • Loading a server side flex movie into a client side flex application

    Hello all,
    I'm running a local flex application that's loading another
    flex movie from an external url into a container (via SWFLoader).
    After setting up the whole crossdomain.xml issue, i'm facing
    a weird problem:
    The loaded swf shows up streched and does not inherit any
    styles from the parent application. It also can not trigger any
    function inside the parent application or the other way round.
    When i load the same swf from my local filestore everything
    is fine. It's also working properly when i load the parent
    application from the same webserver the "loadin" swf comes from...
    Does anyone know the problem? How can this be solved? Can it
    be solved? If not, i'm in trouble..
    Best regards,
    N.

    I'm not sure why it would be stretched. As for the other
    issue, look at Security.allowDomain. If you want the loaded SWF to
    have access to the parent Flex app, the parent Flex app must grant
    permission using allowDomain. And vice-versa.

  • Stop flex application to load after clicking of stop button on browser

    Hi,
    I am running in a problem where i have the flex application, while loading the application in the middle of the application page i want to stop loading the application on clicking of browsers stop button.
    Please help me....
    thanks in advance...

    One technique woudl be to create a new button that the user would interpret as the submit button (I will call this a pseudo submit button). You would make the real submit button invisible (so the user cannot see it or click on it, but it can still be used programmatically). Now on the pseudo submit button put your code to validate your information. If this validation passes then click the real submit button. To do this run this code:
    submitbuttonname.execEvent("click");
    If the validation fails then put a message up. In this technique the real submit cannot be pushed until the validate succeeds.
    Hope this helps.

Maybe you are looking for