I guess this is getting off the SWFObject topic. But (somewhat) briefly, your code is Flash should have something like:<br><br><div>//<br>function playVideo(vidToPlay){<br> flv_player.contentPath = vidToPlay;<br>}<br>//
<br></div><br>Then, because of the Callback you've registered (in my previous posts), the JS function "playVideo" will call the Flash function "playVideo". Whatever string you pass to the JS function will be passed to your Flash function. So if you have:
<br><span class="q"><a href="#" onclick="callFlashPlayVideo('flv/video2.flv')" > See other movie </a><br>that will pass the string "flv/video2.flv" to your function in Flash, which will be passed as (vidToPlay) and end up evaluating like this when you click the link:
<br><br></span>flv_player.contentPath = "flv/video2.flv"<br><br>Since you want the player to start out with a certain video playing already, before anything is clicked, you'll pass that string in with the so.addVariable
parameter as "flv_path" so it's available when the SWF first loads.<br><br>Instead of writing this line: flv_player.contentPath = _root.flv_path;<br><br>Write this line: playVideo(_root.flv_path);<br><br>HTH<br>
<br>-- <br>Danya Henninger<br>Imagic | <a href="http://www.imagicdigital.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
www.imagicdigital.com</a><br><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Date: Wed, 28 Jun 2006 13:24:38 +0200<br>From: "Martin Eiler | Cumuli" <
<a href="mailto:martin@cumuli.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">martin@cumuli.net</a>><br>Subject: Re: [SWFObject] Adding vars to SWFobject in Flash runtime<br><br>Hi<br><br>Thank you Danya for your reply. It was exactly the stuff I was looking for.
<br><br>I stille have a small problem with the code. I can?t get the<br>ExternalInterface in flash to work.<br><br>Basicly I have an instance of the flash video component 8 on my stage called<br>flv_player.<br><br>Previously I used the action: flv_player.contentPath = _root.flv_path; to
<br>set the paht to the flv-file.<br><br>So my problem is that I can?t figure out what vars I get from the<br>javascript, and how to handle them inside flash.<br><br>Regards Martin<br><br><br></blockquote></div><br>