I am trying to create a Firefox extension that uses a flex application. I have tried to wrap it in XUL types (<iframe> and <browser>) and I have no preference as to which one I use... whichever works.
The problem is that whenever I use a relative path (access through chrome:// or mySWF.html) the flash fails to load.
I have a method to search for the absolute path (it's posted below) but I cannot for the life of me figure out a way to dynamically change the src of either an iframe or browser.
<script type="text/javascript">
function loadSWF() {
alert("loadSWF!");
var fullPath = "file:///" + extensionPath.path.replace(/\\/g,"/") + "/chrome/content/HelloWorld.html";
top.document.getElementById('AppFrame').setAttribute("src",fullPath);
}
</script>
Below are my 2 methods of calling the flex app:
<iframe
type="content"
src=??????
flex="1"
id="AppFrame"
name="AppFrame"
onLoad="loadSWF();"/>
<browser
id="browserid"
type="content"
src=??????
flex="1"/>
How can I call my function to set the src attribute???