There are quite a few things that are standing out as possible being wrong
here.

Try this first.  Add

<param name="allowscriptaccess" value="sameDomain" />

inside your object tags for your flash markup.  You could also use the
term "always" I believe.  That will allow javascript/actionscript
access if I am not mistaken.

I would also advise cleaning up your references to sobj in your
functions.  You create a global variable reference and then you
occassionally redefine it with your functions.  Stick with one method
so you don't get screwed by variable scoping.
I would generally suggest always explicitly defining it locally in
your function.  It may be more verbose, but you'll get what you
expect.

i.e. something like...

var sobj
if !(sobj) {
     sobj=swfObject.getObjectById('myId');
}

Post back to see if this helps your situation,

Vincent

On Mon, Sep 7, 2009 at 4:06 PM, Mel_the_Snowbird <[email protected]> wrote:

>
> Hi  (to Sam Sherlock and all you other folks):
>
> Enviro:  swfobject 2.2, Javascript, and Flash Player in a simple .htm
> file
>
>   I' ve been trying everything under the sun to try and get some
> control over the Flash Player so that I can Stop, Play and Rewind
> the .swf file
>
>   All to no avail.
>
>   My video clip shows nicely but (for example) this next JS function
> does *not* get thru to Flash to have it stop running the video.
>
>   I am able to easily get the Flash Version passed back to my
> Javascript function, and display it on the screen while the clip is
> playing
>
>   The button which calls the videostop() function is in my .htm file
> underneath the running video clip but it keeps running forever, even
> when pressing my "stop" button. I *do* enter the videostop() function
> and show the alert message, but the video keeps playing ???
>
>   Again, my website is: www.mesaeastpark.com (click on 'Visit', then
> click on 'Preliminary Video Testing' )
>
> Can anyone help me please.
>
> Thanks,
>
> -Mel Smith
> Edmonton, Canada
>
>
> ***********************
> function videostop() {
>   var output,playerVersion ;
>   playerVersion = swfobject.getFlashPlayerVersion(); // returns a
> JavaScript object
>        output = "You have Flash player " + playerVersion.major + "." +
> playerVersion.minor + "." + playerVersion.release + " installed";
>   alert(output+"\n and you just Clicked Stop");
>   var sobj = swfobject.getObjectById("myId");
>   sobj.StopPlay();    // it won't stop playing :((
>   return true;
> }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to