By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,557 Members | 1,406 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,557 IT Pros & Developers. It's quick & easy.

FSCommand + Opera ?

P: n/a
Hey
The same flash movie works in all browsers but in Opera it doesn't...
Flash doesn't invoke it, is there any way to make it work ?
I need to have the following code working in Opera:

function testmovie_DoFSCommand(command, args) {
if (command == "call_alert") {
alert("Here's the Flash message: " + args);
}
}

I can't modify flash movie ! I know that this code is ok, but what's wrong
with invocation ?
Jarod

Jan 2 '06 #1
Share this Question
Share on Google+
15 Replies


P: n/a

Jarod wrote:
Hey
The same flash movie works in all browsers but in Opera it doesn't...
Flash doesn't invoke it, is there any way to make it work ?
I need to have the following code working in Opera:

function testmovie_DoFSCommand(command, args) {
if (command == "call_alert") {
alert("Here's the Flash message: " + args);
}
}

I can't modify flash movie ! I know that this code is ok, but what's wrong
with invocation ?


Since there are so many ways to handle flash, I can not be sure what
your problem with Opera might be. If you could put up a simple page for
us that illustrates the problem, you might get better help. Flash
movies can be hidden with CSS and then turned on with JS to change from
hidden to visible. However this method should only be used for movies
without sound. Even if the flash movie is hidden, the sound still
blares through on many browsers.

Jan 2 '06 #2

P: n/a
> Since there are so many ways to handle flash, I can not be sure what
your problem with Opera might be. If you could put up a simple page for
us that illustrates the problem, you might get better help.


http://www.wsinf.edu.pl/~iceheart/fl...avascript.html

That's the sample in IE / FF you will have an alert after 5 seconds so test
it first in IE. After this take a look in Opera the alert doesn't work. I
can't change flash movies I can only modify javascript so is there any
chance for it to work.
Jarod

Jan 2 '06 #3

P: n/a

Jarod wrote:
Since there are so many ways to handle flash, I can not be sure what
your problem with Opera might be. If you could put up a simple page for
us that illustrates the problem, you might get better help.


http://www.wsinf.edu.pl/~iceheart/fl...avascript.html

That's the sample in IE / FF you will have an alert after 5 seconds so test
it first in IE. After this take a look in Opera the alert doesn't work. I
can't change flash movies I can only modify javascript so is there any
chance for it to work.


I have not had time to examine the code yet, but I have looked at your
page with several browsers. The alert appears correctly after countdown
only on IE6 and the old Netscape 4.8. The alert does not appear on my
Firefox 1.5, which is the most recent version. The alert also does not
appear on the latest versions of Mozilla, Netscape, and Opera. Perhaps
this information will help you and anyone else who may examine your
script.The countdown works properly on all of the browsers after
clicking the button. It is just that the alert does not appear after
the countdown on most of the browsers.

Jan 2 '06 #4

P: n/a

cw******@yahoo.com wrote:
Jarod wrote:
Since there are so many ways to handle flash, I can not be sure what
your problem with Opera might be. If you could put up a simple page for
us that illustrates the problem, you might get better help.


http://www.wsinf.edu.pl/~iceheart/fl...avascript.html

That's the sample in IE / FF you will have an alert after 5 seconds so test
it first in IE. After this take a look in Opera the alert doesn't work. I
can't change flash movies I can only modify javascript so is there any
chance for it to work.


I have not had time to examine the code yet, but I have looked at your
page with several browsers. The alert appears correctly after countdown
only on IE6 and the old Netscape 4.8. The alert does not appear on my
Firefox 1.5, which is the most recent version. The alert also does not
appear on the latest versions of Mozilla, Netscape, and Opera. Perhaps
this information will help you and anyone else who may examine your
script.The countdown works properly on all of the browsers after
clicking the button. It is just that the alert does not appear after
the countdown on most of the browsers.


