Tony didn't get any cake

  1. Home
  2. About
  3. Subscribe
  4. Archive
  5. Random

Tony didn't get any cake

Newer
Older
  • using javascript to embed quicktime

    I know marsha you already blogged about this (thanks Marsha),

    but I have to get this out there again because it is so damn good.

    the info comes from this site:

    basically it makes embedding movies into your site a whole lot easier. It is a downloadable javascript file that you can forget about adding to the head of your html and just link to it and add it to your resources.

    Once you link to it in the head all you need to do is add this code at the place in your html where you want the movie to go:

    QT_WriteOBJECT_XHTML('MyMovie.mov' , '100%', '95%', '', 'SCALE', 'aspect', 'obj#ID', 'movieOBJ', 'emb#ID', 'movieEMBED') ;

    and the javascript file creates the necessary html object and embed tags for you.

    A couple of things it took me a little bit to understand:

    firstly those things inside the brackets are parameters (or attributes) for the movie - the first being the filename, the 2nd and 3rd being the size of the browser you want to take up, and the fourth being the unmovable empty one. (don’t delete this! it warns it has something to do with identifying the code needed to load the movie player)

    But there on you’re just adding other parameters that don’t necessarily need to be specified. And they work in a funny way. Unlike the first 4 brackets, from here on you are specfiying a parameter in one bracket and defining its value in the next. So ‘Scale’ is the parameter and ‘aspect’ is the value. (which by the by is a very useful parameter to set - because it basically means that no matter what size you have your movie it will always be full size)

    Incidently - what is an object tag anyway?

    Well it turns out the object tag is used for things like movies but it can be used for images too - although you can still keep going on and using the img tag if you like.

    Back to SCALE and aspect- there are several options for scale: the default is ‘1’ which means that it takes the size it actually has. Aspect means it fits into your box while still maintaining the integrity of its original ratio and ‘tofit’ means it takes on whatever dimensions you want to give it.

    Another important thing you may want to add is ‘Autoplay’ which decides whether the movie will start up automatically when you open the page. If you don’t want this to happen you need to set this to ‘false’.

    There are heaps more useful syle options here

    Posted on May 27, 2009
    Comments (View)
  • blog comments powered by Disqus
  • whatidone
  • throwing-myself-into-the-world
  • brilliant-at-whatever

Field Notes Theme. Designed by Manasto Jones. Powered by Tumblr.