PDA

View Full Version : flash player detection/embed with DHTML Window widget



georgie_b
09-05-2007, 09:27 PM
1) Script Title: DHTML Window widget

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

3) Describe problem: Apologies for asking what I suspect is a daft newbie question! :confused:

I'm trying to use one of the window widget methods to open a window in the middle of a page, which then has a embedded flash video clip, which I'm using http://www.jeroenwijering.com/'s very fine player for.

I can get the window to open up fine with the player in, all fine. But, I get the dreaded 'for your security microsoft' information bar in IE. I'm assuming this is because I hadn't embedded the player properly. So I took a recommendation and looked at http://blog.deconcept.com/swfobject/ which has a great embed script.

The problem is that I'm not too sure how to integrate this into the Window 1 (iframe content) example of the DHTML Window widget. How to I put

<script type="text/javascript">
// <![CDATA[

var so = new SWFObject("so_tester.swf", "sotester", "300", "300", "9", "#FF6600");
so.addVariable("flashVarText", "this is passed in via FlashVars for example only"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
so.write("flashcontent");

// ]]>
</script>

into the open window code so that it embeds the swf properly please? Is there a particular version of the window I should be using - like iframe rather than ajax or hidden div content?

Any help very gratefully received ! :)

jscheuer1
09-06-2007, 03:20 PM
I can get the window to open up fine with the player in, all fine. But, I get the dreaded 'for your security microsoft' information bar in IE. I'm assuming this is because I hadn't embedded the player properly.

Don't assume. That is the default behavior in IE for all local scripts:


Unless a user's security is really tight, that only happens locally, as a security measure. As far as IE is concerned, javascript is ActiveX. Click on the bar and click on allow and click on yes. Once your page is live, this will not happen. You can also give your page 'the mark of the web'. That way (in most cases) it will not display the security bar locally either. Put this right after your <html> tag like so:


<html>
<!-- saved from url=(0014)about:internet -->
<!-- this and above comment should be removed for live, non-demo use -->
<head>

But, navigating away from the page to another local page, or including another local page on it via a frame or an iframe can be problematical if said page does not also have 'the mark of the web' on it.