Click to See Complete Forum and Search --> : Please help with loading a wmv file

09-26-2002, 11:09 AM
Please could someone tell me what I am doing wrong...

This may be a little complicated to explain, but I hope you will understand what I am trying to say and do!!!

There is a section in the Flash 6 movie that allows loading of sections of a showreel... video clips that are .wmv files.

Within my Flash 6 movie, I call for an external video clip (which is part of a showreel) using the following:

on (release) {getURL("http://?.??.???.??:??/NAME.wmv", "_self");

Looking at it on the web, it calls for the video clip and pops it up into a Windows Media Player window... but behind the wmv file loading, my Flash movie goes back to the start of the movie and does not stay on the showreel page.

So if you want to look at another section of the showreel, you would have to navigate back there again, which is really irritating.

How do I get the Flash movie to stay where it is without going back to the beginning again?

Many thanks

09-27-2002, 12:59 AM
It reads like the page is being refreshed to fetch the file.

as your calling the file to play because you are using a go to url.
I would suggest another method.
That of placing your wmv into a wm object embed tag
You can build a video jukebox via javascript functions.

First put this in the head

<*SCRIPT language="JavaScript">
function setBandwidth (connectionSpeed) {
if ((navigator.userAgent.indexOf("IE") > -1) && (navigator.platform == "Win32")) {
MediaPlayer.autoStart = true;
MediaPlayer.Filename = connectionSpeed + '.wmv';
} else {
document.MediaPlayer1.SetFileName(connectionSpeed + '.wmv');

Now put your wm object tag in

<OBJECT ID="MediaPlayer"
STANDBY="Loading Microsoft Windows Media Player components..."
<PARAM NAME="FileName" VALUE="m.wmv">
<PARAM NAME="TransparentAtStart" Value="true">
<PARAM NAME="AutoStart" Value="false">
<PARAM NAME="AnimationatStart" Value="false">
<PARAM NAME="ShowControls" Value="false">
<PARAM NAME="autoSize" Value="false">
<PARAM NAME="displaySize" Value="0">
<EMBED TYPE="application/x-mplayer1"
Width=320 Height=220

For the loading of your files.
call the javascript using just the file name without the extention

In flash you would call the event
On Event
GoTo URL javascript:setBandwidth('yourmovie');


09-27-2002, 03:27 AM
Wow Frets - thanks for such a detailed reply, but I am afraid that I am still feeling my way around Flash - a few questions more, please...

When you say put in the head - do you mean in the html file that calls for the wmv?

And the wm object tag - also in the html document?

I am sure that these questions show you how new to this I am!!! I really appreciate the help.

09-27-2002, 03:17 PM
yes in the head of your html document goes the script.

In the body goes the object embed tag for the media player.
As well as your object embed tag for your swf.

In an action is how you call the script to find the file name.

I've documented this for swish (different way of handling the javascript but more or less the same)
using wma's

09-30-2002, 09:00 AM
Frets thanks for your patience and help!!!

I went and had a look at the site you suggested with the .wma files and it was very helpful. I am still struggling to understand how everything links together... on my page, you are given four options of video clips to view as part of a showreel. I have assigned buttons to each option.

The file I am testing with is called rhc.wmv, so I have put the action onto the button... "on (release) {

I have put the code into the head and body of the html file as you said, but I am not sure if maybe for each option of videoclip (4) I should link to a new html file with your code in those html files?

Thanks again for the patience.

09-30-2002, 01:18 PM
The script doesn't call a new page.
It calls the windows media player to load a new video internally.

Something like load movie in level 0.

My advice is that you place a small clip in the default player. This will shore up load time on the page
Then use the flash/javascript function to load the new video into the player.
This way the swf doesn't have to reload.
Otherwise you would need to embed the wmp on each new page and just link to the page with the player and the wmv inside the object/embed code.


10-03-2002, 04:21 AM
Thanks for all the help Frets

10-23-2002, 10:29 AM
So you saying that I can play windows media file in my swf file means my flash movie. How do I load wmv in the flash. Don't have i have to have wildform and export as swf. Or I can use wmv file. Please let me know. HOw to do that..

06-05-2007, 08:24 AM
Hi Fret,

I was reading your comments about the object tag which we use to embed swf or video files. I have recently encountered an issue in conjunction to this as below:

I am using this object thing to embed a video in HTML page. Videos are kept in C: of the userís machine and irrespective of where the launching file runs it displays the videos. Now my requirement is to alert user with some message if the videos are not present on C: and I am unable to find any method to do this.

I would please request you to let me know if you have any solution for this.