How do you make the flash swf to be in the the EXACT center of the browser window?
In dreamweaver, it only allows my to highlight the swf when i inserted it and then go to align–>center.
I want it to be exactly in the middle of the browser window.
Its easy but i dont know…please explain!
system
July 11, 2003, 9:39pm
2
system
July 11, 2003, 9:46pm
3
Lostinbeta, thanks, but i believe you misunderstood what i said.
I have a 150 x 150px image, and i want it to remain those dimensions, but be at the exact center of the browser window.
In flash i can center anything via the align panels. It is a piece of chocolate cake.
But dreamweaver is not that good at allowing people to put things exactly where they want them.
I wish the image to be in the exact center of the wondow when viewed in the browser.
Can you help?
system
July 11, 2003, 9:48pm
4
My sincerest apologies. It seems i misunderstood you.
I don’t understand what that post is asking me to do. I mean, do i put the image in a table?
Can you clarify?
Sorry
system
July 11, 2003, 10:35pm
5
:beam:
Where the “<!–embed code here–>” is in that script you replace that with your .swf embed code or image code or whatever you want to be centered in the area.
system
July 11, 2003, 11:34pm
6
so all i do is copy and paste that html code into the script in dreamweaver and just enter my swf’s name?
That’s it? Cos it doesn’t seem to work :-/
Here is my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>[ 10 second trailer ]</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<TABLE WIDTH="100%" HEIGHT="100%">
<TR><TD WIDTH="100%" HEIGHT="100%" ALIGN="center" VALIGN="middle">
<trailer.swf>
</TD>
</TR>
</TABLE>
<body bgcolor="#7C83CD">
<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400">
<param name="movie" value="trailer.swf">
<param name="quality" value="high">
<embed src="trailer.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400"></embed></object>
</div>
</body>
</html>
system
July 11, 2003, 11:34pm
7
It doesn’t seem to work…this is what i get:
http://www.hinduvidya.com
It sends it right to the bottom
system
July 11, 2003, 11:41pm
8
system
July 11, 2003, 11:44pm
9
Yah that is the exact effect i am going for {by the way hinduvidya.com is my site…)
Do you know why i can’t achieve this effect?
system
July 11, 2003, 11:50pm
11
hmm ur gonna have to post your fla. i forgot how i did it, i have to do it from scratch
system
July 11, 2003, 11:53pm
12
when i add my swf to dreamweaver, there must be a simple way to align the swf in the absolute middle of the page.
That is what i mean. Nothing to do with the swf/fla itself.
Dreamweaver frustratingly doesn’t allow you to align things the easy way.
Someone must know how to do it!
system
July 12, 2003, 12:01am
13
this works i tested it
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<TITLE>test</TITLE>
</HEAD>
<SCRIPT language="JavaScript">
self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight);
</SCRIPT>
<script language="javascript">
/* Variable Declarations */
var isMac = (navigator.userAgent.indexOf("Macintosh") != -1);
var isWin = (navigator.userAgent.indexOf("Windows 95") != -1 || navigator.userAgent.indexOf("Windows NT") != -1);
var isNS = (navigator.appName == "Netscape");
var isIE = (navigator.userAgent.indexOf("MSIE") != -1);
var ieWin = (navigator.userAgent.indexOf("MSIE") != -1 && (navigator.userAgent.indexOf("Windows 95") != -1 ||
navigator.userAgent.indexOf("Windows NT") != -1));
/*Kill*/
function reload() {
if (window.parent.frames.length > 1) {
window.open("http://www.yourdomain", "_top")
}
}
/* Working Around Netscape Resize Bug */
if (isNS){
origWidth = innerWidth;
origHeight = innerHeight;
}
/* Function: Restoring The Size */
function restore(){
if (innerWidth != origWidth || innerHeight != origHeight){
location.reload();
}
}
/* Function: Restoring The Size */
if (isNS){
onresize = restore;
}
</script>
<BODY bgcolor="#FFFFFF" class="Target">
<table width="100%" border="0" height="100%">
<tr align="center" valign="middle">
<td>
<!-- URL's used in the movie-->
<A HREF=home.swf></A> <A HREF=hardware.swf></A> <A HREF=electric.swf></A> <A HREF=plumbing.swf></A> <A HREF=contact.html></A> <!-- text used
in the movie-->
<!--LoadingWELCOME TO HYLAN SUPPLY.COM. . ....--><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="110" HEIGHT="110" id="" ALIGN="">
<PARAM NAME=movie VALUE="http://www.hinduvidya.com/button_10st.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="index_003.swf" quality=high bgcolor=#FFFFFF WIDTH="110" HEIGHT="110" NAME="" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</td>
</tr>
</table>
</BODY>
</HTML>
system
July 12, 2003, 12:05am
14
i messed about with your code, and it seems as long as you paste this:
<SCRIPT language="JavaScript">
self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight);
</SCRIPT>
That is all that is required.
Doesn’t make sense, but if you check my site:
http://www.hinduvidya.com
you can see it works.
If only i knew how
system
July 12, 2003, 12:07am
15
yea i wasnt sure what you needed. when i made that site i just used estudio’s javascript to get it to relaunch and center liek that
system
July 12, 2003, 12:11am
16
ok this is what i figured.
That javascript is what makes the new window without the buttons.
Except i STILL don’t know how to center something in dreamweaver :sleep:
system
July 12, 2003, 12:17am
17
you can center anything by clicking on it and going to align = center.
you can’t do what u just did with out JS
system
July 12, 2003, 12:20am
18
If you right click soemthing, dreamweaver aligns it in the center HORIZONTALLY (not vertically as well).
In flash mx i can put something in the middle of both x and y axis.
It must be a very easy thing to do, someone must know.
If it must be done with js, what is the code?
system
July 12, 2003, 12:28am
19
omg u just wrote the code
<SCRIPT language="JavaScript">
self.moveTo(0,0);self.resizeTo(screen.availWidth,screen.availHeight);
</SCRIPT>
im done with this thread. and stop saying someone must know, the answer is in front of you
system
July 12, 2003, 12:57am
20
NO.
This code is used to open the url in a new window without any buttons.
This has nothing to do with re-aligning objects.