? Making Link to Something Pointed to by Javascript

N

Nehmo

On
http://sketchup.google.com/gsu5vtviewer.html#id=27
The video for the Rotate Tool lesson works okay when I click on it,
but I want to link directly to it.
Looking at the source of the page there's a section corresponding to
the Rotate video link:

videos[22] = {title: "Rotate Tool",

link: "Mod_B2-rotate_tool.swf",

section: 0};

This apparently means that the name of the flash file is:

Mod_B2-rotate_tool.swf

Later on that page, there is this:

// path to where videos are hosted (with trailing slash)

var path = "http://download.sketchup.com/videos/su5videos/";

But when I combine that var path with the link, I get
http://download.sketchup.com/videos/su5videos/Mod_B2-rotate_tool.swf

But placing that in the Firefox address box gets me nothing.

I want to create a link directly to the Rotate Lesson video. How do I
assemble the URL?
 
N

Neredbojias

On
http://sketchup.google.com/gsu5vtviewer.html#id=27
The video for the Rotate Tool lesson works okay when I click on it,
but I want to link directly to it.
Looking at the source of the page there's a section corresponding to
the Rotate video link:

videos[22] = {title: "Rotate Tool",

link: "Mod_B2-rotate_tool.swf",

section: 0};

This apparently means that the name of the flash file is:

Mod_B2-rotate_tool.swf

Later on that page, there is this:

// path to where videos are hosted (with trailing slash)

var path = "http://download.sketchup.com/videos/su5videos/";

But when I combine that var path with the link, I get
http://download.sketchup.com/videos/su5videos/Mod_B2-rotate_tool.swf

But placing that in the Firefox address box gets me nothing.

That url works for me - any browser.
 
N

Nehmo

That url works for me - any browser.

Well, it doesn't work for me. The title is correct in the title bar.
And when I right click anywhere I can see I'm in a Flash file. But I
don't get the movie. I get the same behavior in Firefox 2.0.0.1 and IE
7.

Apparently, the video player on http://download.sketchup.com/videos/videoplayer.swf
gets loaded in the browser and then the swf file gets loaded into
that.

I don't know Javascript, but the procedure for playing the swf file
seems to be in this part of the code:
// render a video in the play area
function dovideo(id)
{
if (!id) id = 0; /* THIS IS NEW */

var elem = document.getElementById("playing");
elem.innerHTML =
'<embed style="width:640px; height:500px;" ' +
'type="application/x-shockwave-flash" bgcolor="#000000" ' +
'src="' + player + '" FlashVars="videoUrl=' + path +
videos[id].link +
'&hl=en&autoplay=true"></embed>';

var elem = document.getElementById("title");
elem.innerHTML = videos[id].title;
}

Anyway, I still don't know how to make a direct link to the video.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top