Hi,
I tried the suggested swfobject.createCSS(...) function as follows:
<script type="text/javascript">
if (swfobject.hasFlashPlayerVersion("10.0.0")) {
// Overwrite regular CSS used for alternative content to
enable
Full Browser Flash
swfobject.createCSS("#flash_replace", "position: absolute;
top:
48px; right: 30px; width: 208px; height: 208px;");
}
swfobject.embedSWF("swf/amenities_gallery.swf", "flash_replace",
"208", "208", "10.0.0", "swf/expressInstall.swf", flashvars, params,
attributes);
</script>
This works really well and I don't have to add a wrapper div. But in
the case where there's not the correct version of the flash player and
the expressInstall.swf appears, this is not picking up any of the
styles so that it's located in an area near where the correct swf
would appear. I tried adding some styles to the flash_replace div but
this didn't do anything.
Is there a way to control where the expressInstall.swf appears?
On Mar 16, 2:43 am, Vincent Polite <[email protected]>
wrote:
> That's kind of an interesting add on; I never noticed it. Is there
> .removeCSS or is the standard way to invoke .createCSS and pass an empty
> string or null to the style you wish to void? Curious if anyone knows the
> use case for this method (what the OP was trying for?) or something internal
> to the project?
>
> Vincent
>
>
>
> On Sun, Mar 14, 2010 at 7:36 AM, Tony Reed <[email protected]> wrote:
> > You might also want to have a look at the api,
>
> >http://code.google.com/p/swfobject/wiki/api
>
> > and the swfobject.createCSS(...) function.
>
> > On Mar 13, 10:56 pm, gwh <[email protected]> wrote:
> > > Your suggestion has worked which is great so thanks so much.
>
> > > On Mar 14, 6:11 am, Vincent Polite <[email protected]>
> > > wrote:
>
> > > > Hello. It is working as intended. I don't personally agree with how
> > it
> > > > works, but...
>
> > > > When the SWFObject is actually embedded it does replace the div named
> > in
> > > > your code, and the css associated with that DOM node disappears.
>
> > > > The recommended approach to deal with this is to create a container div
> > > > around your SWFObject div and apply the styles there. Presuming you
> > have
> > > > control over the naming convention and the css file, this shouldn't be
> > hard
> > > > to resolve.
>
> > > > Vincent
>
> > > > On Sat, Mar 13, 2010 at 2:21 AM, gwh <[email protected]> wrote:
> > > > > Hi everyone,
>
> > > > > I'm using SWFObject2 to insert my swf into a web page. There are two
> > > > > publishing methods - static and dynamic. I'm using the dynamic
> > method.
> > > > > You have to specify the id of the container that will be replaced
> > with
> > > > > the flash content if enough JavaScript and Flash support is
> > > > > available.
>
> > > > > If there is not enough JavaScript and Flash support then the .swf
> > file
> > > > > in this container will be replaced by whatever I specify - in my case
> > > > > an image. So since the id of my div is "flash", I used this as the
> > > > > html container id.
>
> > > > > <div id="flash"> <img src="img/alternate.jpg" />
> > > > > </div>
>
> > > > > This div has some css rules applied to it that controls the layout of
> > > > > it, ie. it floats it etc. When I test though, the .swf file is
> > > > > inserted into the div but it loses the css styles. When I turn off
> > the
> > > > > flash player so that the alternative image is used instead, the css
> > > > > works.
>
> > > > > I wondered if anyone knows why this is happening?
>
> > > > > Appreciate any assistance.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > Groups
> > > > > "SWFObject" group.
> > > > > To post to this group, send email to [email protected].
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected]<swfobject%2bunsubscr...@googlegroups
> > > > > .com>
> > <swfobject%2bunsubscr...@googlegroups .com>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/swfobject?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "SWFObject" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<swfobject%2bunsubscr...@googlegroups
> > .com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/swfobject?hl=en.
--
You received this message because you are subscribed to the Google Groups
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en.