views:

529

answers:

2

I'm using http://code.google.com/p/flex-iframe/ for showing wikicontent in a flex app.

<?xml version="1.0"?>
<mx:TitleWindow
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:components="components.*"
title="Hjälp"
showCloseButton="true"
close="close();"
styleName="Popup"
paddingBottom="0"
paddingLeft="0"
paddingRight="0"
paddingTop="0"
width="700"
height="500">

<mx:Script>
<![CDATA[

import mx.core.Application;
import mx.managers.PopUpManager;

import offerta.Config;
import offerta.monkeywrench.Icons;
import offerta.utils.printf;

import flash.utils.setTimeout;
import flash.display.DisplayObject;

private static var _popup:HelpPopup = null;

[Bindable]
public var callback:Function;

[Bindable]
public var key:String;

private function close(cancel:Boolean = true):void
{
    PopUpManager.removePopUp(this);
    if(callback!=null) callback();
}

public static function create():HelpPopup
{
    HelpPopup._popup =
HelpPopup(PopUpManager.createPopUp(DisplayObject(Application.application),
HelpPopup, true));
    HelpPopup._popup.visible = false;
    return HelpPopup._popup;
}

public function show():void
{
    PopUpManager.centerPopUp(HelpPopup._popup);
    this.visible = true;
    setTimeout(function():void {
        refresh();
    },500);
}

public function refresh():void
{
    if(!!key)
    {
        frameMain.label = key;
        frameMain.source = printf(Config.DOCUMENTATION_URL,key);
    }
}

]]>
</mx:Script>

<mx:VBox width="100%" height="100%" paddingBottom="0" paddingLeft="0"
paddingRight="0" paddingTop="0">

  <mx:ApplicationControlBar width="100%">

        <mx:HBox width="100%" id="pnlToolbar" horizontalGap="0">

            <mx:LinkButton
                  icon="{Icons.refresh}"
                  click="refresh();"/>

            <mx:LinkButton
                  icon="{Icons.previous}"
                  click="frameMain.historyBack()"/>

            <mx:LinkButton
                  icon="{Icons.next}"
                  click="frameMain.historyForward()"/>

        </mx:HBox>

    </mx:ApplicationControlBar>

    <components:IFrame id="frameMain"
        loadIndicatorClass="components.IFrameLoadingIndicator"
        width="100%"
        height="100%"/>

</mx:VBox>

<mx:ControlBar>

    <mx:Spacer width="100%"/>

    <mx:Button
            width="80"
            height="30"
            label="Stäng"
            click="close();"/>

</mx:ControlBar>

</mx:TitleWindow>

When displaying the window: In Ie. it works perfectly, but in FF the content flashes quickly and then the iframe becomes blank?

A: 

I had missed to add wmode=opaque and it works in FF. Only problem is that flex loadingindicator isn't showing.

Niels Bosma
+2  A: 

Hi Niels, I answered you on the bug you opened on the project site ;)

Julien Nicoulaud