English 中文(简体)
How to embed flash files in HTML using SWFObject (and to get deeplinking to work!)
原标题:

I have a problem that I have been trying to solve since days! I don t seem to get the BrowserManager.url property after I embed using SWFObject! the purpose is, to get the URL of the HTML where the SWF file is embedded and not where the swf file itself is!
explanation:
I mean the SWF file is only in the root, and the file is embedded in many pages on the website. Every time the flash file is loaded, it needs to know on which page exactly it has been called! would be great if you could help me! cheers Ali

最佳回答

The better way to do this is to use ExternalInterface:

ExternalInterface.call( function() {try {return window.location.href;} catch (err) {}} );

You ll need to make sure that you have allowscriptaccess set to always, like so:

<script type= text/javascript >
var so = new SWFObject( player.swf , ply , 470 , 320 , 9 , #000000 );
so.addParam( allowfullscreen , true );
so.addParam( allowscriptaccess , always );
so.addParam( wmode , opaque );
so.write( mediaspace );
</script>

Best,

Zach

问题回答

暂无回答




相关问题
Flex: image scale stopped working after deploy to server

I have some code to scale an image s width according to its height after the image is being loaded. It works fine on my development PC if I point to the wrapper html using local file system path. ...

Hidding file-browser when using download method

I want to hide the pop-up dialog box when I invoke the download method and set the download destination path to be constant constant , in other words, I want to set the location where I wanna the ...

Tile inside Accordion does not resize correctly

In a Flex application I m building I have an Accordion with a Tile component as shown: <mx:Accordion id="accordionShoppingBasket" width="100%" resizeToContent="true"> <mx:VBox width="100%...

Flex LinkBar: how to set a selected button s background color?

I was able to set the text color of a selected LinkBar button by "disabledColor" style of LinkBar. Accordingly, I expect to set the background color of the selected button by "backgroundDisabledColor" ...

Interactive heat map in Flex

I’m at a very basic level with Flex and with programming in general. I am working on a project where I have data in an Excel (.csv) format, it’s a large Excel plot/matrix where each cell has a ...

灵活性:在滚动之前显示错误的清单

我有一份清单,在你滚动之前没有显示任何物品,然后这些物品就显示。 是否有任何人知道如何解决这一问题? 我尝试了叫人名单。

热门标签