Flash FLV: Stop FLV with a link on the page?

Hi all,

I've got a bit of a quagmire going here... I've got an .FLV that loads on my page above other content.  Fortunately, the .flv is wmode=transparent, which allows the underlying elements to show through.  Once the .FLV is done, it disappears...... but not really.  The containing DIV is still there.  And when you hove over the video, the control bar appears/disappears.  The width/height parameters of the div and flv persist in overlapping the content on the page.

My work around to this was to add a "hide" tab to the containing div.  The user clicks the hide tab, the div and its contained elements (flv) go away.

The problem here is that flv continues to play.  Its gone, but you can still hear it.  Is it possible to pass a flash variable to stop the video from playing when the user clicks on the hide link?

Thank you-
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I can't really tell you much, because I hate using Javascript and avoid it whereever possible due to cross browser implementations being wildly different in some cases, but you can use the flash External Interface class  to send signals to javascript code in your html file, to remove the DIV tag.  But that's about all I can tell you.
pmagonyAuthor Commented:
My implementation is 98% Javascript. I  need to be able to stop the movie with a url string.  This is key.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

pmagonyAuthor Commented:
Yeah, that's not what I'm looking for.  I'm loading my content with an SWFObject, using JavaScript.  I've figured out that I need to use FlashVars to pass the parameters via a query string.

I've added the following to my js code:

so.addVariable('play', getQueryParamValue('play'));

which waits for the play query string to get passed via the URL.  The link that passes the parameters looks like this:

<a href="#?play=false">

However, this doesn't work because all 'play' does is specify whether the movie begins playing immediately on loading in the browser. I need to pass 'stop' movie, stop everything. Especially the audio.
Why is it not what you're looking for?  External Interface does exactly what (I think) you need it to do which is enable communication between Javascript and Actionscript.  From the Adobe website:

"From ActionScript, you can do the following on the HTML page:    * Call any JavaScript function.    * Pass any number of arguments, with any names.    * Pass various data types (Boolean, Number, String, and so on).    * Receive a return value from the JavaScript function.From JavaScript on the HTML page, you can:    * Call an ActionScript function.    * Pass arguments using standard function call notation.    * Return a value to the JavaScript function."

Basically you would need to have a Javascript enabled button or something, to pass a javascript object to actionscript, which would call an AS function...or do I not follow you correctly?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pmagonyAuthor Commented:
what if I don't have access to the source .fla? This is an .flv file that I am loading.  Is what you are suggesting requiring me to add action script to the flash movie?
Yes, in order to use External Interface you would have to add code to the flash movie.  If you don't have access to the source code, then you're out of luck.  There's nothing you can do about it at that point.  And I can't think at the moment of any other way you could do it.
On Close action, try loading a no-existing flv
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.