Flex-iframe:FF中的问题

时间:2009-10-22 10:07:58

标签: flex actionscript-3 firefox iframe

我正在使用http://code.google.com/p/flex-iframe/在Flex应用中显示wikicontent。

<?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>

显示窗口时:即。它完美无缺,但在FF中 内容快速闪烁然后iframe变成空白?

2 个答案:

答案 0 :(得分:2)

我回答了你在项目网站上打开的错误;)

答案 1 :(得分:0)

我错过了添加wmode = opaque,它在FF中运行。唯一的问题是flex loadingindicator没有显示。