Join or Login

Archive for February, 2008

Getting Flash to Validate

by me


I don’t know about you, but I am a validation junkie. If my website code doesn’t validate I get the shakes, cold-sweats, sometimes get delusional, and get angry for no reason. I really do not understand why embed is even used, well sure it’s a small neat code to throw on a website, but anyone can easily modify the code to w3c standards. If I can do it why can’t the big boys do it too?

Here is how I put flash embeds on my website. We’ll use Youtube for an example.

standard Youtube embed code -

<object width=”425″ height=”355″>
<param name=”movie” value=”http://www.youtube.com/v/50nHCo2n4Tw&rel=1″></param>
<param name=”wmode” value=”transparent”></param>
<embed src=”http://www.youtube.com/v/50nHCo2n4Tw&rel=1″ mce_src=”http://www.youtube.com/v/50nHCo2n4Tw&rel=1″ type=”application/x-shockwave-flash” wmode=”transparent” width=”425″ height=”355″></embed>
</object>

The trick to modify this code is to seperate all the embed attributes and then delete the embed tag from start to finish. Now go to your object tag and add the attribute data=”http://www.youtube.com/v/50nHCo2n4Tw&amp;rel=1″ ( anytime you see an “&” replace it with “&amp;”) and type=”application/x-shockwave-flash”. Now you can go into the “param” tags, add a backslash before the “>” delete the closing “</param>”tags. So you get something like this -

<object data=”http://www.youtube.com/v/50nHCo2n4Tw&amp;rel=1″ width=”425″ height=”355″ type=”application/x-shockwave-flash” >
<param name=”movie” value=”http://www.youtube.com/v/50nHCo2n4Tw&amp;rel=1″ />
<param name=”wmode” value=”transparent”/></object>

Here it is in action

If you want to get into more difficult codes we’ll use the Whos.Amung.Us map widget, like I have in the footer of my website. The original code looked like this -

<embed src=”http://maps.amung.us/flash/flashsrv.php?k=” mce_src=”http://maps.amung.us/flash/flashsrv.php?k=”get your own id”&type=em.swf” quality=”high” pluginspage=”http://www.macromedia.com/go/getflashplayer” allowScriptAccess=”always” allowNetworking=”all” type=”application/x-shockwave-flash” flashvars=”wausitehash=”get your own id”&map=green&pin=target-green&link=yes” width=”200″ height=”135″ />

Now there isn’t even an “object” or a “param” tag, but that is o.k.. First thing I did was erase the black sheep “embed” tag. You only have to put the “src”,”height”,”width” and “type” in the object tag, but change “src” to “data”. Basically you will take all the attributes of the embed tag and put them in param tags like this <param name=”embed attribute” value=”embed attribute value” />.You will get something like this -

<object data=”http://maps.amung.us/flash/flashsrv.php?k=”get your own id”&amp;type=em.swf”
width=”200″ height=”135″ type=”application/x-shockwave-flash”>
<param name=”src” value=”http://maps.amung.us/flash/flashsrv.php?k=”get your own id”&amp;type=em.swf” />
<param name=”quality” value=”high”/>
<param name=”pluginspage” value=”http://www.adobe.com/go/getflashplayer”/>
<param name=”allowScriptAccess” value=”always”/>
<param name=”allowNetworking” value=”all”/>
<param name=”type” value=”application/x-shockwave-flash”/>
<param name=”flashvars” value=”wausitehash=”get your own id”&amp;map=green&amp;pin=target-green&amp;link=yes”/>
</object>

If you look in the footer of this web page you will see it in action.

You can check for yourself about validity –>

Valid XHTML 1.0 Transitional

Little girl, Puppies and Forclosures

by me


I was watching the news tonight, basically I like to keep up with the media ( let’s face it, the news is not about actual events anymore, but more about interpretations of actual events ) and there was one story that struck me. The story showed this little girl sitting next to a puppy in an foreclosed house, with the little girl saying “ how could anyone just leave their pet like this? ”. Yes little girl, how could anyone just leave their pet like that? Whoever did must be some kind of scary monster who was more concerned about their family than the family pet.
I am sure some people, watching the same story, had a feeling of outrage at the person(s) who decided that their family was more important than the cute little puppy. That poor little, precious, black and white mutt.
I have an idea little one, maybe if we sent all the abandoned pets to China, like we have been sending our economy, they would find happy homes in a magical land of dragons and Pokemon. Maybe the abandoned animals could bring about world peace and convince the Chinese government to raise the wages of their workers to 120 cents a day and quit under deflating their currency. Wouldn’t that be “tha bomb”.
I personally find it sick that there was probably a group of “journalist” sitting around a big desk in a huge building thinking up this drivel. This is what I imagine taking place:
Big Boss Suit: “Let’s try to switch the focus from the economy and try and touch the hearts of people with a story. Anyone?”
Dink Suit One: “How bout a story about how hard it is for Britney Spears to fake a British accent.”
Big Boss Suit: “I like it, but we are a major news network and I want a piece that will hit the hearts of the American people. Write it and sell the rights to TMZ.”
Dink Suit Two: “I was thinking about a 1 minute piece about how we export 53 billion dollars in merchandise and import 250 billion dollars in merchandise.”
Big Boss Suit: “ You’re fired. There is no place for a story like that in American journalism. Clean out your desk and you will be escorted out the building. ”
Dink Suit Two: “ But I just bought a house, have a brand new daughter and just got a new puppy.”
Big Boss Suit: “ That’s it. Get the people in props. Tell them we need a scrappy, cute little puppy. Imagine this people. A little girl sitting in a foreclosed, I mean abandoned house next to a puppy saying ‘ how could anyone just leave their pet like this?’. Now that people is why I make the big bucks. Dink Suit Two you’re still fired. Why don’t you go work for PBS or something. SECURITY!!”
Well maybe not quite like that, but it makes you wonder how these so called “journalist” come up with such fodder and believe this is what people want. I mean seriously, let’s worry about the abandoned pet and screw the people whose hopes and dreams came crashing down because of underhanded mortgage companies ( In the “news” they like to call them lending companies ). You could probably get better stories from the back of a cow.
I think it would’ve been better if the little girl was sitting by the family that just lost in the American dream with her saying “ How could any country leave their citizens like this? “.

Powered by WordPress