How would I validate this flash code for XHTML?
If you put this in a file and go to that validate site, you'll see about 30 errors.
Anyone know how to make it valid?
<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="520" height="160" id="Satsifaction Guranteed Logo 2" align="">
<param name=movie value="Satsifaction Guranteed Logo 2.swf"><param name=quality value=high>
<embed src="Satsifaction Guranteed Logo 2.swf" quality=high width="520" height="160" name="Satsifaction Guranteed Logo 2" align=""
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed></object>
mikehannon posted this at 01:58 — 31st March 2006.
They have: 64 posts
Joined: Oct 2005
I don't know too much about flash but in XHTML all values must be within quotation marks... i notice quite a few that are absent... and i think the "id" isnt allowed to have spaces in it... that should help at least... ^_^
DSSR posted this at 05:22 — 31st March 2006.
They have: 166 posts
Joined: Mar 2006
Thanks mate, got it down to 15 errors.
<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="520" height="160" id="Satsifaction_Guranteed_Logo_2" align="middle">
<param name=movie value="Satsifaction_Guranteed_Logo_2.swf"></param>
<param name="quality" value="High"></param>
<param name="_cx" value="13758"></param>
<param name="_cy" value="4233"></param>
<param name="FlashVars" value="-1"></param>
<param name="Src" value="Satsifaction_Guranteed_Logo_2.swf"></param>
<param name="WMode" value="Window"></param>
<param name="Play" value="-1"></param>
<param name="Loop" value="-1"></param>
<param name="SAlign" value></param>
<param name="Menu" value="-1"></param>
<param name="Base" value></param>
<param name="AllowScriptAccess" value="always"></param>
<param name="Scale" value="ShowAll"></param>
<param name="DeviceFont" value="0"></param>
<param name="EmbedMovie" value="0"></param>
<param name="BGColor" value></param>
<param name="SWRemote" value></param>
<embed src="Satsifaction_Guranteed_Logo_2.swf" quality=high width="520" height="160" name="Satsifaction_Guranteed_Logo_2" align=""
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed></object>
Roo posted this at 06:15 — 31st March 2006.
She has: 840 posts
Joined: Apr 1999
Everything in lowercase.
Note how the paramater tags are closed:
DSSR posted this at 09:37 — 31st March 2006.
They have: 166 posts
Joined: Mar 2006
Thanks mate. I got a few and down to 10 now.
The whole 10 errors pertain to this line only.
<embed src="Satsifaction_Guranteed_Logo_2.swf" quality="high" width="520" height="160" name="Satsifaction_Guranteed_Logo_2" align="center" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
This is the error, I have shrotened it by just appending the attribute, because their all the same.
9 errors.
There is no attribute "height", "src", "quality", "width", "height", "name", "align", "type",
"pluginspage".
The 10th error is.
element "embed" undefined.
Would you be able to tell me what's up here? I really don't understand too much yet, but I'm getting there.
Thanks guys.
Megan posted this at 14:39 — 31st March 2006.
She has: 11,421 posts
Joined: Jun 1999
This might help:
http://www.alistapart.com/articles/flashsatay/
http://blog.deconcept.com/2004/10/14/web-standards-compliant-javascript-flash-detect-and-embed/
Megan
Connect with us on Facebook!
DSSR posted this at 01:45 — 1st April 2006.
They have: 166 posts
Joined: Mar 2006
Thanks Megs. But I just learnt how to make html in this week and a bit. So I don't understand anything those sites are saying accept that XHTML isnt working with flash? Why have I been going for standards if this XHTML cant even use flash files? I wasted a whole week making my site valid come to th elast bit and now the ultimate truth is I cant use one single flash file?
I dont understand why I started this? It seems XHTML has many many drawbacks. Can someone confirm the reason why I am making my site valid? Is it just for other browsers? Or is there a bigger picutre?
GDVS posted this at 08:45 — 1st April 2006.
They have: 36 posts
Joined: Mar 2006
Like Megan, I usually point people at the Flash Satay page. Unless you're doing something that needs to be streamed (i.e a large movie) you can ignore everything on that page from the "Flash Satay" section onwards, everything up to there is about making it validate, everything after there is about making it still stream after it's valid.
In your case, you should end up with something like this...
<object type="application/x-shockwave-flash"
width="520" height="160" id="SatsifactionGuranteedLogo2"
data="Satsifaction Guranteed Logo 2.swf">
<param name="movie" value="Satsifaction Guranteed Logo 2.swf"/>
<param name="quality" value="high"/>
</object>
Changes:
1. Removed the embed tag altogether, it doesn't exist outside the fevered imaginations of the Netscape developers.
2. Removed the classid and replace it with type="application/x-shockwave-flash".
3. Spaces are not allowed in the id attribute, removed.
4. Removed the codebase attribute.
5. Added the data attribute with the filename of the Flash movie.
6. Closed the empty param tags.
Obviously I haven't tested this but it validates as XHTML 1.0 Strict and it should work.
Downside: It won't stream and it won't prompt the user to upgrade their flash player if they have an ancient version.
Upside: It validates and will play in all browsers. Your updated version would validate if you removed the embed tag but wouldn't play in many browsers.
It does indeed have some drawbacks at present but this isn't really one of them. You wouldn't believe the number of professionals out there who can't make embedded Flash validate (despite it being easy when you know how) so as a beginner I'd hardly expect you to.
There is indeed a bigger picture, making your site valid is important for a whole number of reasons, not least of them is that if it's not valid then it's plain wrong.
The biggie is that if your site is valid then it will be treated as (X)HTML by browsers. If it's not then it's treated as what designers call "Tag soup", an uncoordinated mess of tags that don't comply with any known standard. The browser doesn't know what you were trying to do so it makes a guess and tries to compensate for your mistakes. Usually it gets this right but the results are unpredictable and you could find that certain browsers render your site completely differently to how you were expecting it to look. If it's valid then browser knows what's going on and you have a reasonable expectation it will look something like you want it to.
As for whether you should be using XHTML or HTML, that's a discussion I'm involved in elsewhere on this site and probably not one you want to get involved in as it's geekily technical. It's all opinion anyway so go with whatever makes you happy, just make sure whatever it is it's valid.
Megan posted this at 15:56 — 1st April 2006.
She has: 11,421 posts
Joined: Jun 1999
And honestly, at your stage I wouldn't worry too too much about a few errors. IMO, It's most important to be valid in principle. Working towards standards compliant development methods is a process. You can't expect to be perfect right off the top.
One example of something that might throw your site off is a plug-in for another service or advertising. A lot of that sort of code isn't valid. So what can you do? Do your best to make a high quality site with what you have control over. The advertisements on this site are a good exmaple - the code generated by the ad management program is horribly non-standard. I'm not sure what we're gong to do with it when we seriously start tying to make this forum validate because it's not exactly easy to change.
Oh, and when you see those complicated articles like the ones I linked to with all the explanation and stuff, just skip to the bottom where they tell you what code to use. You don't need to know the why and how. I do that most of the time too
Megan
Connect with us on Facebook!
DSSR posted this at 03:24 — 3rd April 2006.
They have: 166 posts
Joined: Mar 2006
Thanks GDVS, that is great info. Explained for a noob like me too, much appreciated.
iI doenst work but, ROFL...it comes up white, but since meg said it doesnt have to be perfect, I am going to leave it "not valid", or Ill have to come up with another sort of satisfaction method.
Been working for nearly two weeks to get it perfect, got it perfect, but need to add this flash into it, and now its not, so all the boys, jeeves, busy, daveyboy, and demonhale all worked hard to validate my site, and now I go and stuff it up[ ...sorry guys.
Anyways, thanks heaps, this forum has been a great help to me, I never wouldve gotten anywehre without you guys.
Thanks for that run down GDVS. Thanks too Megan.
GDVS posted this at 07:52 — 3rd April 2006.
They have: 36 posts
Joined: Mar 2006
Doh, I don't suppose it's because you changed the filename is it? I notice in your most recent version you changed the spaces in the filename to underscores. If you did then you'd need to change the filename in the code I posted (in both places).
If your site is on a publicly accessible server I'd be happy to take a look and see if I can make the flash work.
DSSR posted this at 13:22 — 3rd April 2006.
They have: 166 posts
Joined: Mar 2006
Yeah nah, I changed the filename again with no spaces or underscores, then used that, I also used the underscores too when they were named that in "my web".
Its not public yet, Ill try get it up in a few hours. Its nearly done.
Thanks again mate. much appreciated.
DSSR posted this at 04:08 — 12th April 2006.
They have: 166 posts
Joined: Mar 2006
here it is GDVS
http://www.only-the-truth.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.