Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling a movie from javascript.

Status
Not open for further replies.

ckennerdale

Programmer
Dec 23, 2000
158
GB
I want to have a link or a button onmy web page that when I click it it will go to specific frame in an embedded movie. I want to have several movies on the page. Flash is being used as an additionalfeature of my presentaion asopposed to beong the heart.

My assumption is to name each flash object with a unique name,and then with a piece of javascript I can reference a specific movie and GoToFrame.

However it is not quite working,I am not sure if I have missed a point here or if I have to load an additional library or something.

Here is my code-

<object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;212&quot; height=&quot;56&quot; id=&quot;ButtonsM&quot;>
<param name=movie value=&quot;consol_buttons.swf&quot;>
<param name=quality value=high>
<embed src=&quot;consol_buttons.swf&quot; quality=high pluginspage=&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;212&quot; height=&quot;56&quot; name=&quot;ButtonsM&quot;>
</embed>
</object>


<a href=&quot;javascript:test();&quot;>test</a>

(and here is my javascript that resides in the head of the html page)

function test(){
var ButtonsM = window.document.ButtonsM;
ButtonsM.GotoFrame(5);
}


Thanks in advance Caspar Kennerdale
Senior Media Developer
 
Ha Ha

I'll check this link in a sec, but regarding the realplayer, the only way I could think of was via an embedded page, which you can postion and move around,as it is an object.

I posted some code for opening the window to a specfifed size and moving it around.

Is this sufficient?

But as far as moving the actual real player I dont think you can do that from a browser.


You could do it if you were creating an appilication in a Java envromonent or C++ but not for the web I dont think. Caspar Kennerdale
Senior Media Developer
 
I've been fooling around with the embedded player for 2 years now... Thanks for the code, but I've been there &amp; done that! I'm really looking for control of the popup player! Guess I'll keep looking! Unless I try WM... haven't done that yet!

;-)
 
The issue is really whether or not you are designing for the web.

The player istelf (both Real and Windows) are compiled in C, ot at least when are developing skinz for them this is the environment.

The player is exposed when you are developing skinz but as far as movement is concerned,I dont know. But for it to work you would have to be able to control this enviroment via a broweser- which I dont think you can do.

Both Windows and Real can be conrolled by Actoivex as yopu know, which makes control very easy especially in things like access!

But as far as controlling the external player is concerned you would have to control it from a separate environment,notfrom a browser.-

you do it in Java as well.

Caspar Kennerdale
Senior Media Developer
 
The issue is really whether or not you are designing for the web.

The player istelf (both Real and Windows) are compiled in C or C++, or at least when are developing skinz for them this is the environment used.

The player is exposed when you are developing skinz but as far as movement is concerned,I dont know. But for it to work you would have to be able to control this enviroment via a broweser- which I dont think you can do.

Both WM and Real can be conrolled by Active x as you know, which makes control very easy especially in things like access and combining presentations within applications. (WM is very easy for this)

Real Documentation-




But to be honest this is for things like automation I believe.

But as far as controlling the external player is concerned you would have to control it from a separate environment,not from a browser.-

you do it in Java as well.

Caspar Kennerdale
Senior Media Developer
 
Good morming (well... for me!) Ignition!

Downloaded the WM encoder and had a quick look last night!
Is there some kind of document manual for WM as the RP authoring kit? Where can I get it?

Also... you said nothing about my link regarding your problem! Whasn't that exactly what you were looking for?

Regards,
Oldnewbie ;-)
 
Download the Windows Media Player SDK fromthe same place-the documentastion is there.
There is also a good book called inside windows media- which is ok but pretty basic if you already have streaming experience (like you)

Finally got to look at your link- and this is perfect, except that I had already found another library someone had written for flash- so I combined the two-

basically I was just testing stuff our in prep for a project- but we will need to do is using call backs on real to then trigger different events in multiple flash movies!

works ok- the prob will be netscape- but one thing at a time!

See you on developer.thetuckshop.com Caspar Kennerdale
Senior Media Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top