SWFLoader Problems

I have a major application that involves a Flex application acting as a main container, and it loads loads other Flex applications into it via SWFLoader.
Originally, the main container was built in Flex 3 and I was loading Flex 4 child applications into it.  This was working fine until the Flash Builder Beta 2 came out.  So I decided I am going to port my main container from Flex 3 to the Flash Builder Beta 2 and I am having all sorts of problems with the SWFLoader implementation.
I want to have two different configurations for the SWF content to load into the SWFLoader.
The first configuration should be totally sandboxed such that the only way that the child SWF can communicate with any other SWF is via LocalConnection.
The second configuration should be such that individual child SWFs are in sibling ApplicationDomains so they can have their own Singletons of the same name, but, content needs to be able to be dragged and dropped from one child SWF to another child SWF.  For instance, the child SWFs will often have AdvancedDataGrid implementations and they'll often need to be able to have content dragged from one to the other.
I currently have a SWFLoaderFactory class that has a static method as such:
        public static function getSWFLoader(sandbox:Boolean=true):SWFLoader
            // create the SWFLoader instance
            var swfLoader:SWFLoader = new SWFLoader();
            // not sandboxed
            if(!sandbox)
                swfLoader.loadForCompatibility = true;
            // sandboxed
            else
                var context:LoaderContext = new LoaderContext();
                context.securityDomain = SecurityDomain.currentDomain;
                context.applicationDomain = new ApplicationDomain();
                swfLoader.loaderContext = context;               
            // return the SWFLoader instance
            return swfLoader;
This was working exactly as I needed it to when the main container was in Flex 3 but now in Flex 4 it is broken.
What happens is with the swfLoader.loadForCompatbility set to true, the following error occurs:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.controls::SWFLoader/initSystemManagerCompleteEventHandler()[E:\dev\gumbo_beta2\framewo rks\projects\framework\src\mx\controls\SWFLoader.as:2466]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.managers::SystemManager/initHandler()[E:\dev\beta1\frameworks\projects\framework\src\m x\managers\SystemManager.as:3197]
I'll add that the child SWFs will always be on a different domain than the parent SWF container.
I would appreciate it if someone could help me solve this problem once and for all and create the optimum configuration that will allow me to do what I want to do.

If it crashes consistently, file a bug with the SWFs involved.

