S Sus1975 Medlem sedan okt. 2006 9 inlägg Frågan 2 dec. 2006 13:38 #1 Hej!
Jag har gjort en 360x280px stor film i Flash 8.
Den ser bra ut i Internet Explorer & Firefox, men i Opera beskärs den & man ser bara ca 2x1 cm av filmytan i nedre, högra hörnet.
Vad beror det på? Kan jag ha missat nå´t i publiceringsinställningarna?
3/11 Jag har byggt sidan i 5 frames och i mitten använder jag en iframe där filmen ligger.
Jag har nu testat att öppna endast filmen och inte hela webbsidan i Opera och då funkar faktiskt filmen. Även sidan med iframe innehållande filmen funkar när man öppnar endast den.
Det verkar som att det är nå´t galet i framesetet.
Någon som vet vad det kan vara för fel?
//Sus
crisse6 Medlem sedan dec. 2000 2 526 inlägg hur lägger du in swf-filen i din kod?
S Sus1975 Medlem sedan okt. 2006 9 inlägg index.asp
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link rel="shortcut icon" href="images/favicon.ico" >
</head>
<frameset rows="*,456,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="blank.htm" name="top" scrolling="no" noresize marginwidth="0" marginheight="0" id="top">
<frameset rows="*" cols="*,750,*" framespacing="0" frameborder="no" border="0">
<frame src="blank.htm" name="left" scrolling="no" noresize marginwidth="0" marginheight="0" id="left">
<frame src="main.asp" name="main" scrolling="no" noresize marginwidth="0" marginheight="0" id="main">
<frame src="blank.htm" name="right" scrolling="no" noresize marginwidth="0" marginheight="0" id="right">
</frameset>
<frame src="copyright.htm" name="bottom" scrolling="no" noresize marginwidth="0" marginheight="0" id="bottom">
</frameset>
<noframes><body>
</body></noframes>
</html>
main.asp
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="imagetoolbar" content="no">
<title><%=pageTitle%></title>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="750" height="456" border="0" cellpadding="0" cellspacing="0">
<tr>
<%
' BILDEN TILL VÄNSTER
%>
<td width="230" height="456" valign="top"><img src="images/<%=leftPicture%>" width="230" height="456"></td>
<td width="480" height="456" valign="top"><div align="center">
<table width="480" height="456" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="80" height="15"></td>
<td width="400" height="15"></td>
</tr>
<tr>
<td width="80" height="18"></td>
<%
' BILDEN ÖVER MENYN
%>
<td width="400" height="18" align="left" valign="top"><img src="images/menu/<%=menuPicture%>" height="18"></td>
</tr>
<tr>
<td width="80" height="10"></td>
<td width="400" height="10"></td>
</tr>
<tr>
<%
' LÄNKA IN TOPPMENYN
%>
<td height="28" colspan="2" align="center" valign="top"><!--#include file="menuTop.asp"--></td>
</tr>
<tr>
<td height="10" colspan="2"></td>
</tr>
<tr>
<%
' LÄNKA IN IFRAMEN
%>
<td height="333" colspan="2" align="left" valign="top"><iframe src="flash.asp" width="454" height="320" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="auto"></iframe></td>
</tr>
<tr>
<td height="5" colspan="2"></td>
</tr>
<tr>
<%
' LÄNKA IN BOTTENMENYN
%>
<td height="27" colspan="2" align="center" valign="top"><!--#include file="menuBottom.asp"--></td>
</tr>
<tr>
<td height="15" colspan="2"></td>
</tr>
</table>
</div>
</td>
<%
' BILDEN TILL HÖGER
%>
<td width="40" height="456" valign="top"><img src="images/<%=rightPicture%>" width="40" height="456"></td>
</tr>
</table>
</body>
</html>
flash.asp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" content="no">
<title>Flash</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="420" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="40" height="15" align="left" valign="top"></td>
<td height="15" align="left" valign="top"></td>
</tr>
<tr>
<td align="left" valign="top"></td>
<td align="left" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="360" height="280">
<param name="movie" value="flash/poem.swf">
<param name="quality" value="high">
<embed src="flash/poem.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="360" height="280"></embed>
</object></td>
</tr>
</table>
</body>
</html>
Om jag öppnar main.asp så fungerar filmen i Opera, men i index.asp så beskärs den...
crisse6 Medlem sedan dec. 2000 2 526 inlägg testa med att anvanda javascript nar du embeddar.
S Sus1975 Medlem sedan okt. 2006 9 inlägg nu förstår jag inte riktigt...
...kan du ge ett exempel?
//Sus
crisse6 Medlem sedan dec. 2000 2 526 inlägg att anvanda sig av swfobject ar bra vilket som, det tar bort boxen som skapas kring en flashmovie i IE ocksa. Iaf, kolla lanken har,
ladda ner .js-filen, och sen kor detta dar du ska ha din flashfil...
http://blog.deconcept.com/swfobject/
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("movie.swf", "mymovie", "200", "100", "7", "#336699");// 200 = bredd, 100 = hojd, 7 = flashversion
so.write("flashcontent");
</script>
Kolla in http://blog.deconcept.com/swfobject/
Då ser du till att användare har rätt version, kan lätt servera alternativt innehåll åt användare utan flash och slipper aktiveringsproblemet i IE7.
Då det gäller varför opera klipper av din swf så tror jag inte att det spelar roll hur du embeddar utan det har förmodligen med din tabellstruktur och frameset att göra.
S Sus1975 Medlem sedan okt. 2006 9 inlägg Detta fick jag att fungera. Istället för att använda framset för att centrera innehållet så använder jag css.
index.asp
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title></title>
<meta http-equiv="Content-Style-Type" content="text/css"/>
<style type="text/css" title="Default" media="all">
/*the css below is for the floating content box*/
body
{
position:absolute;
top:0px;
left:0px;
width:100%;
height:100%;
min-width:750px;
min-height:400px;
margin:0px;
padding: 0px;
text-align: center;
vertical-align: middle;
color: #000000;
background-color: #000000;
}
/*Hide IE ghost scroll bar*/
/*Need to also include <?xml version="1.0" encoding="ISO-8859-1"?> at the top of document*/
/*This is the valid way to do it*/
*html body
{
overflow:auto;
}
#displayWin
{
position:absolute;
top:50%;
left:50%;
background-color: #ffffff;
width:750px;
height:404px;
margin-top:-200px;
margin-right:auto;
margin-left:-385px;
text-align: center;
vertical-align: middle;
z-index:50;
}
/*START IE only*/
* html body #displayWin
{
margin-top:0px;
top:expression((document.body.clientHeight>400) ? document.body.clientHeight/2-displayWin.offsetHeight/2+"px" : "0px");
left:0px;
margin-left:0px;
position:relative;
}
/*END IE only*/
</style>
</head><body>
<a name="pageTop"></a>
<div id="displayWin">
<!--#include file="main.asp"-->
</div>
</body>
</html>
Tack för att ni tog er tid att försöka hjälpa mig!