I just glanced at the code. I notice that you are using vb script to
call the alert function. VB script is mainly an IE thing and does not
work on many other browsers. Thus your vb script is working as it
should on IE6 to call the alert function. However the other browsers I
mentioned(I don't know about Netscape 4.8) will not handle the vb
script, so the alert will not be called by it. I tried to find code to
call the alert function for other browsers, but I did not find it.
Perhaps is it in the php code? I have never used vb script, so perhaps
others here can see something else if they examine your code.

Jan 2 '06 #5

P: n/a
VK

Jarod wrote:
That's the sample in IE / FF you will have an alert after 5 seconds so test
it first in IE. After this take a look in Opera the alert doesn't work. I
can't change flash movies I can only modify javascript so is there any
chance for it to work.


This is an official security lock: Firefox has it explained on
bugzilla.mozilla.org (just cannot find the bugID right now). Opera is
silent but implements the same I guess.

Briefly if Flash plugin was installed automatically then the official
Flash <> JavaScript interaction is disabled. "Automatically" means that
you came on some page with Flash without having Flash plugin installed
and pressed "OK" when prompted to install it.
The only way to have the official Flash <> JavaScript interaction is to
go directly to macromedia.com and install the plugin from there
manually. This is the only way that works - and the official advise
from Firefox. This security lock marked as "will not be changed". I
have my Flash plugin installed manually and it works just fine under
Firefox 1.5
But as you can see it will not work on exactly the same browser with
automatically installed plugin.

You have to change all JavaScript calls in your flash onto
getURL(javascript:someFunction) hacks.

If you cannot do that then you have either support only part of your
visitors or to write another flash from the scratch.

Sorry for bad news...

Jan 2 '06 #6

P: n/a
VK

VK wrote:
This is an official security lock: Firefox has it explained on
bugzilla.mozilla.org (just cannot find the bugID right now). Opera is
silent but implements the same I guess.


....bugzilla became a real mess - couldn't find the relevant bug report:
but it is there, I know.

As the last ressort before to give up: many browsers (including Firefox
and "possibly" Opera) are acting funny on <object> elements.
Get rid of <object> section and try your flash on pure <embed>. Please
let know if it helps.

Jan 3 '06 #7

P: n/a

VK wrote:
VK wrote: As the last ressort before to give up: many browsers (including Firefox
and "possibly" Opera) are acting funny on <object> elements.
Get rid of <object> section and try your flash on pure <embed>. Please
let know if it helps.


My impression was that, at this point, the concern was with the alert
that failed to appear on some browsers at this point, but, yes, the
code to embed flash can be tricky and is a likely location for
problems. Here is the object the poster used:

OBJECT
CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
WIDTH="100%"
HEIGHT="100%"
CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"
ID=testmovie>
<PARAM NAME="MOVIE" VALUE="flash-to-javascript.swf">
<PARAM NAME="PLAY" VALUE="false">
<PARAM NAME="LOOP" VALUE="false">
<PARAM NAME="QUALITY" VALUE="high">
<PARAM NAME="SCALE" VALUE="SHOWALL">
<EMBED
NAME="testmovie"
SRC="flash-to-javascript.swf"
WIDTH="100%"
HEIGHT="100%"
PLAY="false"
LOOP="false"
QUALITY="high"
SCALE="SHOWALL"
swLiveConnect="true"
PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/">
</EMBED>
</OBJECT>

The object is an ActiveX object as indicated by the 32 digit ActiveX
id, in this case unique for flash. For flash,the ActiveX object will
work only on IE and close relatives. If the ActiveX object is fouled or
ActiveX is turned off, the flash movie will not show up on IE if the
code is written only for ActiveX. If the ActiveX path is taken, the
embed contained within the AX object is ignored as if it were not
there. However, if ActiveX is not supported, the embed path is taken.
This type of code gives the W3C validator fits, but it is widely used
by huge media sites and usually seems to work. There are ways to avoid
using both embed and ActiveX that will validate and that will work on
most recent browsers.

Jan 3 '06 #8

P: n/a
cw******@yahoo.com wrote:
Jarod wrote:
> Since there are so many ways to handle flash, I can not be sure what
> your problem with Opera might be. If you could put up a simple page for
> us that illustrates the problem, you might get better help.


http://www.wsinf.edu.pl/~iceheart/fl...avascript.html

That's the sample in IE / FF you will have an alert after 5 seconds so
test it first in IE. After this take a look in Opera the alert doesn't
work. I can't change flash movies I can only modify javascript so is
there any chance for it to work.


I have not had time to examine the code yet, but I have looked at your
page with several browsers. The alert appears correctly after countdown
only on IE6 and the old Netscape 4.8. The alert does not appear on my
Firefox 1.5, which is the most recent version.


It does appear here:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051224
Debian/1.5.dfsg-3 Firefox/1.5 Mnenhy/0.7.3.0
PointedEars
Jan 3 '06 #9

P: n/a
VK wrote:
Jarod wrote:
That's the sample in IE / FF you will have an alert after 5 seconds so
test it first in IE. After this take a look in Opera the alert doesn't
work. I can't change flash movies I can only modify javascript so is
there any chance for it to work.


This is an official security lock: Firefox has it explained on
bugzilla.mozilla.org (just cannot find the bugID right now). Opera is
silent but implements the same I guess.

Briefly if Flash plugin was installed automatically then the official
Flash <> JavaScript interaction is disabled. "Automatically" means that
you came on some page with Flash without having Flash plugin installed
and pressed "OK" when prompted to install it.
The only way to have the official Flash <> JavaScript interaction is to
go directly to macromedia.com and install the plugin from there
manually. This is the only way that works - and the official advise
from Firefox. [...]


What are you blathering about? Of course Firefox needs to be restarted
before a now-installed, previously not installed, plugin works in the first
place. Whether it was installed "automatically" or manually does not
matter.
PointedEars
Jan 3 '06 #10

P: n/a
VK
VK wrote:
Briefly if Flash plugin was installed automatically then the official
Flash <> JavaScript interaction is disabled. "Automatically" means that
you came on some page with Flash without having Flash plugin installed
and pressed "OK" when prompted to install it.
The only way to have the official Flash <> JavaScript interaction is to
go directly to macromedia.com and install the plugin from there
manually. This is the only way that works - and the official advise
from Firefox. [...]
Thomas 'PointedEars' Lahn wrote:
What are you blathering about?
About this:
<https://bugzilla.mozilla.org/show_bug.cgi?id=284057>
Took me some time to find it again, sorry
Whether it was installed "automatically" or manually does not
matter.


Unfortunately it does sometimes as you can see. Also see
<https://bugzilla.mozilla.org/show_bug.cgi?id=222869>

To OP:
Adobe Macromedia has "official" tagging for flash movies:
<http://www.macromedia.com/support/flash/ts/documents/java_script_comm/flash_to_javascript.html>
<http://www.macromedia.com/support/flash/ts/documents/java_script_comm/javascript_to_flash.html>

As you may notice it's way more complicated than simply
<object>/<embed>
I suspect that the above linked internal idiotism is the result of
different incompatibilities across different browsers. Try these
samples on Opera. If they work, then you'll have to use this ugliness.

Jan 3 '06 #11

P: n/a
VK

VK wrote:
To OP:
Adobe Macromedia has "official" tagging for flash movies:
<http://www.macromedia.com/support/flash/ts/documents/java_script_comm/flash_to_javascript.html>
<http://www.macromedia.com/support/flash/ts/documents/java_script_comm/javascript_to_flash.html>

As you may notice it's way more complicated than simply
<object>/<embed>
I suspect that the above linked internal idiotism is the result of
different incompatibilities across different browsers. Try these
samples on Opera. If they work, then you'll have to use this ugliness.


Noop... It doesn't work under Opera 8.51 - complete dead lock. Must be
because ActionScript became too powerful and Opera decided to not take
any responsability for a 3rd party product (?).

You have to use GetUrl("javascript:void(jsCall()") hack in your flash
movie or just skip on Opera.

Jan 3 '06 #12

P: n/a
VK wrote:
VK wrote:
> Briefly if Flash plugin was installed automatically then the official
> Flash <> JavaScript interaction is disabled. "Automatically" means that
> you came on some page with Flash without having Flash plugin installed
> and pressed "OK" when prompted to install it.
> The only way to have the official Flash <> JavaScript interaction is to
> go directly to macromedia.com and install the plugin from there
> manually. This is the only way that works - and the official advise
> from Firefox. [...]
Thomas 'PointedEars' Lahn wrote:


Will you learn to quote?

<URL:http://jibbering.com/faq/faq_notes/pots1.html#ps1Post>
What are you blathering about?


About this:
<https://bugzilla.mozilla.org/show_bug.cgi?id=284057>
Took me some time to find it again, sorry


So the default installation of the Flash player plugin that comes with the
Mozilla Suite or Firefox setup is incomplete for newer plugin versions,
because the setup does not contain the Flash Player setup at all, instead
Mozilla/5.0 only recognizes files of Netscape 4.x compatible versions of
the Flash/Shockwave Player plugin installed for another browser and
configures them for use with the new Mozilla/5.0 installation. Nothing
new here.
Whether it was installed "automatically" or manually does not
matter.


Unfortunately it does sometimes as you can see. Also see
<https://bugzilla.mozilla.org/show_bug.cgi?id=222869>


Same here.

You said there was some official decision by (the) mozilla.org (drivers)
that the Flash Player plugin requires manual installation to work, which
is a huge difference!

Stop talking about something you have not got a clue about.
PointedEars
Jan 3 '06 #13

P: n/a
>>> > Briefly if Flash plugin was installed automatically then the official
> Flash <> JavaScript interaction is disabled. "Automatically" means
> that
> you came on some page with Flash without having Flash plugin installed
> and pressed "OK" when prompted to install it.
> The only way to have the official Flash <> JavaScript interaction is
> to
> go directly to macromedia.com and install the plugin from there
> manually. This is the only way that works - and the official advise
> from Firefox. [...]

So the default installation of the Flash player plugin that comes with the
Mozilla Suite or Firefox setup is incomplete for newer plugin versions,
because the setup does not contain the Flash Player setup at all, instead
Mozilla/5.0 only recognizes files of Netscape 4.x compatible versions of
the Flash/Shockwave Player plugin installed for another browser and
configures them for use with the new Mozilla/5.0 installation. Nothing
new here.


So if I want to full instalation how do I get it ? Please share with link or
tell me what to type in google :) I tried to reinstall flash player from
macromedia site and it doesn't helped. But maybe there is a diffrent version
?
Jarod
Jan 3 '06 #14

