Alright, this is slightly more complicated then merely exporting the
Flash movie...Assuming that you want to keep the flash movie in an
html file and not by itself (accessed with a .swf extension)...
Then do the following:
1. Include all the tags of a regular html document i.e.
<html>,<head>,<body>, etc, I assume you know how to do so.
2. If you are using an html editting program, import your flash file.
3. Save your html file and open it in wordpad or textpad or something,
something that allows you to see the code.
4. Within the <body></body> tags, you should see something that looks
like:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,29,0"
width=100% height=100% align="middle" width="640" height="480">
<param name="movie" value="Untitled-1.swf">
<param name=quality value=high><param name="SCALE"
value="exactfit">
<embed src="Untitled-1.swf" align="middle" quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash" scale="exactfit"></embed>
</object>
5. Scan that part for the the 'value' varable and make sure it equals
'exactfit'
6. Set the 'align' variables so they equal 'middle'
7. This is a tricky part, can you see the '<object' right at the
beginning of the chunk of code? replace that with:
<object id="myMovie"
Actually, id can be named anything, as long as you remmeber what it
was called.
8. Now, just before '<object', paste the following chunk of code:
<table width="100%" height="100%" border="0" align="center"
cellpadding="0" cellspacing="0"><tr><td align="center"
valign="middle">
9. just after '</object>', paste the following chunk of code:
</td></tr></table>
10. Now, find the <BODY> tag in your html file. Replace the tag with
the following code:
<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0" onResize="movieResize('myMovie');"
onLoad="movieResize('myMovie');">
*if you didn't use myMovie in step 7, replace myMovie with whatever
you used
11. Just after your <head>, paste in the last piece of code.
You have some choices here. If you want a border surrounding your
flash file use the following chunk of code:
<script language="JavaScript" type="text/JavaScript">
function movieResize (flashMovie) {
if (document.body.clientHeight/document.body.clientWidth >= 0.75){
eval(flashMovie+".height=(document.body.clientWidth-13)*0.75");eval(flashMovie+".width=document.body.clientWidth-13;")}
else { eval(flashMovie+".height=(document.body.clientHeight-9)");eval(flashMovie+".width=(document.body.clientHeight-9)*1.3333");}
}
</script>
If you want the flash file to goto the edge, use:
<script language="JavaScript" type="text/JavaScript">
function movieResize (flashMovie) {
if (document.body.clientHeight/document.body.clientWidth >= 0.75){
eval(flashMovie+".height=(document.body.clientWidth)*0.75");eval(flashMovie+".width=document.body.clientWidth;")}
else { eval(flashMovie+".height=(document.body.clientHeight)");eval(flashMovie+".width=(document.body.clientHeight)*1.3333");}
}
</script>
An example of this is located at
http://artanis.hypermart.net/example.html
It should work now, enjoy.
-Tox-ga |
Request for Answer Clarification by
rocketeer-ga
on
09 Nov 2002 08:12 PST
The answer from tox-ga appears very quaified. I am not sure however
that the way I explained the problem allowed him or her to make the
correct assumption about what I am trying to do. At issue is the
statement provided with the answer "Assuming that you want to keep the
flash movie in an html file and not by itself (accessed with a .swf
extension...)
I am using html simply to load the first flash movie, which then
begins both playing this movie (.swf) and loading the next (.swf). At
the end of the first movie, it jumps to the second, which then begins
playing and loading the third. So that I only download one html
document, but (in this case) 18 .swf movies.
From what I understand, the html document sets the scaling and
location of the all the movies. This document is generated by flash
according to the HTML parameters that is set in its Publish Settings
menu. The menu allows 3 options for scale: Default (Show all), No
borders, and Exact fit, and 5 options for HTML_Alignment: Default,
Left, Right, Top and Bottom. I am sure I have tried every combination
but none did what I want.
There is a web site www.paion.com that appears to do exactly what I
want. My local flash expert tells me he think they achieved what they
did using cascading style sheets. But it would seem to me that it
could be done with some code in the html document. Perhaps tox-ga's
answer takes this into account. But it seems they assumed something
different since therir answer appears more complex than would be
required to do what at the surface appears relatively simple.
|
Clarification of Answer by
tox-ga
on
09 Nov 2002 10:31 PST
rocketeer-ga,
Alright, what http://www.paion.com/ did is they first made an html
table and they set the width and height of that table to be 100%.
Then, they made the horizontal alignment of the table equal to center.
Inside that table, they made another table where they placed all
their content.
Since the horizontal alignment of outer table is centered, the inner
table will be always centered.
Is that what you were looking for?
If you could post some pictures or link to your current site, I think
I could be more specific.
-Tox-ga
|