Click to See Complete Forum and Search --> : The HTML link for a movie


Alligood
11-13-2005, 12:17 PM
I am trying to link a movie onto my myspace, but i can't find the code to link movies. I know for a picture, its <IMG SRC=""> but im puzzled on the movie link. I don't know if it matters but i want it to be in the QuickTime format.

Thanks
-John

rincewind456
11-13-2005, 01:17 PM
a normal anchor tag works ie: <a href="movie.mpg">Movie</a>

Albatross
11-13-2005, 03:18 PM
If you want the link for the file itself, use a regular hyperlink.

If you want the movie to be displayed on the page itself, use something like this. Keep in mind this particular example is for Flash files.

<object type="application/x-shockwave-flash" data="c.swf path=movie.swf" width="400" height="300">
<param name="movie" value="c.swf?path=movie.swf" />
</object>

Notice the value "c.swf?path=movie.swf" here. The "c.swf" file is actually a separate flash file that loads the actual movie "movie.swf" so it will stream in Internet Explorer I've found it won't work in Netscape 4, while ironically playing the Flash file just fine if you exclude the container file "c.swf"

Now for other types of applications, like .wmv or .mpeg files, replace the contents of the type attribute with the one you want to use:

avi would be "video/x-msvideo"
mov (Quicktime) would be "video/quicktime"
mpeg (or mpg) would be "video/mpeg"

Then remove the "c.swf?path=" completely. After that, replace movie.swf with the file path and extension of the file you want to use (example: "/movies/family_guy_hog_city.mpeg")

Don't forget to reset the width and height of the movie clip either.

Lather, rinse and repeat with the parameter tag's value attribute.

Example:

<object type="video/x-msvideo" data="somemovie.avi" width="400" height="300">
<param name="movie" value="somemovie.avi" />
</object>

For more information on MIME types, go to http://www.w3schools.com/media/media_mimeref.asp