P: n/a
VK

Jarod wrote:
So if I want to full instalation how do I get it ? Please share with link or
tell me what to type in google :) I tried to reinstall flash player from
macromedia site and it doesn't helped. But maybe there is a diffrent version
?


As I said it was one possibilities and it seems to be ruled out.
I have the latest Opera 8.51 with the latest Flash Player 8,0,22,0
installed "manually" (in the meaning of this thread) from
<http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash>

It *doesn't* work: JavaScript calls from within flash movies are
silently ignored. It works just fine with IE 6.0 SP1 and Firefox 1.5

Conclusion: a browser implied block.
Status: cannot be resolved
Workaround: screw on Opera right now.

Their own users will give them a hell soon for such "security policy"
and in one of upcoming releases it will be unfixed. That happens
regularly with one of wannabies: instead of thinking through they act
by the ingenius idea "no feature - no problem". Every time they are
being beatdown for that, but the temptation is too high I guess :-)

So just run your solution as it is, it will start to work for Opera by
itself sooner or later.

Jan 3 '06 #15

P: n/a
Jarod wrote:
Hey
The same flash movie works in all browsers but in Opera it doesn't...
Flash doesn't invoke it, is there any way to make it work ?
I need to have the following code working in Opera:

function testmovie_DoFSCommand(command, args) {
if (command == "call_alert") {
alert("Here's the Flash message: " + args);
}
}

I can't modify flash movie ! I know that this code is ok, but what's
wrong with invocation ?
Jarod


You may want to have a look at some alternatives to the built in
FSCommand and Flash communication techniques (unless you are targeting
Flash 8 - when you should use "External Interface") such as FlashJS
(http://weblogs.macromedia.com/flashjavascript/) or my own (shameless)
scripts to achieve this same functionality
(http://www.unfocus.com/projects/flashsuite/).

The official Macromedia Sponsored Flash JavaScript Integration Kit
(FlashJS) is more complete and stable, than mine (I've been focused on
the history part, and haven't gotten to finish off the Flash stuff just
yet), so that might be a good place to start.

Kevin N.

Jan 3 '06 #16

This discussion thread is closed

Replies have been disabled for this discussion.