Similar Messages

  • Tabnavigator with swfloader problem

    Hello,
    I'm trying to run a tabnavigator component with each tab having a separate swfloader.  Each swfloader is a different datagrid that I populate with the SystemManager.application['functionName'] = 'parameters' method.
    My problem is that when I a few tabs, only the very last tab's datagrid will have data, and the others will be blank.  What's wrong with it?
                public var matrixLoader:SWFLoader;
                public function addTab(tabName:String, swfURL:String, setFunc:Array, searchString:Array):void {
                    var tabCanvas:Canvas = new Canvas();
                    tabCanvas.label = tabName;
                    tabCanvas.id = tabCanvas.label;
                    tabCanvas.horizontalScrollPolicy = "off";
                    tabCanvas.verticalScrollPolicy = "off";
                    functionName = new Array(setFunc);
                    paramString = new Array(searchString);
                    matrixLoader = new SWFLoader();
                    matrixLoader.minHeight = 100;
                    matrixLoader.minWidth = 100;
                    matrixLoader.percentWidth = 100;
                    matrixLoader.percentHeight = 100;
                    matrixLoader.addEventListener(FlexEvent.UPDATE_COMPLETE, created);
                    matrixLoader.load(swfURL);
                    tabCanvas.addChild(matrixLoader);
                    tabnavi.addChildAt(tabCanvas,tabnavi.numChildren);
                public var loadedSM:SystemManager;
                private function created(event:FlexEvent):void {
                    loadedSM = new SystemManager();
                    if (matrixLoader.content != null) {
                        loadedSM = SystemManager(matrixLoader.content);
                        if (loadedSM.application != null) {
                            for(var i:int = 0; i < functionName.length; i++){
                                loadedSM.application[functionName[i].toString()] = paramString[i].toString();
    Any help would be greatly appreciated.

    Hopefully before you maybe loaded the subapp via
        swfLoader1.source="subapp.swf?foo=1
        swfLoader2.source="subapp.swf?foo=2
    And code somewhere in the Application checked parameters.foo and set foo
    appropriately:
        <mx:Application initialize="checkFoo()"...
        <mx:Script>
            public var foo:int;
            private function checkFoo():void
                foo = parameters.foo;
    Now you just load the module once w/o parameters
        private var modInfo:IModuleInfo = ModuleManager.getModule("module.swf");
    And once the module is ready:
        var module1:IMyModuleInterface = modInfo.factory.create();
        module1.foo = 1;
    And
        var module2:IMyModuleInterface = modInfo.factory.create();
        module2.foo = 2;

  • SWFLoader Problem

    I'm using Flex 3.2 and Flash 10 and trying to load
    sub-applications using the SWFLoader. But if I don't add the
    SWFLoader to a Container or something that is already in the main
    application before actually trying to load the sub-application, I
    get a nullpointer:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at
    mx.controls::SWFLoader/initSystemManagerCompleteEventHandler()[C:\autobuild\3.2.0\framewo rks\projects\framework\src\mx\controls\SWFLoader.as:2174]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at
    mx.managers::SystemManager/initHandler()[C:\autobuild\3.2.0\frameworks\projects\framework \src\mx\managers\SystemManager.as:2862]
    I don't want to add the SWFLoader to the stage until it
    actually has completely loaded. I have attached a sample
    application that is doing the same thing. It contains two
    sub-applications and one main application. There are comments in
    SubAppPrototype.mxml that point out the problem.

    Continue that way if you insist, but you are introducing
    complexity to solve what may be a simpler problem
    Application size is not significant.
    When working with SWFLoader, one typical problem is that even
    though the loader is rendered and complete, the application it
    contains is not yet complete. So communicating with an app loaded
    by SWFloader requires a two-step event-listening process.
    Look over this example:
    http://www.cflex.net/showFileDetails.cfm?ObjectID=690
    Tracy

  • SWFLoader problem(make the whole application zoomed in Mac)

    Hi,
    I am using swfloader to load an swf.  Everything works on different browsers in pc(safari, chorme, IE and ff). But when I launch this in safari in mac machine. whiling the application loading he swf file(same swf file(the size is 1024*720), whole application zoom in(everything become bigger). 
    Any help is appreciated.
    flash player version 10.1
    Thanks

    This bug seems only happened if your screen's resolution is not a native resolution. For example, if your screen's native resolution is 1650*1024 and you set your screen resolution to be 1440 * 1050, the whole application will be zoomed once you are trying to loader a swf.
    I believe this is a bug of flash player.

  • Mx.controls.SWFLoader removes content from displaylist when resizing?

    Hi!
    I'm a Flex noob but AS3 old-timer.
    I have a Flex app that loads in AS3 apps using SWFLoader - problem is that when the Flex app is resized the SWFLoader seems to take the loaded content off display list temporarily, the loaded AS3 apps are dependant on stage object and it will break them when stage comes unavailable.
    Is is possible to fix this in mx.controls.SWFLoader somehow?
    If not, how can I use flash.display.Loader instead?

    Loader is a low-level control and can’t be used directly in Flex containers.  I don’t think it is expected behavior that the SWFLoader gets removed from the stage, so I would want to know why and see if there is some simple setting that can prevent it.

  • Problem with width/height of swfloader

    I am loading in a swf file via swfloader and I want the dimensions to be 600x300:
    <mx:SWFLoader id="loader1" width="600" height="300"/>
    In the loaded swf file, everything is layed out based on the dimensions.  I check the dimensions in the actions of the the first frame of the timeline.  When the swf file is embedded in html, this.stage.width is equal to 600.  However, when I load it via the SWFLoader above, this.stage.width is the size of my browser window.
    Why is this?  Is there a way to force it to stick to the dimensions set by SWFLoader?
    Thanks,Christie

    I figured out the problem.  Turns out there is only one stage and that is the stage of the flex application.  I went around this by adding a function to the embedded swf that allows me to resize it.  I'm not sure how I would have gotten around it if I did not have control over that file, but that is a  moot point for now.

  • 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;

  • Problem resizing application in SWFLoader content in DividedBox

    Hi all,
    I have some strange behavior in my application. I am extending the plugin system as described by Chris Cantrell, the problem I have might be of more general nature though.
    http://blogs.adobe.com/cantrell/archives/2010/03/extending_air_applications_with_plugins.h tml
    I am loading a plugin (which is a WindowedApplication compiled to an .swf file and loaded via a SWFLoader) into a NavigatorContent within a ViewStack within a DividedBox. I am using pure AS3 files for logic and mxml skins for the GUI layout.
    When I resize the main application window, the SWFLoader.content.application is resized twice (Resize Events seem to come from WindowedApplication window_resizeHandler (first) and setStageWidth (second)) in the main application window. The first event seems to return the correct size, the second seems to ignore the size of the other content Containers in the DividedBox and returns a stage width equal to the width of the DividedBox part that contains the SWFLoader, which also resizes the whole window to that size again.
    When I only move the BoxDivider of the DividedBox nothing actually happens to the size of the SWFLoader.content.application.
    I tried using some manual Bindings via BindingUtils to set NavigatorContent.width, SWFLoader.content.width and SWFLoader.content.application.width but no success. Any Ideas how I could force the components to the right size, first when resizing the main application window, second when moving the BoxDivider?
    Thank you,
    rob

    postet my workaround here
    http://lifesdev.blogspot.com/2011/02/resizing-dynamically-loaded-swfs-using.html

  • SWFLoader unloading problem

    I'm loading a swf into a SWFLoader. Problem is when someone
    doesn't want to see it anymore, I can't get rid of the swf playing.
    I can turn of it's visiblity, but you can still hear the audio
    playing. How can I unload the swf when using the SWFLoader
    component?

    I think maybe you can set the loaderContext to null maybe.
    You could probably also do a:
    mySwfLoader.content.stop(); or gotoAndStop(1); if your swf
    responds to that.
    You can always set the source to null. That's off the top of
    my head without checking the SDK docs.

  • Another problem with swfloader (subapplication) and gc

    I am trying to load a swf sub-application using the swfloader. I know that this is a well-discussed topic but i cannot find the reason why the air gc does not get rid of the loaded subapplication or -in a better way- why does it get rid of some intances and other instances remain in the memory (cumulative instances 10, instances 4 never destroyed). Here is my code
    ParentApplication
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           width="500"
                           height="1000"
                           creationComplete="onCreationComplete()">
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.controls.SWFLoader;
                private var loader:SWFLoader;
                private function onCreationComplete():void
                    addEventListener(MouseEvent.CLICK, loadSwf);
                    addEventListener(MouseEvent.RIGHT_CLICK, unloadSwf);
                    function loadSwf():void
                        loader = new SWFLoader();
                        loader.addEventListener(Event.UNLOAD,unloaded);
                        loader.cachePolicy = "off";
                        loader.width = 500;
                        loader.height = 1000;
                        loader.trustContent = false;
                        loader.loadForCompatibility = true;
                        addElement(loader);
                        var mySubApplication:File = File.userDirectory.resolvePath("file:///C:/ReaGuide.swf");
                        loader.load(mySubApplication.url);
                    function unloadSwf():void
                        removeElement(loader);
                        var e:Event = new Event("subAppCleanUp");
                        loader.content.loaderInfo.sharedEvents.dispatchEvent(e);
                        loader.source = null;
                        loader.load(null);
                        loader.unloadAndStop(true);
                        loader = null;
                        System.gc();
                        System.gc();
                    function unloaded():void
                        Alert.show("unloaded event")
            ]]>
        </fx:Script>
    </s:WindowedApplication>
    SubApplication
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="absolute" backgroundColor="#333333"                
                    width="100%" height="100%" creationComplete="onCreationComplete()">
        <mx:Script>
            <![CDATA[
                import mx.controls.Alert;
                public function onCreationComplete():void{
                    this.systemManager.loaderInfo.sharedEvents.addEventListener("subAppCleanUp",_cleanUp)
                        function _cleanUp():void
                            trace("CleanUp called from parent");
                            myImage = null;
            ]]>
        </mx:Script>
    <mx:Image id="myImage" source="@Embed(source='images/rea-00.jpg')" width="500" height="1000"/>
    </mx:Application>
    I would like to mention that if i remove the mx:Image from the subApplication tha garbage collector works fine loading and unloading the swf correctly.
    As you can see i have created an event (dispatched from the parent application ) that cleans up the subapplication in order to avoid garbages.
    i would be gratefull for any piece of advice.
    Thank you!

    Thank you for your immediate response.
    i set the image.source = null and evaluateNow() but still the problem exists. Random instances remain while other instances (the majority)are garbage collected. At the moment, i am profiling and while i have 106 cumulative instances of the sub application i have still 6 instances alive that the garbage collector failed to collect (why not these 6???what was the difference of these 6 objects comparing to the other 100 that were removed from the memory!).
    While debugging i observed the following output ( Remember testLoad.swf is the parent and SubApp is the loaded subapplication)
    Console Output
    [SWF] testLoad.swf - 2,151,642 bytes after decompression
    [SWF] bin-release/SubApp.swf - 547,190 bytes after decompression
    [SWF] bin-release/SubApp.swf/[[DYNAMIC]]/1 - 323,748 bytes after decompression
    [SWF] bin-release/SubApp.swf/[[DYNAMIC]]/2 - 202,168 bytes after decompression
    [SWF] bin-release/SubApp.swf/[[DYNAMIC]]/3 - 1,314,527 bytes after decompression
    [SWF] bin-release/SubApp.swf/[[DYNAMIC]]/4 - 797,233 bytes after decompression
    [SWF] bin-release/SubApp.swf/[[DYNAMIC]]/5 - 261,592 bytes after decompression
    [SWF] bin-release/SubApp.swf/[[DYNAMIC]]/6 - 194,680 bytes after decompression
    Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.
    Has the above output any relation with my mentioned problem?
    Thank you.

  • SWFLoader/Image complete event problem (bug?)

    I have an SWFLoader in my application whose content is
    dynamically bound to a datagrid for loading different images.
    Depending on the new image size I want to make some adjustments,
    etc. to the SWFLoader itself... that's not important for now.
    The problem is that if I take the width of the SWFLoader
    instance on the "complete" event, it gives the value for the
    PREVIOUS image setting so my math function is useless.
    Try this to see what I mean:
    [Bindable]
    public var imageSource:String;
    private function temp():void {
    mx.controls.Alert.show("imgLoader.width: "+imgLoader.width);
    <mx:Button click="imageSource='someImageURL'" />
    <mx:SWFLoader id="imgLoader" autoLoad="true"
    source="{imageSource}" complete="temp()" />
    if you implement the above code, and assuming that
    imageSource is a null string upon initialization, you will get a
    value of "0" for the imgLoader instance's width when you load a new
    image.
    To get around this in Flex 1.5 I could use doLater(this,
    "temp") but doLater appears to have been removed in Flex 2.0.
    My current work around is to modify the above code as
    follows:
    private function temp():void {
    this.addEventListener("enterFrame", blorch);
    private function blorch(b:Event):void {
    mx.controls.Alert.show("imgLoader.width: "+imgLoader.width);
    this.removeEventListener("enterFrame", blorch);
    feels like a hack to me... is there no way to get this to
    work without using the above functions? Sort of seems pointless to
    have removed "doLater" just to make me write a function that
    essentially does the same thing in Flex 2.0. I tried using the
    "resize" event in place of "complete" and that works... if the
    image loaded is a different size than the previous one. If the
    image is the same size (as is often the case in my application)
    then it doesn't work.
    Any suggestions Adobe/Macromedia, fellow developers?

    Flex harUI -
    two solutions to this then are:
    1) use the callLater() function or
    2) extend the SWFLoader class...
    I don't want to increase my component files so I will stick
    with the callLater() setup.
    Haskasu -
    I tried init. It has the same result as complete. If I insert
    code like this: init="mx.controls.Alert.show(imgLoader.width)" I
    get the width for the *previous* setting (same as complete) and not
    the new setting.

  • SwfLoader Compile problem.

    I`m running into a tiny but very serious problem here in Flex Builder version 3.0. I've made 2 projects in Flex. One is the main project and the second one gets loaded over swfLoader from the main project. The reason why this is made is so the final user can actually make any type of modification on the second project and then upload the .swf file in the main application where all the binaries are stored. So i ran into an error after 2 weeks of hard work after i designed the whole project. The thing is that every time the user has to modify things on the second project he/she has to copy the compiled .swf file to the binary repository of the server AND import the changed MXML into the first project and re-compile the parent swf ... now I'm wondering if there's a way i can get past that problem with just putting the compiled version of the second swf file and then get all the changes without importing the MXML file from the second project into the first and having to re-compile the first project. I must mention that both the swf file and mxml must be compatible to each other. If you change code in the mxml file it will not affect the swf that is compiled and so as the reverse mode. So all i need is the swf file to be uploaded with the changes made and thats it Any clues from someone who ran into this type of problem ?

    I think maybe you can set the loaderContext to null maybe.
    You could probably also do a:
    mySwfLoader.content.stop(); or gotoAndStop(1); if your swf
    responds to that.
    You can always set the source to null. That's off the top of
    my head without checking the SDK docs.

  • SWFLoader Unload Problem

    Hi,
    After doing some searching on the web I still couldn't slove the memory usage problem.
    I have tried using unloadAndStop function and also tried using setting source to empty, but none of these worked for me.
    Even I used the hack way to force GC to work, the memory still occupied by the old swf.
    The situation is each time a new swf file loaded, the memory usage is more and more larger.
    The unload action seems never worked.
    I hope any one could help me about this problem.
    The following is my source code.
    Thanks.
    PS:1. My flash player version: 10
          2. I use Flex builder to build the file.
    Source Code:
       <mx:Script>
            <![CDATA[
                [Bindable]
                public var selectedItem:Object;    
                private function unloadSWF(evt:MouseEvent):void{
                    displayItem.source = "";
                private function nullSWF(evt:MouseEvent):void{
                    displayItem.unloadAndStop();
                private function setSWF(evt:Event):void{               
                    selectedItem=(evt.target).selectedItem;
                    displayItem.load(selectedItem.module);               
            ]]>
        </mx:Script>
        <mx:ComboBox
            width="215"
            labelField="label"
            close="setSWF(event)">
            <mx:dataProvider>
                <mx:Object label="Select Coverage"/>       
                <mx:Object
                    label="Life Insurance"
                    module="JSCaller.swf"
                />
                <mx:Object
                    label="Auto Insurance"
                    module="JScaller2.swf"
                />         
            </mx:dataProvider>
        </mx:ComboBox>
        <mx:Panel width="100%" height="100%">
            <mx:SWFLoader id="displayItem" width="100%" height="100%"/>
        </mx:Panel>
        <mx:HBox>
            <mx:Button label="Unload" click="unloadSWF(event)"/>
            <mx:Button label="Nullify" click="nullSWF(event)"/>
        </mx:HBox>

    Hi,
    Thanks for reply.
    1. What version of Flex are you using?
    The Flex builder I used is Flex Builder 3 and the SDK version is 3.4.
    2. Have you checked for leaks caused by styles or resource bundles?
    I though I didn't use any other resources.
    3. Please paste the smallest possible code for JSCaller.swf that does not unload.
    The following is the source code of JSCaller.swf and  the code of JSCaller2.swf as the same as JSCaller1.swf.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="0x000000" borderStyle="none" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#A9F87E, #74C61C]">
        <mx:Label id="lb1" text="fs3"/>
        <mx:Label id="lb2" y="23" text="fs4"/>
    </mx:Application>

  • SWFLoader & Drag'n'Drop Problem

    Hello folks,
    So there is my problem ;
    I made a flex swf, containing manual drag'n'drop of some
    items from a box to an other box.
    When I run this swf alone, the drag'n'drop works fine.
    Then I created an other swf, which is my main application; it
    initalizes a bunch of things, and each screens is a swf, like the
    previous one with drag'n'drop.
    When I get on the screen which loads the swf with
    drag'n'drop, the startDrag run fine, I can catch an item and drag
    it, but if I release the mouse button, the item stays stuck on the
    mouse cursor. To get it move back to its box, I have to move the
    cursor out of my browser window, or to right click so it looses
    focus, or something like this.
    Is this a flex bug? Do I have something special to do? Maybe
    the main application events conflicts with the embedded swf events.
    I really need help on this, I have already spent some time on it,
    and I can't figure how to solve this.
    Thanks.

    Using
    stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp), the
    mouse up event is fired during drag ... 3 times. I don't know if
    this is normal, but this seems weird to me, it should fire only one
    time, I think.
    Whatever, now that I have this mouse up event, how can I stop
    the drag process? I found nothing useful in the DragManager
    interface, but a stopDrag() function on the item I'm dragging
    (which extends Box).
    The following
    doesn't work:
    private function mouseUp(event:MouseEvent):void
    if (DragManager.isDragging)
    stopDrag();
    Any idea how to stop the drag process, with what I get here?
    Also, any idea why the mouse event is triggered 3 times?
    Thanks.

  • Problem: SWFLoader won't load by Array lists?

    Hey @all People,
    I have been found nice tutorial from stackoverflow and i am trying for Flash Builder 4.6 ( Flex 4.6 SDK )
    I want create simple 3 swfs in directory /install and /pages and i want try for main flash content -> it does not load - while swfloader gets error = /pages/screen_error.swf.
    Look ölike this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="ssbInit()">
              <fx:Script>
                        <![CDATA[
                                  private var ftp_cckec:Boolean;
                                  private var db_check:Boolean;
                                  private var admin_check:Boolean;
                                  private var lang_check:Boolean;
                                   *           Loading from template flash applications
                                  private var swf_app:Array = ['install/screen_installer.swf', 'pages/screen_mainpage.swf', 'pages/screen_error.swf'];
                                  protected function ssbInit():void
                                            var loader:Loader = new Loader();
                                            loader.contentLoaderInfo.addEventListener(Event.INIT, LoaderReady);
                                            loader.load(new URLRequest(swf_app[0]));
                                            function LoaderReady(event:Event):void
                                                      loader = swfLoader(event.target.content);
                                                      if(swf_app.length){
                                                                swf_app.shift();
                                                                loader.load(new URLRequest(swf_app[2]));
                        ]]>
              </fx:Script>
              <s:SWFLoader id="swfLoader" left="0" top="0" width="100%" height="100%"/>
    </s:Application>
    pages/screen_mainpage.swf = Default page like same content website ( after completed writing process with data base )
    pages/screen_error.swf like It couldn't found same currect flash content page... like this Forbidden 404 or anything
    install/screen_installer.swf = If the page ( /pages/screen_mainpage.swf doesn't find written data base sql on data base server than screen-installer will be able installing process like phpBB or Wordpress or CMS Installer ( different installation type )...
    I have been got error of security or unknown error :/
    TypeError: Error #1034: Typumwandlung fehlgeschlagen: _screen_installer_mx_managers_SystemManager@10df2eb9 kann nicht in mx.controls.SWFLoader umgewandelt werden.
              at Function/index/protected:ssbInit/LoaderReady()[C:\Users\Jens\Adobe Flash Builder 4.6\ssb_mainpage\src\index.mxml:28]
    How do i fix swfLoader?
    EDIT //
    I have been tried again and got no-way
    How do i find result for Flex 4.6 SDK ?
    Are you sure because SWFLoader works only Flex 3.6 or older SDK right?
    Just wait, i have been found because same developers have been got nice trick with swfLoader like omgpop.com or any website with flash content pages with swfloader. Why does swfLoader not work for my FLEX 4.6 SDK? Or I must reinstall Flash Builder 4.6?
    Do you know becasue swfLoader will switch loading currect external flash content page.
    For Example:
    Own Website was created / registered than it didn't write completed sql files by PHP Script than Flash Content Page will load source ( /install/screen_installer.swf ) and an admin will write completed your account once installing process ...
    On the Website Flash Content Page find - if his data base was written completed on the website than flash content page will load default screen ( source: /pages/screen_mainpage.swf ) and an admin configured ready with his website. than any visitors come his website and sign up ur new account ( member ) - But Member shouldn't see administratived screen of flash content pages.
    If you don't understand. Than i can show you like i will example of pictures? Is it okay?
    Thanks!
    EDIT // ... was edited by: Jens Eckervogt

    Or without Array?
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="ssbInit(event)">
              <fx:Script>
                        <![CDATA[
                                  private var ftp_cckec:Boolean;
                                  private var db_check:Boolean;
                                  private var admin_check:Boolean;
                                  private var lang_check:Boolean;
                                  private var error_check:Boolean;
                                  protected function ssbInit(event:Event):void
                                            if(error_check == true){
                                                      swfLoader.source = "pages/screen_error.swf";
                                            }else{
                                                      swfLoader.source = "install/screen_installer.swf";
                        ]]>
              </fx:Script>
              <s:SWFLoader id="swfLoader" left="0" right="0" top="0" bottom="0" />
    </s:Application>
    Is it possible?

Maybe you are looking for

  • Changing layout of slides in ''Reflections" theme - is this possible?

    Hi, I am using iPhoto 11, version 9.3.2 - making a slideshow using the 'reflections' theme. It seems like there is some great logic, which groups similar photos together - mostly its exactly right, but sometimes i want to change it and i can't seem t

  • Error with the resource file in Struts

    Hi i am working on small struts applications . when i am running my application in tomcat it throwing a error like javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE      org.apache.jasper.runtime

  • Confusion in the APP column in V$ARCHIVED_LOG

    Hi All, I have some confusion regarding APP column of v$ARCHIVED_LOG On my Primary machine when i execute :- SQL> SELECT THREAD#,SEQUENCE#,FIRST_CHANGE#,NEXT_CHANGE#,APPLIED FROM V$ARCHIVED_LOG;    THREAD#  SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# APP   

  • Database replication between Oracle RAC and Oracle Standalone DB

    Hi, We have currently 4 node RAC environment and Oracle RAC implementation with 4 Oracle instances. We want to move the one instance and make it Standalone with Oracle database due to availability issue. Thus we will remain with 3 nodes on the RAC da

  • FileInputStream problem

    I have a problem for inserting image to database from my client machine to server machine. In my webapplication I use the following implamentation using jsp: page: upload.jsp <form id="myform" name="myform" method="post" action="uploadprocess.jsp"> A