|
-
Senior Member
problem of ExternalInterface
hello~
i have tired to ExternalInterface but it doesnt work
Code:
// as
myBtn.onPress = function()
{
flash.external.ExternalInterface.call("jsFunc", "hi");
}
// js
<script language="javascript">
function jsFunc( args )
{
window.alert(args);
}
</script>
my flash player version is 8.0.15.0
Last edited by HBB Alfred; 08-21-2005 at 11:17 AM.
-
it should be ExternalInterface.call("jsFunc","hi")
read the help doc for more details 
for the JS part, I wonder if there is "window" before "alert"? seems there isnt....
-
Senior Member
i am sorry,the code was not copy from my code
actually, it is flash.external.ExternalInterface.call("jsFunc", "hi");
-
Senior Member
 Originally Posted by HBB Alfred
hello~
i have tired to ExternalInterface but it doesnt work
Code:
// as
myBtn.onPress = function()
{
flash.external.ExternalInterface.call("jsFunc", "hi");
}
// js
<script language="javascript">
function jsFunc( args )
{
window.alert(args);
}
</script>
my flash player version is 8.0.15.0
-
hv u import the external class?
and r u sure onPress there's reli sth happen?
also try jus to call ExternalInterface.call("jsFunc", "hi");
-
Works for me, although it gives me a prompt saying it stopped a potentially unsafe operation. Try it without the "window" reference as mentioned.
-
Senior Member
to betaruce :i don't have external class, cause of i have used flash 2004 -__-||
but i convert swf to version 8
to annexion :i have got the prompt of unsafe in local at first, then i have came across the script error after upload my server
here is the test page, can you get the alert from js correctly, tell me, thank you!
Last edited by HBB Alfred; 08-21-2005 at 09:40 PM.
-
Retired SCORM Guru
Do you need to set swLiveConnect as an object/embed param for External API to work?
"What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
...and now I have tape all over my face.
-
no basically u don't need to set anything.
for the unsafe part, i think all ppl will encounter this problem. we need to alter the settings of the Flahs player so that it allows the action to be called.
-
 Originally Posted by HBB Alfred
here is the test page, can you get the alert from js correctly, tell me, thank you!
Hi,
I got the alert box "aaa" without errors or warnings
I'm viewing the sample in Firefox v 1. 0. 6
and my flash player is WIN 8,0,5,0
P.S.
Wouldn't life be easy if Keyboards had a "Make It So" button?
It could sit next to the "Any" key!! 
-
Senior Member
oh,thank you guys
it's my mistake that i set the id just is a number "1" in object tag.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|