View Full Version : Can't insert flash file in dreamweaver.

02-23-2011, 02:24 PM
Hi, I have a template page in Dreamweaver CS5. I want to insert into the editable region of my body tag a Swf movie file but when I go to insert it it states "while executing objectTag in Flash.htm, a JavaScript error occurred." I know this is a bit vague but anyone encounter this problem before, hoping so on the off chance that there is a quick fix for this.
If not, what do you think the problem could be?

02-23-2011, 03:49 PM
Did you quit and restart Dreamweaver. That fixes fixes Javascript errors.

02-23-2011, 03:59 PM
Hi, just did that and it didn't work for me. Do you think it is because I am trying to insert the swf into an editable region?

02-24-2011, 01:05 AM
how are you inseting the movie?

02-24-2011, 02:29 PM
Hi, I have my <div id="body"> and I go into that and go to insert>media>swf

03-02-2011, 10:41 AM
Hi, anyone had the error before regarding flash not inserting into an editable body region of a template, it won't even insert on my child pages or anything. Either states the Javascrips error or states I ahve to insert it into a locked region on my template which defeats the whole concept of wanting it in the editable region so I can alter it for different pages. Can I give an example of the first few lines of my child template page. Is there something meant to be here like e.g. <script src="../Scripts/swfobject_modified.js" type="text/javascript"></script>.
This is driving me mental, it is obviously something to do with my code perhaps?

[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><!-- InstanceBegin template="/Templates/Belgium Index.dwt" codeOutsideHTMLIsLocked="false" -->
<script type="text/javascript">
if (screen.width < 1024)
link = document.getElementsByTagName( "link" )[ 0 ];
link.href = "manager800.css";
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}