all groups > flash (macromedia) > november 2005 >
You're in the

flash (macromedia)

group:

Is it possible to have a multilayered html flash document?



Is it possible to have a multilayered html flash document? martinstaceyuk
11/18/2005 9:58:51 PM
flash (macromedia): Hi. i am creating a site, and was wondering if it is possible to have a
multilayered html document using flash elements. so in the final html document
you would have several swf's. i need it to be inside the html because i want
the main swf to stay centered and i want the other swfs to align with the top
and bottom corners, so when you drag the browser window larger and smaller the
main swf is always in the middle, and the other swfs are round the corners of
the browser.

cheers
Re: Is it possible to have a multilayered html flash document? ezflip
11/19/2005 12:00:00 AM
Curious to know if you tried editing your html page with Dreamweaver. Add a
first layer with your second swf file. Another layer for the remaining swf file.

The catch (and somehow there's always a catch) is that layers are not
supported by every browsers.

Hope this helps and good luck.

ezflip
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/19/2005 10:37:18 AM
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/20/2005 7:49:02 PM
Re: Is it possible to have a multilayered html flash document? Wolf van Ween
11/20/2005 9:00:42 PM
I'm not working with dreamweaver, guys, so I can't join the discussion about
layers. However, your task seems a simple job for a HTML table. You could even
specify that the middle row+column don't scale and the others do.
And to your first question, Martin, of course it's possible to have more than
one SWF in a HTML. Many portals have for instance a number of flash
advertisements on the page.
Wolf
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/20/2005 9:07:02 PM
Re: Is it possible to have a multilayered html flash document? Wolf van Ween
11/20/2005 9:19:00 PM
Oh, oh. Overlapping SWF's is very unreliable, and different from browser to
browser. In a word: avoid. The reason is that there is no z-order objects
adhere to, so you can never say which one is on top.

Different alignment with tables - I've attached HTML code for a 3x3 table,
with the middle cell being 550x400, in other words the default flash stage
size, and the cells around to fill the rest of the browser window equally. You
can also see some alignment there.

Hope that helps
Wolf


<table border="0" width="100%">
<tr>
<td align="left">&nbsp;</td>
<td width="550">&nbsp;</td>
<td align="right">&nbsp;</td>
</tr>
<tr>
<td height="400" align="left">&nbsp;</td>
<td align="center" width="550" height="400">Here goes the main SWF</td>
<td height="400" align="right">&nbsp;</td>
</tr>
<tr>
<td align="left">&nbsp;</td>
<td width="550">&nbsp;</td>
<td align="right">&nbsp;</td>
</tr>
</table>
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/20/2005 10:01:38 PM
ahh, that's great! works really well,

Re: Is it possible to have a multilayered html flash document? Wolf van Ween
11/20/2005 10:07:18 PM
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/20/2005 10:11:40 PM
is there anyway to get them to align with the bottom of the page. i can see how
to align horizontally, just when you align with the bottom and pull the window
smaller, because of the scroll bar it just get's cut off.


Re: Is it possible to have a multilayered html flash document? Wolf van Ween
11/20/2005 11:13:13 PM
You will have to use an additional height="100%" in the <table> tag, and the in the last row: <td valign="bottom">This is at the very end</td>
Good luck
Wolf
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/22/2005 12:00:00 AM
nah, that doesn't seem to work. it still stays where it is at the bottom.

so far i have this

Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/22/2005 12:00:00 AM
weird, i've just checked, and it works in internet explorer, but not safari
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/22/2005 6:58:35 PM
it seems height is an invalid html term, which would explain why it's not working in safari.

Re: Is it possible to have a multilayered html flash document? Wolf van Ween
11/22/2005 8:00:38 PM
Martin, if you really want to fill the browser window even if there's not
enough "material", like in your example, you will need to resort to absolute
positioning. This will show in browsers that adhere to the CSS2 specification.
IE from 4, Firefox, Opera and Safari should be able to show it. Older Netscape
versions with a question mark.

This would look like the attached code.

<body>
<div style="position:absolute;left:0px;top:0px">top left</div>
<div style="position:absolute;left:50%;top:0px">top middle </div>
<div style="position:absolute;right:0px;top:0px">right top</div>
<div style="position:absolute;left:0px;top:50%">middle left </div>
<div style="position:absolute;left:50%;top:50%">middle middle </div>
<div style="position:absolute;right:0px;top:50%">right middle </div>
<div style="position:absolute;left:0px;bottom:0px">bottom left </div>
<div style="position:absolute;left:50%;bottom:0px">bottom middle </div>
<div style="position:absolute;right:0px;bottom:0px">right bottom</div>
</body>
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/22/2005 10:21:51 PM
great that works in safari.

when you say not enough 'material', how would i make it enough? is that the
best way to do this, with one 800x600 swf in the middle, and a few 300x100
swf's in the corners?
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/22/2005 11:04:56 PM
i've managed to do it, but i don't know if there's a better way of doing it.

i used the original flash file, which generated this html:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
version=8,0,0,0" scale="noscale" width="100%" height="100%" id="portfolio"
align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="portfolio.swf" />
<param name="quality" value="best" />
<param name="scale" value="noscale" />
<param name="wmode" value="transparent" />
<embed src="portfolio.swf" quality="best" scale="noscale"
wmode="transparent" width="100%" height="100%" name="portfolio" align="middle"
allowscriptaccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


and then i used you're html:
<div style="position:absolute;left:0px;bottom:0px">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=7,0,19,0" width="100" height="100">
<param name="movie" value="anim.swf" />
<param name="quality" value="high" />
<embed src="anim.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="100" height="100"></embed>
</object>
</div>

is there anything wrong with this?
Re: Is it possible to have a multilayered html flash document? Wolf van Ween
11/22/2005 11:16:07 PM
Good to know it works.
Well, I didn't mean all that much. Most of the major sites are now laid out
for 800x600 overall, and that includes the browser menus and toolbars.
So I guess going with the standard stage size 550x400 and some "corner SWFs"
about 200x100 is a fair choice. (Plus minus, of course, depends what your
content is)
Here on my home computer I have 1024x768, the difference to 800x600 is really
not that much, and when I work on my laptop I have a 1400x1050 resolution, but
I never open a browser window to the max.
To me it's a bit like "paper page" layout: Don't be afraid of white space :-)
What I meant with my comment was just that you tested with only three lines of
text, and those are not realistic conditions.
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/22/2005 11:17:02 PM
here's the actual link:
Re: Is it possible to have a multilayered html flash document? Wolf van Ween
11/22/2005 11:20:50 PM
Looks ok. Great.
I've just typed a long response to your 800x600 but it got lost :-(
In a nutshell: 800X600 is good as an overall size, don't forget there's menu
bars and toolbars and so on. Very few people have screen resolutions > 1024x768.
So I would go with something close to the standard stage size of 550x400 and
your "corner" swfs
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
11/22/2005 11:22:12 PM
here's the link:
Re: Is it possible to have a multilayered html flash document? Wolf van Ween
11/22/2005 11:27:46 PM
Yeah, happens to me, too. Don't worry.
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
12/12/2005 3:11:05 PM
right, now i'm buggered again!

