neurofuzzy, flash game development, rich internet applications, free source code - *alt.neurotica.fuzzy*

neurofuzzy, flash game development, rich internet applications, free source code - *alt.neurotica.fuzzy*

12/4/2004

Flash Satay and Parameters, Flash on Other Domains

Filed under: Flash — geoff @ 1:02 am

I’ve been futzing around trying to get Drew McLellan’s Flash Satay object code to work with my site. The thing is, when I give users code to post slideshows on their own site, they need to have the BASE parameter set so that they can embed the flash movie that resides on my site onto their own.

Since Drew’s code does not use the EMBED tag, there was no way for me to get Netscape/Mozilla to recognize that the player.swf was on a different server. Also, for some reason, Ie wasn’t reading the BASE param either. I found a simple solution. Just add a base attribute to your OBJECT tag, like so:


<object type="application/x-shockwave-flash" data="http://www.slideroll.com/player.swf?s=5rrh2ej8&nocache=1" base=”http://www.slideroll.com” width=”360″ height=”280″>
<param name=”base” value=”http://www.slideroll.com” />
<param name=”movie” value=”http://www.slideroll.com/player.swf?s=5rrh2ej8″ />
<param name=”s” value=”5rrh2ej8″ />
<param name=”wmode” value=”transparent” />
</object>

I kept the BASE param in there just in case. In order to make the movie transparent (borderless), I also had to add wmode=”transparent” to the object tag. Problem is, it no longer validates. But, it is better than having the movie not play at all.

If anyone has found a way to do this and be standards compliant, I’d love to hear about it. Oh, and Javascript tricks don’t count!

7 Comments »

  1. With which standards and recommendations do you wish the page to be compliant? Is there a particular way you’d know “it’s compliant enough”? (I’m guessing one of the W3C validators is the key test, but I want to check whether “be standards compliant”includes other things too.)

    jd

    Comment by John Dowdell — 12/4/2004 @ 2:43 am

  2. Shouldn’t that be:

    value=”transparent”

    with the ‘=’

    Comment by PaulWeston — 12/4/2004 @ 4:44 am

  3. Paul, good catch, you are right, thanks!

    John, I guess either you’re standards-compliant or you’re not. But, I would say using valid, well-formed XHTML is more compliant than using the default OBJECT tag that flash spits out by default. For me, the default code was having alignment problems, and the Flash Satay code just behaved better. And, for some odd reason, now the flash movie plays faster in Safari.

    Comment by Geoff — 12/4/2004 @ 10:24 am

  4. “I guess either you’re standards-compliant or you’re not.”

    I get confused with that label, wondering whether we should have used PNG instead of GIF and JPG the last five years. That’s why I was trying to get a functional definition for the label “be standards compliant”, so that I wouldn’t assume the wrong standards.

    Many of the W3C Validators don’t like the “EMBED” tag, which browsers had used for years… the realworld was deprecated. If that’s the main issue, then we wouldn’t have to worry about other standards like VRML.

    (If you’d prefer a different syntax on the OBJECT/EMBED tags, then it’s pretty straightforward to make your own publishing templates:
    (link)

    Comment by John Dowdell — 12/4/2004 @ 12:59 pm

  5. Why don’t “Javascript tricks” count?

    You should be aware of some of the drawbacks of using Flash Satay, such as JAWS not reading your content (at all):
    http://weblogs.macromedia.com/accessibility/archives/2005/08/in_search_of_a.cfm

    Not to mention older versions of Safari will completely ignore your param tags, usually causing the movie to break anyway.

    Then, as if that’s not enough, if you are using cool stuff in Flash 8, and your users have Flash 7, the plugin will still try to play the swf, usually causing some odd behavior.

    You should consider a Javascript solution - it makes it much easier for your users to embed (they could just copy a single script tag) and it gives their users a much better experience, by possibly offering alternate content, or an upgrade message, or you could even use the new ExpressInstall stuff, which requires Javascript.

    Comment by Geoff — 2/22/2006 @ 12:41 pm

  6. Also, another bonus to use Javascript just occurred to me:

    If you give your users a line of html like this:

    Since you would be spitting out custom js on the server side, if you ever update your embed code (maybe you decide that transparent is taking too much away from the performance, and want to switch to wmode=opaque?) then you can do that very easily and all of your users will be updated instantly. Or maybe you just want to change the width and height of the Flash movie? It would be really easy with a little Javascript.

    Comment by Geoff — 2/22/2006 @ 12:47 pm

  7. Hmmm… unfortunately javascript includes are not an option for me. I’m already using javascript includes for the captions in my slideshows, and users are reporting problems. Reason being that most sites do not allow - and filter out - all javascript includes from their systems. Myspace in particular had a huge problem with someone hacking their site using javascript in a post. So now, no more javascript includes. Allowing users to post javascript allows for all kinds of XSS attacks, as well.

    Comment by geoff — 2/22/2006 @ 12:53 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

 

Powered by WordPress