the site is pretty much finished and i tested it.

here is the link:
http://www.othersidecreation.com/martin/test/portfolio.html

in internet explorer the 'wmode="transparent"' tag i'm using to make the flash
movies transparent is working perfectly. but in safari it only shows overlaying
areas as transparent.

also the flash playback in safari is SOOOOOOOO much slower than the internet
explorer version!

what THE HELL IS GOING ON!!! HELP!!
Re: Is it possible to have a multilayered html flash document? Wolf van Ween
12/12/2005 8:55:48 PM
Nothing can be done against that.
It's the wmode="transparent"' that creates all sorts of trouble.
Do you need transparency?
I thought you had separated the stuff out?
Isn't that how this all had started?

Re: Is it possible to have a multilayered html flash document? martinstaceyuk
12/14/2005 1:39:16 PM
well, i decided not to use transparent swf's and instead decided to use static
png's instead.

but for some reason on a pc, the images aren't showing the transpareny. on a
mac it works just fine, in IE and safari. also on a pc the random images in the
background don't seem to be showing up. just either white or the condensation
one.

there must be something wrong with the html, but i dunno what.

and ideas?
Re: Is it possible to have a multilayered html flash document? martinstaceyuk
12/14/2005 1:48:23 PM
right, in so far as the transparent png's, i now understand that pc's don't
support that. bugger!

so is there a way i can use a script in the html that will load the images on
a mac but not on a pc?
Re: Is it possible to have a multilayered html flash document? Wolf van Ween
12/14/2005 9:42:02 PM
Sure, you could do browser recognition, either via javascript in the HTML or
using server-side script.
But I'd say: SIMPLIFY, don't try to push it to the max.
Whatever clever stuff you might come up with is surely not going to work with
the next browser generation.
Cheers ;-)
Wolf
AddThis Social Bookmark Button